How to Implement Pre-Roll & Mid-Roll with Brightcove

600 views
Skip to first unread message

tushar maniyar

unread,
Jul 30, 2015, 9:02:13 AM7/30/15
to Interactive Media Ads SDK
Hello ,

 I want Pre-Roll and Mid-Roll ads in my video . Video is playing fine in Brighcowe i want Ads there.  I have Printed NSLog i am getting CuePoints . But how i will get ima ads .

 Please let me with sample code . 

I am attaching my .h and .m file of the project .


I am passing videoIDFullScreen and videoTitle from previous screen .

You can substitute 

videoIDFullScreen  = 3943834746001

videoTitle  = It’s Always Sunny in Philadelphia, Mom, Hot in Cleveland, Lab Rats


Please let me know how can setup Pre-roll and mid-roll   ??



Thanks


FullModeVideoViewController.h
FullModeVideoViewController.m

Tyler Sidell (IMA SDK Team)

unread,
Jul 30, 2015, 3:05:49 PM7/30/15
to Interactive Media Ads SDK, tushar....@gmail.com
Hi Tushar,

I took a look at FullModeVideoViewController.m and the ad tag that you are requesting has a php extension as follows:
I would suggest taking a look at the Getting Started Guides and talking with your account manager about getting prerolls/midrolls creative added to that tag.  Right now there are no prerolls or midrolls in the tag that you are requesting.  This does not look like a valid VAST tag, as I am also noticing t:status="NO_AD".

As for CuePoints, I would suggest taking a look at Ad Rules.

Thanks,
Tyler Sidell
IMA SDK Team

tushar maniyar

unread,
Jul 30, 2015, 4:14:29 PM7/30/15
to Interactive Media Ads SDK, ima-sdk-ad...@google.com

Hello Tyler Sidell,

Thanks for quick reply .  We are using same tag (php url) in Android application and we are getting Advertisement . 


Of course i will ask account manager about getting prerolls/midrolls cretive tag . Code that i have done is Correct ? Is there are any changes required to code in order to implement Pre-roll and mid-roll ?

Thanks
Tushar

Tyler Sidell (IMA SDK Team)

unread,
Jul 30, 2015, 4:37:29 PM7/30/15
to Interactive Media Ads SDK, tushar....@gmail.com
Hi Tushar,

It looks like it may be an issue with your ad tag.  There are no code changes required to specifically get preroll and midroll to work.  The ad tag is requested by the SDK.  If there are prerolls/midrolls serving and specified in the tag XML, then the SDK will do the rest.

When using our Video Suite Inspector, I get the following error:
Ad loading was aborted because maximum number of redirects 4 was exceeded.

You can test your ad tag with one of our Sample Examples and use it as a reference to set up your implementation as well.

Your account manager should also be able to assist to limit your number of redirects.

Thanks,
Tyler Sidell
IMA SDK Team

tushar maniyar

unread,
Jul 31, 2015, 2:14:01 AM7/31/15
to Tyler Sidell (IMA SDK Team), Interactive Media Ads SDK
Hello,

Thanks for the Response .

Do you have any sample code for the IMA Pre-roll and Mid-Roll integration with BrightCove player .  Because i need to integrated with BrightCove player .

My Android developer has found sample code for that but we are not getting that code .


Thanks
Tushar

Tyler Sidell (IMA SDK Team)

unread,
Jul 31, 2015, 1:55:19 PM7/31/15
to Interactive Media Ads SDK, ima-sdk-ad...@google.com, tushar....@gmail.com
Hi Tushar,

We don't have any official sample code of integration with BrightCove's player but you may want to do a search on github to find some examples.  Let me know if you have any specific questions.

Thanks,
Tyler Sidell
IMA SDK Team

tushar maniyar

unread,
Jul 31, 2015, 4:31:47 PM7/31/15
to Tyler Sidell (IMA SDK Team), Interactive Media Ads SDK
Hello,

 I have already checked all codes , i have made code based upon the samples i found . 

Tags that you are telling that is wrong . I have used same Tags in your example code that (Sample Examples) you gave. 

Tags works fine and i am getting Advertisement . 

But problem is in your sample codes AVPlayer is used  i want to use Brighcowe player . But i am not getting Ads on Cue points .

Can you please again check my code again ? 

Thanks
Tushar 

Tyler Sidell (IMA SDK Team)

unread,
Jul 31, 2015, 5:26:13 PM7/31/15
to Interactive Media Ads SDK, ima-sdk-ad...@google.com, tushar....@gmail.com
Hi Tushar,

We have a section of documentation on setting up ad rules for iOS, which also touches upon how to set up these ad breaks without AVPlayer.

Without AVPlayer:
  • Implement the IMAContentPlayhead interface.
  • Implement currentTime to return the current time of your video player.
  • Change your initialization call to the IMAAdsManager to useinitializeWithContentPlayhead:self.
I would also suggest to reach out to BrightCove as well.  They do have a HTML5 guide and they may be able to help you with the IMA implementation.  Here is another resource, full of BrightCove Android implementations.

Thanks,
Tyler Sidell
IMA SDK Team

tushar maniyar

unread,
Aug 1, 2015, 9:32:34 AM8/1/15
to Tyler Sidell (IMA SDK Team), Interactive Media Ads SDK
Hello,

Thanks Tyler ,

 Thanks for help and quick response .  I have made custom class by sub classing . 

 It works Pre-roll , mid-roll etc

Thanks Again
Tushar 

Reply all
Reply to author
Forward
0 new messages