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: 
Blackhawk
Roku Guru

Inserting preroll ads

 I was studying the "PlayContentWithAds" method and I discovered this

adIface = Roku_Ads()

print "Roku_Ads library version: " + adIface.getLibVersion()

 
http://video.ted.com/talks/podcast/DavidKelley_2002_480.mp4



'adIface.setAdUrl()



Will Preroll works like this?
adIface = Roku_Ads()

print "Roku_Ads library version: " + adIface.getLibVersion()

 

'adIface.setAdUrl()



Or this?

adIface = Roku_Ads()

print "Roku_Ads library version: " + adIface.getLibVersion()


' lengthy (20+ min.) TED talk to allow time for testing multiple ad pods

videoContent = { streamFormat : "mp4" }

videoContent.stream = { url: "http://video.ted.com/talks/podcast/DavidKelley_2002_480.mp4",

bitrate: 800,

quality: false

}



'adIface.setAdUrl()

adPods = adIface.getAds()

playContent = adIface.showAds(adPods) ' show preroll ad pod (if any)

0 Kudos
Community is Temporarily in Read-Only Mode!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

Thanks for your patience — we’re excited to share what’s next!