getUserMedia stopped working on Safari 10, no support - javascript

Since the release of Safari 10 the method getUserMedia() has stopped working in order to access the video camera from the browser. I haven't found any alternative apart from Flash, but also Flash is deactivated by default in Safari 10 which makes it a bad solution.
Have you found a fix for this issue?
You can try the standard html getUserMedia from the demos section of this website and test how in Safari stops working https://webrtc.github.io/samples/
Thanks.

Related

iOS 15 / Safari - MediaStream not playing/black screen

I'm creating a 1-1 calling application and seem to be encountering a problem with Safari ios15 to another safari mobile browser where the MediaStream is available but when attaching this to a <video> tag remains a black screen / nothing playing on the <video> element.
I am using PeerJS to establish a connection between the two and using peer.call() and peer.answer()
I am using navigator.mediaDevices.getUserMedia to start streams from both peers, this is working fine on all other devices with the exception of Safari on iOS 15.
I am also using setting the attributes for the <video> element to playsinline and autoplay with the addition of muted on the local stream, as other fixes have suggested but they have been no good.
Any ideas?
I had a similar issue with iOS 14.6 so i rebuilt my app in Flutter over a weekend with a few IPAs. Wasn't too difficult and had it live in both the app stores by the Tues afternoon. Helps if you port over keys too and copy any keyfiles across.
Docs are here.
Remember, expression closures have been deprecated.
I believe the issue is fixed in iOS 16.1, and was related to navigator.mediaDevices.getUserMedia always throwing an unassigned in Safari. This happens to Chrome on iOS too as Apple force google to 'reskin' Safari in order to force the user into the ecosystem, and won't allow devs to use another engine. Worth a read up if you can, loads of articles across the web.
First of all, I wouldn't be using safari. But if you're that way inclined, I'd use Brosix. What do you mean it doesn't work for iOS 15? Just use facetime. Alternatively, have you heard of Zoom app?
The video element is deprecated. Just use embed instead.
<embed></embed>
Just like above.
Have you not just forgot to run composer?? Sometimes the problem can be overcomplicated, double check the simple stuff.

JavaScript Differences between Mobile iOS and Android Safari/Chrome

I have been trying to google around for a few days to find some kind of answer, but is their a difference between how iOS mobile devices understand JavaScript, vs Android?
I currently have some code that works as expected on Android (Chrome/Edge), and on Windows (Chrome, Edge, IE 8). But once we get to iOS devices, it doesn't work as expected.
I also tried to see if I could find an emulator for iOS mobile, or just downloading the mobile Safari browser, but wasn't able to find one (that didn't have a cost related to it).
I found the issue, it was related to the selectors in the code not being completed - Chrome got it, but safari didn't.

How to ensure cross browser AAC+ playback?

I have an Icecast server serving AAC+ (HE v2). I use JPlayer in my webpage to play the content. In Chromium without Flash Player it works just fine.
For Flash enabled browsers it does not work out of the box. I read that Icecast wants to have a "type=.flv" appended to the stream request to make the content playble by Flash Player, and although I have trouble finding the Icecast documentation about it, indeed it works on Firefox with Flash Player 11. But it does not play on other browsers with Flash 15 and above, namely Google Chrome on Linux, Firefox and Internet Explorer on Windows. Google Chrome plays it just fine by disabling Flash Player.
The audio data are downloaded correctly as shown by Developer Tools, audio is heard for about one second and then silence.
Is there anything I can try to make AAC+ playback possible with Flash Player ?
A link:
http://148.251.184.14:18044/chr_xmas
By default it returns a header with Content Type audio/aac. By appending "?type=.flv" (with a dot), it returns Content Type video/x-flv.
Turns out this is a jPlayer issue. I noticed at the bottom a mention by a jPlayer fork with a crude hack which is good enough for my purposes.
It didn't work right off the bat though, I changed the line to
if( myStream.bytesLoaded > 2048 ) return 1;
as it seems that in my case bytesTotal was not uint.MAX_VALUE. I had to compile a new .swf with flex and it worked like a charm on Firefox and Internet Explorer.

HTML5 video controls not working in Internet Explorer

I'm having a little trouble with IE11 (and 10 and 9, when simulated through IE11's f12->Emulation menu) in that the controls for HTML5 videos are not working. The video displays, and if autoplay is enabled will even play, but it will not respond to play/pause, seek, fullscreen etc.
The page works fine in the latest chrome, safari, firefox browsers, just not IE.
Anyone able to help me? Link to live site is http://bslhomework.org.uk/christmas
Thanks in advance
http://bslhomework.org.uk/christmas is unreachable (file not found).
http://bslhomework.org.uk/
is redirecting to [http]://127[dot]0[dot]0[dot]1 (bad)
do you still need help?

Why is IE9 telling me it does not support audio, but it supports other audio

I'm working on an audio player that works in Chrome, but won't load in IE9. When I use this code it says the browser does not support audio.
<script> var supportsAudio1 = !!document.createElement('audio').canPlayType;
alert(supportsAudio1);</script>
However, sites that also use this method of detecting audio capability say audio can play, and the audio on that site does work. Can anyone help me figure out why IE9 is doing this?
Thanks!
Internet Explorer only supports audio in IE9 mode. Make sure you have <!doctype html> at the beginning of your markup and you didn't press the Compatibility View button. javascript:alert(document.documentMode) can tell you which document mode is IE9 rendering the page in.

Categories