I’m getting no sound for subscribers in Safari on iOS (works fine on macOS). This issue happens in my app as well as the webinar demo at https://demos.openvidu.io/basic-webinar/.
EDIT: to clarify, when I say “no sound” I mean that the subscriber does not hear the publishers. Also, I checked the iOS auto-play setting in Accessibility -> Motion and it is enabled.
While there are around 10 participants publish video/audio in meeting room, participants using iPhone/Safari can’t hear audio of some other participants. The behavior seems like sound of most recently joined participants, or sound of participants just unmuted can’t be heard at iPhone/Safari participants, while PC/Chrome participants can hear everybody’s sound fine.
We set up this demo application on a server with spec like
4 core CPUs (usage around 80~100% while demo application is running)
4GB memory (always more than 1GB are free)
Server config we modified,
OPENVIDU_STREAMS_VIDEO_MAX_RECV_BANDWIDTH=1000
OPENVIDU_STREAMS_VIDEO_MIN_RECV_BANDWIDTH=100
OPENVIDU_STREAMS_VIDEO_MAX_SEND_BANDWIDTH=1000
OPENVIDU_STREAMS_VIDEO_MIN_SEND_BANDWIDTH=100
Please advice if we can provide any more information to troubleshoot.
This issue seems to be getting worse. I am now also getting frozen videos for subscribers in Safari on both iOS and Mac. This can be reproduced every time in your basic webinar demo.
Please note that OpenTok does not have this issue, so it is definitely something specific to OpenVidu. I am trying to replace OpenTok in my app with OpenVidu.
Please let me know if you are looking into this. I can’t use OpenVidu as is and really want to.
I suspect that the problem is in the application code, not in OpenVidu. Due to some limitation in Safari in iOS, the video is not playing correctly in basic-webinar but is working as expected in OpenVidu Call.
I’m pretty sure this is an autoplay policy thing. Try intializing the vide of the subscriber user in “muted” state (that should allow autoplaying the video track with no sound). Then add a button to enable the audio track through a user gesture. If that works, then you’ll have found out what was happening, and you will be able to tweak the solution to your needs. If that doesn’t work, then we will continue the conversation here. The behavior I just described is something you will find a lot browsing the web. Usually ads work like this.
@pabloFuente thanks. I finally got around to testing this and it seems to be working.
One problem is that the streamAudioVolumeChange event still sends -100 for newValue even after the user clicks and audio/video becomes enabled. At that point I am hearing audio but cannot use streamAudioVolumeChange to display the audio level. Other browsers do not have this issue.
Another thing I noticed, which may help fix this, is that subscriber.streamPlaying doesn’t fire in Safari when audio/video is disabled. It does fire after audio/video becomes enabled, but in other browsers it fires right away even if audio/video is disabled.
I wanted to mention again that TokBox/OpenTok does not have these issues and doesn’t require a user click, so this seems to be something that OpenVidu could fix. The workaround works, but it’s not a great user experience. Is this something OpenVidu will look into fixing?