-
Notifications
You must be signed in to change notification settings - Fork 42
Description
Device: iPhone 11 pro
OS: iOS 14.7.1
GoogleAds-IMA-iOS-SDK: 3.14.4 (also observed on 3.14.3)
Using your swift AdvancedExample, I can easily reproduce a bug that always makes the content restart at the beginning after mid-Rolls when using a .m3u8
file.
In the sample app there are these 4 URLs and the last two are problematic :
- https://storage.googleapis.com/gvabox/media/samples/stock.mp4
- https://storage.googleapis.com/gvabox/media/samples/android.mp4
- http://googleimadev-vh.akamaihd.net/i/big_buck_bunny/bbb-,480p,720p,1080p,.mov.csmil/master.m3u8 <-- These
- http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8 <-- These
If you select the "AdRules" option in the app, which uses bipbopall.m3u8
, you'll see that the content will go back at the beginning every time the midRoll ends. The bug does not occur when using an MP4 file, but I was able to reproduce it with all the HLS files in my project.
The bug seems to occurs when using the new way of creating a IMAAdsRequest
that support Picture in Picture.
let request = IMAAdsRequest(adTagUrl: adTagUrl,
adDisplayContainer: createAdDisplayContainer(),
avPlayerVideoDisplay: IMAAVPlayerVideoDisplay(avPlayer: contentPlayer),
pictureInPictureProxy: pictureInPictureProxy,
userContext: nil)
// IMAAdsRequest.h
- (instancetype)initWithAdTagUrl:(NSString *)adTagUrl
adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
avPlayerVideoDisplay:(IMAAVPlayerVideoDisplay *)avPlayerVideoDisplay
pictureInPictureProxy:(IMAPictureInPictureProxy *)pictureInPictureProxy
userContext:(id)userContext API_AVAILABLE(ios(9.0), tvos(14.0));
If I change the code to use the old version (the one that doesn't support PIP), it does not happen.
let request = IMAAdsRequest(adTagUrl: adTagUrl,
adDisplayContainer: createAdDisplayContainer(),
contentPlayhead: contentPlayhead,
userContext: nil)
// IMAAdsRequest.h
- (instancetype)initWithAdTagUrl:(NSString *)adTagUrl
adDisplayContainer:(IMAAdDisplayContainer *)adDisplayContainer
contentPlayhead:(NSObject<IMAContentPlayhead> *)contentPlayhead
userContext:(id)userContext NS_DESIGNATED_INITIALIZER;
Please see the video attached below to see the bug reproduced with the advanced example app. MidRoll ad start at around 27 seconds into the video.