Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why don't YouTube videos play inline in iOS 10 beta 5?

I'm finding with the latest iOS 10 beta 5 that YouTube videos do not play inline on devices (my iPhone 6), but they do on the simulator.

I believe this is new behaviour changed from earlier iOS betas.

The videos play, but are shown full screen. For example, using the YouTube helper library, calling

[self.playerView loadWithVideoId:@"M7lc1UVf-VE" playerVars:@{ @"playsinline" : @(1) }];

Any ideas how to get the videos playing inline again?

like image 769
Tonester Avatar asked Aug 10 '16 16:08

Tonester


People also ask

What is inline player in youtube?

The inline player lets you fast forward, rewind, and watch videos while you browse the Home tab . As you scroll through your Home feed and search results, videos will begin to play on mute with captions auto-enabled. When you browse the Home tab, you can also turn on sound in the inline player.

What does plays inline mean?

controls playsinline></video> Mobile browsers, will play the video right where it is instead of the default, which is to open it up fullscreen while it plays.


1 Answers

Ok I ended up having to submit a bug through youtube for this which you can find here. The problem is that, according to the official webkit blog. They have deprecated the properties returned by playsinline which is 'webkit-playsinline' that is embedded into the iframe. Instead, after beta 2 they are now using 'playsinline' which youtube is not yet adding. Without this property being returned by youtube inside the iFrame. They best you can expect is the viewer will go full screen initially and allow the user to return to its normal inline-size while playing. Heres the excerpt from the blog.

A note about the playsinline attribute: this attribute has recently been added to the HTML specification, and WebKit has adopted this new attribute by unprefixing its legacy webkit-playsinline attribute. This legacy attribute has been supported since iPhoneOS 4.0, and accordance with our updated unprefixing policy, we’re pleased to have been able to unprefix webkit-playsinline. Unfortunately, this change did not make the cut-off for iOS 10 Developer Seed 2. If you would like to experiment with this new policy with iOS Developer Seed 2, the prefixed attribute will work, but we would encourage you to transition to the unprefixed attribute when support for it is available in a future seed.

Edit: This is now fixed as of Aug 25th, 2016! Hurray!

like image 126
Nathan Kellert Avatar answered Sep 23 '22 06:09

Nathan Kellert