Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HLS (.m3u8 file) always restart the content after mid-Rolls #54

Open
CharlesMcD opened this issue Sep 2, 2021 · 1 comment
Open

HLS (.m3u8 file) always restart the content after mid-Rolls #54

CharlesMcD opened this issue Sep 2, 2021 · 1 comment

Comments

@CharlesMcD
Copy link

CharlesMcD commented Sep 2, 2021

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 :

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.

RPReplay_Final1630557393.MP4
@CharlesMcD
Copy link
Author

A ticket has been opened here https://groups.google.com/u/1/g/ima-sdk/c/YVipmbvJOqc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant