Reputation: 3006
Have an issue with starting a session in PWA apps.
During starting video session user get an error:
OT.Publisher.onStreamAvailableError OT_MEDIA_ERR_ABORTED
This happens only if the user adds the app to Home Screen.
Mobile systems: iOS (Safari), Android (FF).
If the app launched like the usual website, the app works fine.
Please check an attachment.
Appreciate any help.
Upvotes: 0
Views: 221
Reputation: 31
getUserMedia
now requires a secure connection (HTTPS) even in Firefox.
In Firefox 68 this manifests as a NotAllowedError
, which is how Chrome used to work until recently.
Starting with Firefox 69, the getUserMedia
method will be entirely absent in insecure connections (HTTP), matching the spec and how Chrome works today.
http://localhost
should still work however, since it is now considered secure.
From this Mozilla blog:
Firefox 68 behavior
In Firefox 68, getUserMedia
will still be there, but the promise returned from it will always be rejected with NotAllowedError
, while enumerateDevices will continue to work until Firefox 69. This matches how Chrome has worked for a good while (pre Chrome 74), and should be highly web compatible. It is an intermediate stepping stone to Firefox 69.
Firefox 69 behavior
In Firefox 69, both getUserMedia
and enumerateDevices
will throw TypeError
. This matches how Chrome 74+ and the the spec now work.
It is worth pointing out that this TypeError
exception will come from the absence of the navigator.mediaDevices
object in insecure contexts—or, if callbacks are used, the absence of the deprecated navigator.mozGetUserMedia
function. Any JavaScript that doesn’t test for this before invoking navigator.mediaDevices.getUserMedia()
will get an immediate exception thrown instead of merely having its promise rejected. Compared to Firefox 68, this might affect surrounding code, hence the two-step process.
Upvotes: 1
Reputation: 17305
Safari does not support the getUsermedia API for accessing the camera when added to the homescreen. See this answer. You might also find https://webrtchacks.com/guide-to-safari-webrtc/ useful.
Upvotes: 0