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

ROKU_ADS_CONTENT_ID

What does this macro actually return?  I assumed it would be the content id that we've set for the currently playing video, but it's actually returning the channel name.

ROKU_ADS_CONTENT_LENGTH doesn't get replaced as a macro at all.
0 Kudos
1 Reply
Roku Employee
Roku Employee

Re: ROKU_ADS_CONTENT_ID

"SolveLLC" wrote:
What does this macro actually return?  I assumed it would be the content id that we've set for the currently playing video, but it's actually returning the channel name.

That's a fallback, since you haven't called raf.setContentId(). Do that and it will return whatever you set. You said you set content id already but apparently by some other means... how?

ROKU_ADS_CONTENT_LENGTH doesn't get replaced as a macro at all.

Call raf.setContentLength() first.
See enableAdMeasurements() for shortlist of methods
https://sdkdocs.roku.com/display/sdkdoc/Integrating+the+Roku+Advertising+Framework#IntegratingtheRok...
0 Kudos