iOS 15 Safari WebRTC Issue

We’re encountering an issue on the iOS 15 Beta when establishing a WebRTC connection through Safari, where we are not receiving the remote streams, either video or audio. This has been working in iOS 14 with no issues, and a build of WebRTC (from commit c830bd627f519b9dff95b04b6ac8c104f088e1ce) continues to work within our App, but not through either the Safari App or when launched as a SFSafariViewController.  The issue is present in Beta 8, however has been present since at least Beta 2, and presumably prior to that as well.

We have run the below test cases through http://www.appr.tc/, encountering the following results:

  • iOS 15b8 iPhone Safari to iOS 15b8 iPad Safari: Connected, no remote stream visible.
  • iOS 15b8 iPhone Chrome to iOS 15b8 iPad Chrome: Connected, no remote stream visible.
  • MacOS Monterey Safari to iOS 15b8 iPad: Connected, both streams visible on iMac, no remote stream on iPad.
  • macOS Big Sur Safari to iOS 15b8 iPhone: Connected, both streams visible on iMac, no remote stream on iPhone.
  • macOS Big Sur Chrome to iOS 15b8 iPhone: Connected, both streams visible on iMac, no remote stream on iPhone.
  • macOS Big Sur Chrome to iOS 15b8 iPhone Simulator: Connected, both streams visible on iMac, no remote stream on Simulator.

The above results mirror the issue we’ve been encountering in our own product where the stream from the device is sent to the remote, but the remote stream is not being shown on the device. Whether this is an issue with Safari or with the version of WebRTC used therein we aren’t sure.

It does seem that if we change the default Safari experimental settings below in Beta 8 we are seeing success:

  • “VP9 SW Decoder on Battery” - Enabled
  • “VP9 Decoder” - Disabled

Given the above, we suspect this issue may be related to Safari now using VP9?

AppRTC source: https://github.com/webrtc/apprtc

  • This update is going to heavily impact me as I rely on video broadcasting through Safari on my phone for my job. Without this, it will be a major **** to my income and I am afraid to update my phone until then.

Add a Comment

Replies

I have the same problem on the final release with my iPhone XS Max. Please give us an update about this problem

We require WebRTC for a huge broadcast event in Toronto ON Canada over the next few weeks, and everything was working great on 14.8, and now that 15 has dropped, all of our iOS devices will NOT work on LTE/5G. Friends at Apple.. please help!

  • Did you find any solution or cause for this issue?

Add a Comment

We have the same (or similar) problem with iOS 15. iOS 14.8 worked fine, but under iOS 15, WebRTC video and audio aren't getting delivered to the remote peers.

A fix that worked for us was to have the user turn off "WebRTC Platform UDP Sockets" in the iOS Safari -> Advanced -> Experimental Features.

We also experimented with the "VP9 Decoder", "VP9 SW Decoder on Battery", and "VP8 Decoder" experimental features, but no combination seemed to work.

  • We have a Web App that uses WebRTC 2 way audio. After upgrading to iOS 15 the output audio to speakers (or bluetooth with AirPods) is about 2/3 reduced. The microphone outgoing audio is fine. This has been reproduced on iPhone 7 and iPhone XS.

    It can be reproduced by going to:

    https://webrtc.github.io/samples/src/content/getusermedia/audio/

    or

    https://appr.tc/

    If you compare the playback audio level of an iPhone XS running 15.x, you will find it is about 2/3 volume as an iPhone XS running 14.8.

    Our web App has been running fine with good audio levels since 2018 and iOS 11.x.

  • I am running iOS 15.2 Beta. We have an Cordova based application using WKWebView. We noticed that we are not able to communicate (Exchanging a Video feed) with the WebRTC client in some Networks. We suspect that there is some kind of DTLS issue as we can see an ICMP code 13 (Communication administratively filtered) response for a STUN binding request in Wireshark. Also in the iOS OS Log we can see that a UDP connection can not be established, which would explain the ICMP.

    The experimental feature did not fix the issue, also playing the the other flags you mentioned did nothing to improve the situation.

  • Just for reference, I created a WebKit Bug Report: https://bugs.webkit.org/show_bug.cgi?id=233752

We're experiencing similar issues with our WebRTC App in iOS 15. Previous iOS version worked great, iOS 15 does not publish any video feeds. We've spent a considerable amount of time playing with the "Advanced Experimental Feature" settings on an iPhone 8 and none of them seem to correct the issue. Is there any official documentation from Apple on what is causing this problem and how to correct it?

  • I would also be thankful for an official statement regarding this issue. We have spend days with this issue without any notable improvements.

    It looks like the iPhone is is some kind of loop and is not processing the DTLS "Client Hello" messages. In Wireshark we always see just "DTLS" instead of "DTLSv1.2" when the issue occurs. We have two customers reporting this issue, one can't establish a connection at all, the other one has the issue every now and then. Our first thought is that "DTLSv1.0" is used, as it is not supported anymore by Safari we tried to pin it to "DTLSv1.2" but no luck. It appears Wireshark will display just "DTLS" as long as no "DTLS HelloVerifyRequest" is sent by the other side in the DTLS-Handshake process.

    Did someone have similar findings?

Add a Comment

The low volume audio issue is being tracked as a webkit bug: https://bugs.webkit.org/show_bug.cgi?id=230902

It has been assigned to an Apple engineer - but I'm thinking the more comments are added on that webkit bug the more noticeable it will get.

We just re-tested with the newly released 15.1 and the issue is still there with low audio with a WebRTC audio stream. Tested on an iPhone XS. Our users will need to refrain from installing 15.x until this is resolved.

  • have tested in new beta??

Add a Comment

15.2 is the same. Still not receiving or decoding the webrtc stream.

  • ... (edit: originally made an edit to this post by accident, instead of to the forum topic itself).

Add a Comment

I've experienced the issue where streams aren't starting w/ Safari 15x (both Mac and iOS), and discovered that it seems to fix itself (in my project, at least) if stopping the outgoing stream (per audio / video kind), then restarting the stream (i.e. making a new gUM [getUserMedia] call).

The "restart" method I just mentioned seems to also work if choosing an entirely different capture device, of the same audio / video kind, on the second attempt. i.e. first microphone capture fails for one device, starting another device works.

Even stranger, for me, is my project is based in React, and I've worked around this w/o doing the restart method in development mode, but in production, it is persistent, and for the life of me I can't figure out what's changed.

  • Is there any update on this or has somebody found a fix for this? I have been facing this issue as well since the latest iOS update. I am using HTML Canvas element as the video source to publish the video. All I have been getting is a black screen and sometimes the first frame loads but ends up with a black screen.

Add a Comment

My problem was slightly different but this might help.

WebRTC stream was delivered but the framerate was very low.

Disabling WebRTC H264 LowLatency fixed the problem.

iPhone 12 Mini / iOs 15.4.1

Add a Comment

please guys fix it .i was going to publish an app this week but the webrtc is not working on ios 15.this is disaster

So what is the status of this? I am having issues with WebRTC streaming video on iOS. Works great on PC but not on iPhone or iPad.

Anyone know the official word?

Thanks.

I have THE solution ! Install firefox and the rtc player will worke like apparently apple have done an other time a feature and not a bug whith safari...

For calendar, prefer sabre.io at apple calendar like this you could do proper injection inside them in PHP ( a possibilty in apple few years ago....but a feature now, and not a bug too)

  • Hello, not working for me in iOS.

Add a Comment

I am having the same problem. WebRTC works correctly using the following configurations:

  • PC - PC (Linux - Mac - Win)

note: on Mac, Safari doesn't work, you only see the local video but you don't get the remote stream. Also local video is not sent. Using Firefox and Chrome it works perfectly.

  • PC - Android
  • Android - Android.

With iOS devices it's not possible to send the local video stream under any circumstances and remote stream can only be viewed if the ios device joins conversation after other parties and using Chrome or Firefox (Safari doesn't work)

Hi, I found what the problem was. I was using a method (.addStream) which has been removed from the standard and is no longer implemented on Apple devices. (but still recognized in other platforms) I changed my code to something like this:

// pc.addStream(localStream);  OLD METHOD NO MORE IMPLEMENTED

localStream.getTracks().forEach(track => pc.addTrack(track, localStream));

Everything seems to be ok right now

Cheers, Andrea

  • I've updated my addStream method to addTrack and still have this issue [Error] A MediaStreamTrack ended due to a capture failure specifically on audio/mic track on my MacBook m2. Safari 16.4.

  • Well, in my case it was a quick fix - I've removed sampleRate from audio constraints.

Add a Comment