HTML5 SDK - Inline Video on iOS instead of Fullscreen

1,598 views
Skip to first unread message

Junting Lu

unread,
Aug 11, 2016, 8:04:35 PM8/11/16
to Interactive Media Ads SDK
Hello,

I've been trying to see if I could find this information in the documentation, but didn't come up with anything.

On an iOS device, using the HTML5 SDK, is inline video possible? Seems to be defaulting to fullscreen, which is typical iOS behavior (with the exception of iOS 10).

Any help would be great, thanks!

- Junting

Binny Patel (IMA SDK Team)

unread,
Aug 12, 2016, 11:16:02 AM8/12/16
to Interactive Media Ads SDK
Hi Junting,

On iOS, the HTML5 SDK doesn't render the ad inline, As the iOS renders video ads fullscreen by default. Let us know if you have any other questions.

Thanks,
Binny Patel
IMA SDK Team

Junting Lu

unread,
Aug 12, 2016, 12:40:55 PM8/12/16
to Interactive Media Ads SDK
Thanks so much! 

Considering iOS10 supports inline video, is there a plan for the SDK to support inline video on that version of iOS?

- Junting

Binny Patel (IMA SDK Team)

unread,
Aug 12, 2016, 4:08:15 PM8/12/16
to Interactive Media Ads SDK
Hi Junting,

You can try this workaround for iOS v10.0 on Safari by adding the controls webkit-playsinline attribute to the video element. You can have a look at my sample example here which is working fine for me. Let me know if this helps to solve your issue. 

Thanks  
Binny Patel
IMA SDK Team

Junting Lu

unread,
Aug 18, 2016, 5:06:02 PM8/18/16
to ima...@googlegroups.com
Hey Binny,

Thanks for your workaround! It'll definitely come in handy once iOS 10 is out.

I do have a follow up question for you though with regards to these two iOS settings: allowsInlineMediaPlayback & mediaPlaybackRequiresUserAction.

If those are set to true and false, respectively, is inline video playback and video autoplay possible?

Thanks!

- Junting

--
You received this message because you are subscribed to a topic in the Google Groups "Interactive Media Ads SDK" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ima-sdk/GF5YXNwS_Kw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.
To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.



--

Junting Lu
Application Engineer
jun...@truex.com :: www.truex.com


Tyler Sidell (IMA SDK Team)

unread,
Aug 19, 2016, 9:56:51 AM8/19/16
to Interactive Media Ads SDK
Hi Junting,

Binny is OOO today so I will be assisting on this topic.  Setting allowsInlineMediaPlayback to true will not allow inline video playback as this variable only declares if a video is playable inline but it does not mandate this behavior.  You would still need to set the webkit-playsinline attribute.

Thanks,
Tyler Sidell
IMA SDK Team
To unsubscribe from this group and all its topics, send an email to ima-sdk+u...@googlegroups.com.

To post to this group, send email to ima...@googlegroups.com.
Visit this group at https://groups.google.com/group/ima-sdk.
For more options, visit https://groups.google.com/d/optout.

Junting Lu

unread,
Aug 19, 2016, 1:51:09 PM8/19/16
to ima...@googlegroups.com
Thanks Tyler! Your reply is consistent with what found in our investigations yesterday.

- Junting

To unsubscribe from this group and all its topics, send an email to ima-sdk+unsubscribe@googlegroups.com.

Daniel Szabo

unread,
Aug 25, 2016, 1:41:39 PM8/25/16
to Interactive Media Ads SDK
Hello Binny,

according to this webkit blog https://webkit.org/blog/6784/new-video-policies-for-ios/ the "webkit-" prefix has been removed from the attribute.
Could you update the HTML5 SDK to mirror this change?

Currently, video ads will start fullscreen even in webapps on an iPhone using iOS 10 beta 7.

Thanks,

Daniel

Binny Patel (IMA SDK Team)

unread,
Aug 25, 2016, 3:47:26 PM8/25/16
to Interactive Media Ads SDK
Hi Daniel,

Thanks for getting in touch.  The webkit prefix was just a workaround for the CSS cross-browser issue on Safari. The IMA SDK for iOS devices only play in fullscreen mode. Let me know if you have any other questions.

Thanks,
Binny Patel
IMA SDK Team

Daniel Szabo

unread,
Aug 26, 2016, 6:59:39 AM8/26/16
to Interactive Media Ads SDK
Hi Binny,

I'm not talking about the IMA SDK for iOS.
It's the IMA HTML5 SDK.
The SDK appends the "webkit-playsinline" attribute to the video element.
In your example posted in this thread you use this tag too, so that the video and the ad play inline.
Also, we use the IMA HTML5 SDK on iOS to play video ads in a webapp and these videos play inline.
Until now, because in iOS 10 the attribute's name has changed.
That's why I'm asking you to change the attribute's name in the SDK for iOS 10+.

Thanks,

Daniel

Daniel Szabo

unread,
Aug 26, 2016, 7:03:56 AM8/26/16
to Interactive Media Ads SDK
instead of " in the SDK for iOS 10+" I mean "in the HTML5 SDK on iOS 10+"

Binny Patel (IMA SDK Team)

unread,
Aug 26, 2016, 12:33:58 PM8/26/16
to Interactive Media Ads SDK
Hi Daniel,

The IMA SDK by default doesn't have any browser specific attribute for the HTML5 element (For more details you can have look to the Get Started laying out your HTML). You can change controls webkit-playsinline to the playsinline from your side according to specific devices and versions

Thanks
Binny Patel
IMA SDK Team

Daniel Szabo

unread,
Aug 27, 2016, 5:19:26 AM8/27/16
to Interactive Media Ads SDK
Hi Binny,

Sorry, I have to repeat myself.
The IMA HTML5 SDK does add the "webkit-playsinline" attribute to the video element it creates.
This is the element that was created by the AdsManager:

<video style="background-color: rgb(0, 0, 0); position: absolute; width: 100%; height: 100%;" title="Advertisement" webkit-playsinline="true" src="https://redirector.gvt1.com/videoplayback/id/dfc531a2c1c8a609/itag/44/source/gfp_video_ads/requiressl/yes/acao/yes/ip/0.0.0.0/ipbits/0/expire/1472310564/sparams/ip,ipbits,expire,id,itag,source,requiressl,acao/signature/62E11F2D1B1B164B3ECCDF2F9CEF7315254B025D.5F3CE204F2E10298EC1EB9451F69D2D1F0DCBD6B/key/ck2/file/file.webm"></video>

You can see the "webkit-playsinline" attribute is there. We cannot alter this attribute, since the element was created by the AdsManager. We do not have any own video element, since we are using the IMA HTML5 SDK for games.

What I'm asking, please change the "webkit-playsinline" to "playsinline" (or add both attributes), since the prefix has been removed from WebKit and Safari does not support the prefixed version on iOS10 any more.

Thanks,

Daniel

Binny Patel (IMA SDK Team)

unread,
Aug 29, 2016, 12:23:41 PM8/29/16
to Interactive Media Ads SDK
Hi Daniel,

Thanks for all that information. Apple's documentation still lists webkit-playsinline attribute as valid, so we still have to follow the same attribute for the video element.

Thanks,
Binny Patel
IMA SDK Team

Daniel Szabo

unread,
Aug 30, 2016, 5:38:14 AM8/30/16
to Interactive Media Ads SDK
Hello Binny,

I know that Apple's out-dated docs list the prefixed attribute, that's where I started troubleshooting.
Finally,I found the WebKit blog I posted earlier: https://webkit.org/blog/6784/new-video-policies-for-ios/
The blog entry seems pretty "official" to me, and it explained why webkit-playsinline wouldn't work anymore: it's part of the HTML specs now.
I tested both the prefixed attribute and the the unprefixed one and both iOS 10 beta 7 and 8 (released 3 days ago) support only the unprefixed one.
I don't think they will revert to the prefixed attribute when iOS 10 is out in two weeks.
I thought it would be better to prepare for iOS 10 than to fix broken things when it's out.

Daniel

Binny Patel (IMA SDK Team)

unread,
Sep 6, 2016, 4:01:12 PM9/6/16
to Interactive Media Ads SDK
Hi Daniel,

I have taken your feedback to the rest of my team. We will let you know once we have an update.

Thanks,
Binny Patel
IMA SDK Team

Daniel Szabo

unread,
Sep 30, 2016, 3:59:37 AM9/30/16
to Interactive Media Ads SDK
Hello Binny,

I just wanted to bring to your attention that Apple has updated their docs. They are referring to playsinline now, without the webkit- prefix.

Thanks,

Daniel Szabo

Binny Patel (IMA SDK Team)

unread,
Sep 30, 2016, 12:55:04 PM9/30/16
to Interactive Media Ads SDK
Hi Daniel,

Thanks for the update. Your account manager has already opened a ticket for this. We are working on it and will let you know once we have an update.

Thanks,
Binny Patel
IMA SDK Team

Reply all
Reply to author
Forward
0 new messages