Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
helpus
Visitor

Adding Preroll Advertisements to VideoPlayer Template

How to correctly add your advertisements to the channel?
0 Kudos
2 REPLIES 2
RokuNB
Roku Guru

Re: Adding Preroll Advertisements to VideoPlayer Template

That very much depends on what you are doing - but read https://sdkdocs.roku.com/display/sdkdoc ... +Framework
In the simplest case it's just a few lines of code - but can get very complicated/advanced/flexible if needed
0 Kudos
Blackhawk
Roku Guru

Re: Adding Preroll Advertisements to VideoPlayer Template

On mine, i got pretty far.
Add this code:
PlayContentWithFullRAFIntegration(episode)
Under "screen.show" on appvideoscreen then copy FullRAFIntegration sctipt into your videoplayer channel. Replace "videoContent" with "episode" on FullRAFIntegration then replace "playVideoContent" with "SetContent" then replace all "adiface" with "RAF" then take out adiface.setURL
The ads will work but the it wont load the video
0 Kudos