justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 379 forks source link

playsinline option not working on iOS #651

Closed benliu01 closed 7 years ago

benliu01 commented 7 years ago

Hi,

I'm working on a webapp that embeds the interactive Twitch player. It requires the video be played inline. I'm adding the "playsinline: true" parameter to my options object, but the video is still being forced into the native iOS fullscreen player.

Looking a bit further into it, the html5 video element embedded in my app has the "webkit-playsinline". From the article here: https://webkit.org/blog/6784/new-video-policies-for-ios/, it looks like webkit is transitioning to the "playsinline" attribute. And when I manually added in the "playsinline" attribute via the inspector, the video correctly plays inline.

Would it be possible to change the interactive embed player to use the playsinline attribute instead of the webkit-playsinline? Or maybe just use both?

I'm using iOS 10.1.1 and Safari 10.0.

Thanks! And please let me know if you need any more info, or if I am just doing something wrong.

DallasNChains commented 7 years ago

Hey, @benliu01!

Can you check and see if you're still having this problem?

benliu01 commented 7 years ago

Awesome, gave it a try and its fine now! Thanks for the fix!