Adding a video ad

Hi everyone,

I’m a beginner developing a Roku app using BrightScript. The app is finished and working correctly on multiple Roku TVs, but I’m having trouble adding a test advertisement using the Roku Advertising Framework (RAF).

I’ve tried following the official documentation, but I can’t get a test ad to play before or after my video. I’m sure I’m missing something basic.

Is there anywhere I can find a working ZIP example with the correct implementation? Just a minimal app that shows a test ad would be super helpful.

Thanks in advance for any help!

You may want to have a look at the GitHub project I wrote to assist in creating a Roku channel. It uses a JSON feed file and produces a zip file that can be sideloaded to a Roku device. You can unzip the file and take a look at the BrightScript code that handles displaying ads.

Something may be going on with your ad tag. Make sure it’s configured correctly and is serving ads. Google has a tool for testing VAST ad tags:

https://googleads.github.io/googleads-ima-html5/vsi/

There’s also a link on that page to some sample ad tags you can test with.

Another suggestion, after calling setAdUrl() on the RAF instance, check to see what comes back from getAds().