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
"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
"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.
"uxicorp" wrote:
I'm not a coder
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. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
We're sorry for this disruption — we’re excited to share what’s next!
For support, visit support.roku.com.