Bug 160852
Summary: | Change in behaviour of playsinline in iOS 10 breaks YouTube functionality | ||
---|---|---|---|
Product: | WebKit | Reporter: | Tony Short <tony.short2> |
Component: | Media | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Major | CC: | eric.carlson, jer.noble, jond, jonlee, mmaxfield |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | iPhone / iPad | ||
OS: | Other |
Tony Short
Our iOS app presenting a YouTube video within a WKWebView is no longer playing inline on loading. The video now starts in Full Screen and the whilst the user can manually make it inline, the previous behaviour was for it to start playing inline.
This changed sometime between iOS 10 beta 2 and beta 5, and this happens on a device running iOS 10 beta 5 (an iPhone 6), but works fine as before on an iOS simulator (launched from XCode 8 beta 5).
The official YouTube helper app, shows this incorrect behaviour: https://github.com/youtube/youtube-ios-player-helper
The problem may well lie in how the YouTube script creates their <video> element, and how they are using webkit-playsonline & playsonline. Another developer has raised this with Google (https://code.google.com/p/gdata-issues/issues/detail?id=8487) and myself on SO (http://stackoverflow.com/questions/38879065/why-dont-youtube-videos-play-inline-in-ios-10-beta-5/38885359#38885359), but no response. We appreciate it may be on YouTube to fix this, but with no quick response we're worried that iOS 10 will be released and it will have significant impact on the UI, and I imagine a lot of apps will be affected by this. I am hoping this can be resolved by either the Webkit or the YouTube team.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Myles C. Maxfield
playsinline is the future. webkit-playsinline is deprecated.
Myles C. Maxfield
https://trac.webkit.org/changeset/203752/trunk/Source/WebCore/html/MediaElementSession.cpp is the change which changes the policy.
Myles C. Maxfield
https://webkit.org/blog/6784/new-video-policies-for-ios/
Tony Short
Thanks. Do you have any contacts in YouTube you could let know about this?
Eric Carlson
Yes, we will discuss this with them.
Tony Short
Thank you - it appears to have just been resolved.