Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
helpus
Level 7

Adding Preroll Advertisements to VideoPlayer Template

How to correctly add your advertisements to the channel?
0 Kudos
2 Replies
Roku Employee
Roku Employee

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
Level 7

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