I have an app that uses Google IMA SDK v3 for iOS. This allows me to run pre-roll, mid-roll and post-rolls adverts around an item of video content.
When initialising my IMAAdsRequest object, I pass in a URL that points to an Ad Pod of ads that cover the full set of ads I want to play.
Google IMA has a really good feature whereby it monitors the playback of your video and calls a delegate method when it needs the app to pause the video to play some ads. When an ad break finishes, it calls another delegate method to get the content to resume again.
Moreover, for each ad in an ad break it sends the app some useful info like the adId, its duration and so on. However, it doesn't appear to provide any info that allows the app to know if the ad currently played is a pre-roll or mid-roll.
Is there a way to get Google IMA to give me this information?
Pre-rolls I can work out because the playhead will be at or near zero.
Post-rolls I can work out because the content has finished and I detect this.
But for mid-rolls, I know it's a mid-roll but I don't know which ad-break it belongs to.