JS muteVideo on Safari

Hello,
1. on Monterey Safari 15.1 MacBook Pro the muteVideo command crashes the browser. This happens only when there is a single built-in FaceTime camera. If we add a second camera (USB) - no crash occurs. Other browsers don't crash with single/multiple cameras (Chrome, Opera, FF, Edge).
2. On other macs (e.g. mac mini) that don't have a built-in camera, attaching a single web camera (USB) doesn't crash Safari. We tried this on Mac Mini Catalina Safari 15.0. All other browsers don't crash too (with single/multiple camera).
3. On iOS 15.1 Safari 15.1 when doing publish we get this exception:
  • [Error] Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
  • (anonymous function)
  • rejectPromise
  • play
  • (anonymous function) (flashphoner-no-flash.js:13931)
although permission has been granted. Chrome 95, FF 38, Edge 46.3 simply crash like Safari on Mac with one built-in camera.
4. We wanted to test this functionality in built-in WCS demos but there is none that mutes the camera.

WCS 5.2.071

Thanks,
P
 

Max

Administrator
Staff member
Good day.
4. We wanted to test this functionality in built-in WCS demos but there is none that mutes the camera.
Please try to reproduce the isse in Media Devices example on demo server https://demo.flashphoner.com:8888/c...dia_devices_manager/media_device_manager.html
There is Mute switch to mute video in a stream publishing
1635728228053.png

Please note that there is a bug in iOS Safari 15.1 described in this post which causes a page crash if stream is successfully published. To workarond this, examble CVO switch in Media Devices example.
 
Last edited:
Thanks for a reply. When not muting a stream at all but publishing - its works fine. There is a crash when you mute a stream during publishing regardless of COD and CVO settings.

 

Max

Administrator
Staff member
Thanks for a reply. When not muting a stream at all but publishing - its works fine. There is a crash when you mute a stream during publishing regardless of COD and CVO settings.
The problem with page crash after WebRTC H264 video muting is reproducing in Safari 15.1 on MacOS 11.6.1 too.
It is not reproducing in latest Safari Technology Preview 134 (Safari 15.4, WebKit 16613.1.6.1). So it seems already fixed at browser side.
As workaround, you can publish VP8 from Safari 15.1, in this case page also does not crash after muting\unmuting video/ Or you can use other browser to publish H264.
3. On iOS 15.1 Safari 15.1 when doing publish we get this exception:
  • [Error] Unhandled Promise Rejection: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission.
  • (anonymous function)
  • rejectPromise
  • play
  • (anonymous function) (flashphoner-no-flash.js:13931)
although permission has been granted.
Please check if this is reproducing in Media Devices example with H264 codec stripped (otherwise, page may crash due to these Webkit bugs https://bugs.webkit.org/show_bug.cgi?id=232381 and https://bugs.webkit.org/show_bug.cgi?id=231505)
Chrome 95, FF 38, Edge 46.3 simply crash like Safari on Mac with one built-in camera.
All the iOS third party browsers are based on Safari, so they crash right after publishing due to WebKit bugs mentioned above. The only workaround now is to use VP8 for publishing by stripping H264
1635761300225.png

Those bugs are marked as fixed, so waiting for fix in iOS Safari 15.2
 
Thanks for explaining. Yes, the demo crashes on iOS 15.1 for Safari 15.1, Chrome 95, Opera 15, and FF 38 when starting to publish. Whats funny, is that Edge 46.3 crashes at page load. Awating the fix.
 

Max

Administrator
Staff member
Thanks for explaining. Yes, the demo crashes on iOS 15.1 for Safari 15.1, Chrome 95, Opera 15, and FF 38 when starting to publish. Whats funny, is that Edge 46.3 crashes at page load. Awating the fix.
There is a quick and dirty workaround for this crash:
1. At client side, enable video orientation extension support
Code:
session.createStream({
    name: streamName,
    ...
    cvoExtension: true
}).publish();
(you can enable CVO switch in Media Devices for test)
2. then, at server side, disable RTP bundles
Code:
rtp_bundle=false
to play video with correct orientation.
 
Will do. As a side note, just tested on Safari 15.0 & 15.1 - indeed that crash is inherent only to 15.1, 15.0 works correctly. Waiting for 15.2 for macOS & iOS. To recap: a crash occurs only when publishing and muting. If not muting during publishing - all works fine.
 
Top