Critical WebRTC Issues on iOS 15
bchah opened this issue · comments
Describe the bug
As reliably as the earth moves around the sun, Apple breaks WebRTC in Safari. It looks like they have done it in iOS 15 now.
This time it completely prevents OvenMediaEngine / OvenPlayer from connecting over WSS, and I hope I found the right clue why.
To Reproduce
From iOS 15, try to send or receive WebRTC streams with OME, using WSS.
Logs
Server (please complete the following information):
- OS: Docker Linux
- OvenMediaEngine Version: 0.12.5
Player (please complete the following information):
- Device: iOS devices
- OS: iOS 15 +
- Browser: Safari / WebKit (all iOS browsers use Webkit base)
Additional context
-
I have been testing Safari 15 on macOS all summer and it works great, so this problem seems limited to iOS.
-
The clue I found was on a Broadcom forum, where they suggest that iOS no longer sends the 'user-agent' string as part of WSS requests. So it seems the connection process is failing because OME is not receiving the expected data. But you will know better from the attached logs.
Broadcom post where I found the clue: https://knowledge.broadcom.com/external/article?articleId=223857
Apple developer forum, similar report: https://developer.apple.com/forums/thread/682037
Finally, here is the iPhone web inspector showing the errors I get client-side, when sending in WebRTC. When playing back a stream, a similar error shows too:
--
I hope this issue can be addressed with a somewhat higher priority, since it completely breaks OME access on iOS which is a substantial part of most user bases. If you need access to iOS devices or any more information please let me know and I would be happy to set up a test with you.
We will analyze this quickly. Thanks for reporting.
@bchah
I found a problem that the WebSocket frame is not parsed normally with a low probability (but a high probability in iOS 15).
The problem of not being able to playback is a critical issue, so I will increase the priority of this task.
The behaviour in this issue has changed in the latest commit:
019d1d3
Where before there was no connection at all, now it is still producing errors like above but once in a while it is possible to start a connection. In a quick test, it seemed like starting a second connection (e.g. a stream and a chat player) interrupts the first or causes a websocket error.
I'm sorry this does not provide great clues. But wanted to let you know something changed with the latest commit.