Troubles with Safari on iOS

Hi,

I have an annoying trouble in OpenVidu Browser running on Safari for iOS. It is possible that it doesn’t depend on my own implementation. I’m testing OpenVidu v2.12.0 on iPhone 8 with iOS 13.1.2 and Safari 13.

How to reproduce the error

  • a Client enters a session via Safari (as Audio/Video publisher)
  • the same Safari Client do publisher.publishAudio(false);
  • then a new Client (Chrome on Android, PC, whatever) enters session (as Audio/Video publisher too)

Now, even if Safari Client do publisher.publishAudio(true), the other Client cannot hear him. And - that’s the really strange thing - even Safari Client can’t hear the other one!

I’m really stuck in this thing. Is there something I can do to understand if it is a bug or if I’m doing something wrong?

Some details, if it helps

I noticed that:

  • both Clients have hasAudio and audioActive in publisher.stream object correctly set to true
  • publisherStartSpeaking event is no longer fired from Safari client to the other one when the person speaks (I don’t know reverse)
  • you can do publisher.publishAudio(true/false) again all times you want: streamPropertyChanged event is correctly fired, but audio will be still missing.
  • if you test with more than two publishers, the problem exist only for Clients who connected after the Safari one. The others works well: they hear Safari and Safari hears them.
  • testing without a Safari Client everything seems to work well. It happens only with iOS Safari Clients (I can’t test on desktop Safari)

Wow, I’m going mad. The more I try to understand the problem, the more I find other collateral clues.

Other issues:

  • In Safari I never receive “publisherStartSpeaking” and “publisherStopSpeaking” events from others, even when the hearing problem is not present
  • The problem of no hearing occurs also if publisher.publishAudio(true) and publisher.publishAudio(false) are executed some times (a couple of times is enough), even in a perfectly working conversation. The hearing disapperars and never come back, even if publishAudio() leads to a corret audioActive true value

It would be helpful also only to know if someone else is experiencing the same issue on iOS Safari and openvidu 2.12.0. Thank you very much

Hello @blazeag,

For iOS support in OpenVidu, we use https://github.com/cordova-rtc/cordova-plugin-iosrtc

This library has some bugs that causes strange behavior. We report issues when we found them (https://github.com/cordova-rtc/cordova-plugin-iosrtc/issues/480).

We have downgraded library from 6.0.9 (latest) to 6.0.7 due to several bugs in the official ionic-tutorial (https://github.com/OpenVidu/openvidu-tutorials/tree/master/openvidu-ionic)

Regarding to publisherStartSpeaking events, this is because these events are obtained using a JavaScript library that is not available is iOS because WebRTC is a native library.

Best regards.

Thank you @micael.gallego for clarifying the situation. In your opinion, is there something I can do to try to at least to improve the situation when this kind of hearing problem occurs?

I’m now disabling audio toggle button on iOS devices, but my last tests reveal that in ~30% of the time the problem happens anyway for no apparent reason, immediately when the iOS client joins the session, or when another client joins. And it seems that percentage increases as the participants increase.

Are these percentages in line with what is expected at the state of the art, or is it I who made the situation worse in some way?

Unfortunately, in Europe iOS market share is 27%, way too high to be ignored. I don’t expect you to solve the problem for me, obviously, I just want to better understand how I can move. Thank you very much for your hard work

An update about this topic: I’m doing a lot of testing on other libraries and commecial solutions, too. I’m experiencing the same exact troubles with everyone.

I’m not in-depth expert, but I can suppose it is a browser web-rtc compatibility issue, more than a library one.

I tried:

  • OpenTok
  • VideoLink2Me
  • Linkello
  • Globfone (Sorry, webrtc is not supported on your browser)

That is in a way good to know.We will keep an eye on this.

Just to know: I updated to iOS 13, and therefore to Safari 13, the problem no longer occurs.

Let’s do the math: iOS 13 takes a huge 92,5% of total iOS devices, so the users affected by this issue are 7,5% of 27% of the global mobile european market share.

All in all, about 2% is an acceptable share of users.

1 Like

It seems Safari in iOS has a long history of issues with audio https://bugs.webkit.org/show_bug.cgi?id=198545

Does [cordova-plugin-iosrtc] use iOS/Safari so that ionic app also have this issue? thanks.

Nop, cordova-plugin-iosrtc uses a library that seems to work better. But iOS is still buggy in audio stack, take it into account.

Hi, any luck on this?

We are facing the same issue that iPhone Safari causes audio/video not being transmitted, and so far no persistent way to reproduce it. First we thought it was COTURN, but even after using twilio STUN/TURN the problem persists.

Sometimes it works fine but whenever another peer connects into the room iPhone Safari stops listening it… And also after switching the camera, iPhone Safari stops sending the audio stream. Any help will be really appreciated. Thanks.

We also want to have Safari working. It seems Safari in iOS has some bugs that happen from time to time.

1 Like

Hi @hmd, I solved most of the problems updating device from iOS 12 to 13. It seems Safari 13 has problems too, but less important, and less frequently. iOS 13 is today 92,5% of all iOS devices, a big slice.

Personally, I hope the situation will improve in september, when iOS 14 (and so safari 14) is going to be released.

1 Like

Yes, hoping for the best! But let’s see if anyone can find some hack or can dig the problems meanwhile…