New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
iOS 11 Safari Needs Additional Properties #929
Comments
|
@youennf you might want to take a look |
|
I've verified that it works. How we at appear.in solved it: Update: you don't need the |
|
Use of playsinline is currently required on iOS to actually play any video inline. The need for the controls="true" trick is unexpected so there is probably a bug here. |
|
I'll have a look and see if the |
|
It appears that the |
|
In my tests controls="true" is needed. |
|
See also related #926 |
|
I have a WebRTC app that works in Firefox and Chrome on Android and Windows, but user reports tell me that it still fails in Safari 11 on iOS 11. What could I be missing? I've added the playsinline to The vOICe Web App https://www.seeingwithsound.com/webvoice.htm Thanks! |
|
Difficult to say. |
|
It might be. Blind iPhone users told me that they got no sound whatsoever, so the exception would explain that. Unfortunately I have no iPhone or iPad so am for the moment working with educated guesses. I'm using 2-channel stereo with a 16000 Hz sample rate, which is a very common format (AFAIK Web Audio does not support querying supported formats https://webaudio.github.io/web-audio-api/). Thank you for trying, because it gives me a useful hint in what direction to look. I'll Google around some more. Perhaps it is as trivial as using a sample rate of 22050 instead of 16000. The former link states "An implementation MUST support sample rates in at least the range 8000 to 96000", but an older version stated "An implementation must support sample-rates in at least the range 22050 to 96000" https://groups.google.com/a/chromium.org/forum/#!topic/blink-reviews/a_OfM-a5ztI so maybe Apple used the older spec which could exclude 16000? |
|
Is is probably not the right place, might be better to file a bug in bugs.webkit.org. |
|
Note also that iPhone/iPads might require a user gesture to produce sound. |
|
Thanks a lot! I've modified my web app to use a sample rate of 22050 instead of 16000 to see if that makes a difference https://www.seeingwithsound.com/webvoice.htm (this might require a browser cache refresh). Yes, I am aware of the annoying gesture requirement and have advised blind testers to try press the app's Reset button to get things going (which by itself ought to sound a 2-tone beep). If the main issue is indeed the 22050 vs 16000 then I'll file a bug report about it (the 16000 was never a problem in Firefox, IceWeasel, Chrome and Edge). |
|
Loaded and I now get a gum prompt and see b/w frames... |
|
Cool, that is what is supposed to happen. Getting any sounds associated with the B&W camera frames? |
|
Getting some sound on Safari Mac |
|
Fabulous! Over the past 12 hours I received multiple reports from blind users with Safari under iOS 11 on iPhone 7 and iPhone 6S that it worked for them too, provided they hit the Play button at startup to take care of Apple's gesture requirement. They got the live soundscapes that they were already used to hearing on other platforms. Your remarks concerning NotSupported with createBuffer proved invaluable in finding the root cause of the problems. Thank you. |
|
https://webrtc.github.io/samples/src/content/getusermedia/gum/ was updated to use playsinline. |
|
If anyone is having issues with iOS 11 just like I did, it turned out that iOS11 seems to force the sampling rate to 48000, even though I specifically requested 16000. |
|
This is very promising! Can anyone direct me to an example of a simple audio recorder using getUserMedia working successfully on iOS? |
|
@mrwizzer Microsoft claims that their Bing Speech SDK will work, but I haven't tested. |
|
Thanks @catcher-in-the-try, but that looks more like a speech to text API. While it looks very cool, I'm just looking for a very simple way to implement a voice recorder within the browser to record a short audio snippet and play it back immediately. No need even to download the resulting audio file. Can anyone direct me to a tutorial or sample of something that simple using getUserMedia or similar? |
|
HI, there are demo, https://webrtc.github.io/samples/. it is very good adapter in the popular browser. |
|
Aiquantong, thanks, this looks like a great comprehensive list. But the "Record Stream" demo doesn't work on iOS. They're using the MediaRecorder API, which isn't supported on iOS. Does anyone know if recording the audio stream using WebRTC is possible yet on iOS? |
|
This is the closest example of successful audio recording I've found, but still not 100% there. It works solidly in Safari on MacOS, as well as Chrome and Firefox, Android too! And, sometimes on iOS. About 50% of the time I get a successful recording. The other half of the time it shows "Error" with no recording. Here's the example: Anyone have better luck than I am getting a successful audio recording on iOS? |
|
Is there a fix for this yet? In my case I have no sound out o Safari. |
|
@ee11131, it is not clear what you are requesting. |
|
https://www.webrtc-experiment.com/RecordRTC/simple-demos/audio-recording.html is not working for me in Safari 11, I have a microphone connected with USB. No errors are shown, it simply records nothing at all. |
|
Which API is it using to record audio? Is it web audio? MediaRecorder API? |
|
I am having similar issues as reported above for audio recording. For me, https://www.webrtc-experiment.com/RecordRTC/simple-demos/audio-recording.html works occasionally (I would say far less than 50% of the time). When it does not work, there is no error, but the audio that is being returned/recorded is just a stream of zeroes. I am currently using the developer iOS beta 11.2.5 b7 We have a similar experience with our web app which records audio and which works on other browser/OS combinations. It will occasionally work, but mostly returns silence. Is there some trick similar to what is mentioned for video above that is needed to get this to work? Or some way to reset the audio interface so that it works every time? |
|
@vbeattie have you tried the new IOS 11.3? any luck in this version? |
|
I am using 11.3 it now - seems somewhat better(?), but hard to say. Problem is definitely not resolved as I still get the muted/audio is stream of zeroes behavior sometimes. |
|
This bug has become unactionable, please file a new one or better yet a PR with the changes you need. |
|
demo in OP comment not working in iOS 11.4 on iphone X :( |
|
@tetreault, could you please file a bug in bugs.webkit.org? |
|
you can disregard @youennf -- was a weird mistake on my end :) |
|
@tetreault what kind of mistake it was?.. I'm having similar issue |
|
I updated my version of iOS @alienpavlov and when i did, for some reason, the javascript was disabled in my safari settings. No clue how that happened. |
|
@alienpavlov here's my full JS demo if you need it: |
Found the answer in the following thread: webrtc/samples#929
|
Does Progressive Web Apps on iOS support “getUserMedia/Stream API” ? i am developing an application using Quagga barcode scanner, where it works fine on ios safari but while accessing through webApp it crashes with error below. [Error] ERROR — Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating ‘k.inputStream.type’) |
|
no @PrltHvl7, i hate to break it to you but apple either intentionally or unintentionally did not integrate webrtc into anything that uses UIWebview or WKWebview. It really sucks, i had to split up my web app so mobile safari and android use webcam and everything else on iphone (ios chrome/ff/social in-app browsers/stand-alone PWA) utilized a photo upload since those webviews don’t have webrtc support |
|
Locking this conversation which has been very useful and became the de-facto reference for this :-) |

Browsers and versions affected
iOS 11 Safari on iPhone (not on iPad)
Description
getUserMedia()does not start unless some additional properties are added to the<video>tag:playsinlineandautoplay, andcontrols="true". Details are being tracked in this thread. It looks like once you run an example withcontrols="true"once, then it's possible to remove the controls for that page in the future. A modified working example is here.Steps to reproduce
Open the gum sample on an iPhone 6S running iOS 11 Safari.
Expected results
Shows video.
Actual results
Video is black with no errors.
The text was updated successfully, but these errors were encountered: