AirenSoft / OvenLiveKit-Web

OvenLiveKit for Web is a JavaScript-based Live Streaming Encoder
MIT License
48 stars 24 forks source link

Critical issue on iOS 15.1 #2

Closed bchah closed 2 years ago

bchah commented 2 years ago

Apple released iOS 15.1 yesterday and now when sending a WebRTC stream in the browser, the page suddenly reloads 😢

I first observed this in my application, but checked on the OvenPlayer demo page and it is behaving the same way.

The problem is, there are no errors in the console even up to the moment the page reloads. The stream even appears to connect fine so this could be an issue with the WebKit browser itself. After a couple of attempts you will see a generic error of 'A problem repeatedly occurred on {URL}'.

@SangwonOh are you able to reproduce this issue? Any idea what is happening? 🙏

bchah commented 2 years ago

I tried to reproduce it with OvenSpace as well, but I think the OME instance connected to it is not running right now 😅

image

SangwonOh commented 2 years ago

@bchah OME is back to normal (The connected OME is an outdated version and needs to be updated for stability.). Sorrry, I can't test this right now. I'll try to figure out the cause.

bchah commented 2 years ago

@SangwonOh thank you, I tested with OvenSpace now that the server is on and indeed the same issue occurs there. Since it involves transmitting WebRTC should I raise an issue in the OvenMediaEngine project as well?

SangwonOh commented 2 years ago

@bchah First, let's see if it's a client-side problem. Is there the same issue in iOS safari?

bchah commented 2 years ago

@SangwonOh The issue is only observed in iOS Safari (and Chrome, but all browsers on iOS use the Apple Webkit build). Desktop browsers are working fine.

bchah commented 2 years ago

Looking at the WebKit bug tracker there are reports coming in, here is the most recent one that describes what I am seeing. I hope it is helpful:

https://bugs.webkit.org/show_bug.cgi?id=232381

SangwonOh commented 2 years ago

I removed h264 from SDP and tested to use only VP8, and it seems to work fine without a crash. I'll do some more testing to see if it's really okay to do this.

SangwonOh commented 2 years ago

@bchah I made a new release v1.0.2. Also OvenSpace uses new release and OME instance connected OvenSpace updated latest OME.

Thanks for reporting this issue.

bchah commented 2 years ago

@SangwonOh thank you for the excellent fix! It is working great in iOS 15.1 now 👍

I don't know if this is a placebo effect or not, but have you changed to VP8 from H264 as the transmission codec? In a quick test from mobile just now, the compression reminded me of VP8 and it did not suffer from the 'slow ramp up' issue I have seen with H264.

Either way, this is fantastic. Thanks again 🥇