iOS SDK, what to put in initializeWithContentPlayhead if not using AVPlayer?

510 views
Skip to first unread message

Donny Cheng

unread,
Oct 29, 2013, 5:06:33 AM10/29/13
to ima...@googlegroups.com
Hi Guys,

What should I put to "initializeWithContentPlayhead" if I am not using an AVPlayer?

Currently I put "nil" to it:

[self.adsManager initializeWithContentPlayhead:nil adsRenderingSettings:settings];


but it returns me error:

Error during ad playback: Content playhead was not used, but ad playlist served.(1205, 2)


though it can run normally, but I just want to remove the error.

Thanks


Bret McGowen

unread,
Oct 31, 2013, 4:33:22 PM10/31/13
to ima...@googlegroups.com
Donny,

I'll check into this and get back to you. What happens if you pass in nil to default to standard rendering settings?

Thanks,
Bret

Donny Cheng

unread,
Oct 31, 2013, 10:35:00 PM10/31/13
to ima...@googlegroups.com
Hi Bret,

There does not seem to be anything, the app still works perfectly, but there is an error message in the log:
Error during ad playback: Content playhead was not used, but ad playlist served.(1205, 2)

I wonder if it would have some "hidden" abnormal behavior to my app in the future.
Or it is the expected log to be printed when putting nil to it?
I am just wondering.

So I will wait for you to get back to me.

Thanks,
Donny

Bret McGowen

unread,
Nov 1, 2013, 10:14:10 AM11/1/13
to ima...@googlegroups.com
Donny,

Create a new class that implements IMAContentPlayhead (https://developers.google.com/interactive-media-ads/docs/sdks/ios/v3/apis#IMAContentPlayhead) and pass that in to initializeWithContentPlayhead, that should remove the error. Let me know!

Thanks,
Bret (IMA SDK Team)

Donny Cheng

unread,
Nov 3, 2013, 9:52:10 PM11/3/13
to ima...@googlegroups.com
Thanks Bret,

It works perfectly!

Donny
Reply all
Reply to author
Forward
0 new messages