AirenSoft / OvenPlayer

OvenPlayer is JavaScript-based LLHLS and WebRTC Player for OvenMediaEngine.

Home Page:https://OvenMediaEngine.com/ovenplayer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Full screen not working in iOS 17 Safari with WebRTC

bchah opened this issue ยท comments

When attempting to toggle fullscreen with either the button or double-tap on iOS 17, nothing happens except that this error appears in the web inspector:

Unhandled Promise Rejection: InvalidStateError: Context is closed - WebRTC.js:67

It seems to relate to the audioContext.resume() method. The error only occurs one time rather than for each press. I was able to reproduce it on the OvenPlayer demo site. Can anybody else reproduce this?

@SangwonOh any idea what could be the cause?

@SangwonOh Is there any help available for this? My iPhone users cant go fullscreen anymore. It's likely affecting your OvenStudio LLHLS product too so it's worth looking into.

@bchah I'll find out as soon as possible

@bchah Full screen seems to work well in iOS 17.1.1.
There are no errors in my inspector. ๐Ÿค”
Which iOS version are you using?

My iPhone is 17.2 beta3, and full screen works fine on my phone as well.

I have no idea why, but I can easily reproduce this on multiple iPhones running the latest iOS release 17.1.1. It's not an issue on iOS 16, or iPadOS.

Here is an iPhone 15 and iPhone 12 both on the same iOS (the web inspector at the end is from the 15):

IMG_0028.mp4

Even stranger is, I found a workaround for now. If you hit the error then reload the page, the player will go fullscreen when you hit play:

IMG_0029.mp4

@bchah Hi ๐Ÿ˜€ It's very strange. I made some code change. Could you test this alpha version?

https://cdn.jsdelivr.net/npm/ovenplayer@0.10.3-3.alpha-1/dist/ovenplayer.min.js

Thank you @SangwonOh - the good news is, 0.10.33 does not cause an error in the Web Inspector ๐Ÿ˜ธ The bad news is, the problem is still happening where the player does not go fullscreen ๐Ÿ˜ฟ I will look closer in a debugger and see what has changed about the code flow in Safari 17 (iOS 17). It could be something with the webkitEnterFullScreen API. ๐ŸŽ๐Ÿคช

@SangwonOh This issue seems to be resolved by iOS 17.2 ๐Ÿ˜