googleads / videojs-ima

IMA SDK Plugin for Video.js
Apache License 2.0
450 stars 284 forks source link

Video content is playing instead of Ad when user enable fullscreen - iOS Safari #864

Closed tonyjose009 closed 4 years ago

tonyjose009 commented 4 years ago

I found this issue recently and it was working till last week.

I'm playing video content on iPhone using playsinline property, it starts playing preroll ad video and when the user clicks on the fullscreen button, the video content is playing in fullscreen player instead of video ad.

And when the user exit from full screen, the video ad is playing the background.

Note:

You can replicate the issue by adding "playsinline" attribute in the below example:

https://googleads.github.io/videojs-ima/examples/advanced/

<video id="content_video" class="video-js vjs-default-skin"
            poster = "../posters/bbb_poster.jpg" controls preload="auto"
            width="640" height="360" playsinline muted="muted">
          <source src="//commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4"
              type="video/mp4" ></source>
        </video>

It would be great if anyone can help to fix this issue

Thanks, Tony

Kiro705 commented 4 years ago

Hi Tony,

If you set disableCustomPlaybackForIOS10Plus to true as part of the additional settings, does that fix the issue?

If not this may be a bug with the videojs plugin.

Thanks, Jackson IMA SDK DevRel

marguinbc commented 4 years ago

It has been our experience that if you are using disableCustomPlaybackForIOS10Plus set to true and playsinline the IMA SDK itself doesn't properly handle or support fullscreen.

This was first mentioned https://ads-developers.googleblog.com/2017/06/new-custom-playback-apis-for-ima-html5.html and in the SDK docs here: https://developers.google.com/interactive-media-ads/docs/sdks/html5/skippable-ads

Specifically: " We do not currently support fullscreen on iPhone with skippable ads."

It would be great if this were not the case as we have customers that want skippable ads but also want to allow people to watch their content fullscreen.

klipstein commented 4 years ago

We also ran into this problem since IMA was upgraded from 3.353.0 to 3.354.0: https://developers.google.com/interactive-media-ads/docs/sdks/html5/v3/history

When using https://imasdk.googleapis.com/prerelease/js/3.353.0/ima3.js and the disableCustomPlaybackForIOS10Plus is set to false, it will use 1 video tag for ad and content playback and the iOS native fullscreen works. When 3.354.0 is used it is using a separate video-tag for ad playback.

tonyjose009 commented 4 years ago

Thanks, @klipstein for your advice, this helped me 👍 Cheers

klipstein commented 4 years ago

@Kiro705 this seems to be a general bug in IMA that was introduced lately. How can this bug be reported to the IMA team?