uxicorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2016
02:47 PM
Simplest possible way to integrate Roku- sourced ad feed?
The documentation is fuzzy on this. Is this the right way?
bs_libs_required=roku_ads_lib goes in manifest
Library "Roku_Ads.brs" - where does this go? Main? If so, where in Main?
adIface = Roku_Ads() - where does this go? Main? If so, where in Main?
The getting started doc says that's all we need to get started. I just want a single preroll ad on each video whenever the video plays. Will doing the above achieve this?
bs_libs_required=roku_ads_lib goes in manifest
Library "Roku_Ads.brs" - where does this go? Main? If so, where in Main?
adIface = Roku_Ads() - where does this go? Main? If so, where in Main?
The getting started doc says that's all we need to get started. I just want a single preroll ad on each video whenever the video plays. Will doing the above achieve this?
6 REPLIES 6
EnTerr
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2016
10:37 AM
Re: Simplest possible way to integrate Roku- sourced ad feed
To quote Komag, "welcome to Roku world!" :). Yes, documentation is fuzzy on many things but you are almost there. Here:
ok = false
RAF = Roku_Ads()
if RAF <> invalid:
' RAF.setAdUrl(ad_url) 'use if assigned custom URL
pods = RAF.getAds()
ok = RAF.showAds(pods)
end if
uxicorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2016
09:54 PM
Re: Simplest possible way to integrate Roku- sourced ad feed
"EnTerr" wrote:
To quote Komag, "welcome to Roku world!" :). Yes, documentation is fuzzy on many things but you are almost there. Here:ok = false
RAF = Roku_Ads()
if RAF <> invalid:
' RAF.setAdUrl(ad_url) 'use if assigned custom URL
pods = RAF.getAds()
ok = RAF.showAds(pods)
end if
Thank you! What file does the above go in?
What about these two things?
Library "Roku_Ads.brs" - where does this go? Main? If so, where in Main?
adIface = Roku_Ads() - where does this go? Main? If so, where in Main?

BCVatOVG
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016
05:18 PM
Re: Simplest possible way to integrate Roku- sourced ad feed
Library "Roku_Ads.brs"
Goes a the top of main file (outside of any functions)
adIface = Roku_Ads() goes in whatever function you are trying to set up the ads/play the ads.
In the case of the code you posted the adIface variable is actually RAF. so RAF = Roku_Ads() sets up the RAF variable, RAF.setAdUrl(ad_url) sets up a custom VMAP or VAST url, pods = RAF.getAds() will load the ads into the pods variable, ok = RAF.showAds(pods) will load and play the ads if there are any.
Goes a the top of main file (outside of any functions)
adIface = Roku_Ads() goes in whatever function you are trying to set up the ads/play the ads.
In the case of the code you posted the adIface variable is actually RAF. so RAF = Roku_Ads() sets up the RAF variable, RAF.setAdUrl(ad_url) sets up a custom VMAP or VAST url, pods = RAF.getAds() will load the ads into the pods variable, ok = RAF.showAds(pods) will load and play the ads if there are any.
uxicorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2016
09:30 PM
Re: Simplest possible way to integrate Roku- sourced ad feed
Hmmm...I'm more confused now than ever. I'm not a coder and just want to put ads on my channel. Do you have sample code I can cut and paste? Or maybe a simple Step 1, Step 2, etc.
"BCVatOVG" wrote:
Library "Roku_Ads.brs"
Goes a the top of main file (outside of any functions)
adIface = Roku_Ads() goes in whatever function you are trying to set up the ads/play the ads.
In the case of the code you posted the adIface variable is actually RAF. so RAF = Roku_Ads() sets up the RAF variable, RAF.setAdUrl(ad_url) sets up a custom VMAP or VAST url, pods = RAF.getAds() will load the ads into the pods variable, ok = RAF.showAds(pods) will load and play the ads if there are any.

BCVatOVG
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2016
10:48 AM
Re: Simplest possible way to integrate Roku- sourced ad feed
"uxicorp" wrote:
I'm not a coder
How did you create a channel in the first place?
There is no "cut and paste" implementation for RAF without understanding the basics of BrightScript. Without your app code, I have no idea how you are playing videos or how to guide you to in setting up RAF to play video ads. I suggest you find or hire a coder to help you.
uxicorp
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2016
08:02 AM
Re: Simplest possible way to integrate Roku- sourced ad feed
I just used the videoplayer example and just followed the guides to swapping the content.