I use getUserMedia() in my app, and it recently broke. When I try it using ionic serve in chrome it works great. When I load it to an android phone the function getUserMedia() exists, but when I call it I get back an error that is just an empty object. Note that this is different than permission errors, which I got when I first coded it, but figured out easily enough.
I reverted back to a git version where it worked for sure before, but it still fails in the same way. This leads me to think that it has to do with the versions of all the packages that aren’t controlled by git.
I even started a fresh project, loading only what I needed to get it to work. It works great in the browser using Ionic serve, but then when I load to my android phone, it again fails and gives no error. That environment is
Cordova CLI: 6.2.0
Gulp version: CLI version 3.9.0
Ionic Framework Version: 1.3.1
Ionic CLI Version: 1.7.16
Ionic App Lib Version: 0.7.3
Node Version: v4.2.2
also, the plugins I have installed are:
cordova-plugin-console 1.0.3 "Console"
cordova-plugin-crosswalk-webview 1.8.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.2 "Device"
cordova-plugin-splashscreen 3.2.2 "Splashscreen"
cordova-plugin-statusbar 2.1.3 "StatusBar"
cordova-plugin-whitelist 1.2.2 "Whitelist"
ionic-plugin-keyboard 2.2.1 “Keyboard”
I just pushed the sample app code, in case anyone is up for looking at it and telling me what I am doing wrong. https://github.com/scottmahr/test-getusermedia
I am pulling my hair out trying to figure this out, does anything have any suggestions of what could be wrong, or what to try next? I recently had some issues with ionic-deploy, which solved themselves after I updated ionic and cordova. I am wondering if that could have been what broke getUserMedia.
Thanks very much to anyone that has any ideas,