Hello,
I am trying to use a javascript sdk, from a certain provider, that at some point he says that i must get the media stream of the user, by using the standard javascript way:
navigator.mediaDevices.getUserMedia({audio:true, video_true}) .then(function(stream) { /* use the stream */ }) .catch(function(err) { /* handle the error */ });
The problem is that this does not work in mobile and i don't understand why. Even if i give all possible permissions to the app through the forge plugin "Android Permissions Plugin".
Can anyone can help me, even if it just to say that this is definetly not possible in mobile because off...
Best regards,
Rui Gomes
BTW, just tried with the "Phonegap Media Stream" cordova plugin and did not work also.
Here is my simple wrapper of this plugin.
Rui Gomes wrote:
Hi Rui,
are you able to resolve this issue. I am also facing the same issue.
Thanks
Dileep
Hi Dileep, try to take a look here https://www.outsystems.com/forge/component-overview/6891/camera-reactive .
I use a similar code to getMediaDevice using only HTML5. This project works on reactive and mobile applications and doesn't require Cordova. Maybe you can found any difference from your code to figure it out.
Regards
Fabio
Fábio Fantato wrote:
Thanks Fabio for the reply!. I will check that.
But right now my requirement, I need to launch phone video using the above external JS code, but I am not able to launch that.
Thanks,
Dileep Verma
Hi everyone,
I'm also having this issue regarding audio record.
Here are some findings:
> If I use the emulator or a reactive application, the getUserMedia works fine
> If I generate an app, the getUserMedia works well if I only use video
> If use getUserMedia in the app with "audio: true" it returns NotReadableError (console printscreen in attach)
> If I generate an app that uses, for example "audioinput", it works
According to the error description, there is a problem with my microphone. But it works with other APIs different from MediaDevices API.
The reason why I'm trying to use this is because of the WebRTC. It needs the getUserMedia to return the stream.
Does anyone have an idea what can be or other solution to use WebRTC?