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

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 1
RokuNB
Roku Guru

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