IMA iOS 3.2.1 - IMAContentPlayhead currentTime no longer called -- IMA iOS Beta 15 - iOS 8 crash

66 views
Skip to first unread message

Yanick Castonguay

unread,
Aug 8, 2016, 5:28:28 PM8/8/16
to Interactive Media Ads SDK
Hello,

I am trying to upgrade the IMA iOS SDK from beta 15 to 3.2.1. Everything seems to work well, except that the midrolls and endrolls no longer work as we never receive the adsManagerDidRequestContentPause event after the prerolls.

After a bit of investigation, I see that the currentTime property is no longer evaluated in our implementation of the IMAContentPlayhead protocol. If I revert to beta 15, the property is evaluated again. I did pass the content playhead through the new initWithAdTagUrl:adDisplayContainer:contentPlayhead:userContext initializer of IMAAdsRequest.

I also tried using the newer initializer for IMAAdsRequest (initWithAdTagUrl:adDisplayContainer:avPlayerVideoDisplay:pictureInPictureProxy:userContext) but that forces us to start playing the content earlier in AVPlayer, and that would require rewriting a lot of code. Additionally, we are also using a third party player that doesn't expose the instance of AVPlayer, so that would mean not having ads for the content requiring this player (we sometimes use this player because of DRM). So using IMAAVPlayerContentPlayhead rather than our own implementation of IMAContentPlayhead is out of question for us. 

So could you help us understand why the currentTime property is no longer evaluated? 

----

Additionally, we have observed that since August 2nd, all iOS 8 devices crash on preroll playback; our current version of our app uses IMA Beta 15. The app crashes systematically at the start of any preroll, and the stack trace points to an exception within the web view in your SDK. When upgrading to IMA 3.2.1, this issue is no longer reproducible.

----

I can provide our video player source code if needed. I can reproduce the issue 100% on any iOS device and version (iOS 8+).

Thanks for your help,
Yanick

Veer Arjun Busani

unread,
Aug 9, 2016, 10:25:49 AM8/9/16
to Interactive Media Ads SDK
Hi Yanick,

Have you tried to replicate this with our sample apps? I have just now use this object to add a KVO and it works. Do note that IMAAVPlayerContentPlayhead now requires an AVPlayer object to track this event so this could be the reason your third party player is not tracked. However, do send us your sample app and we would have a look into this.

Also, as to your crashes with IMA Beta 15, if you are not able to reproduce with our latest version of the SDK, it might just be an issue that was fixed. 

Here is my implementation -

Adding the KVO[self.contentPlayhead addObserver:self forKeyPath:@"currentTime" options:0 context:@"playHeadTime"];

And the Observer:
- (void)observeValueForKeyPath:(NSString *)keyPath
                      ofObject:(id)object
                        change:(NSDictionary *)change
                       context:(void *)context {


    if (context == @"playHeadTime" && self.contentPlayhead == object) {
        NSLog(@"Content Playhead current time %f", self.contentPlayhead.currentTime);
    }
}

Thanks,
Veer Busani
IMA SDK Team
Reply all
Reply to author
Forward
0 new messages