Yup, that is the official endorsed solution. You can't. Otherwise just don't use RAF. Much like if Roku doesn't allow you to do what you need to get done, just don't use Roku. Makes perfect sense, and your support here is going way above and beyond what anyone had ever expected.
Distinguishing advertisements from content is paramount.
Consistent experience across apps is important, including improvements to ad badge over time.
Keeping this in mind, what do you imagine seeing when playing an ad break consisting of a single ad?
1 of 1 is implied if there isn't an ad counter. It is stupid if you think about it, but nobody thinks about advertising.
I can see how it would be implied, but people might appreciate knowing for sure, instead of wondering if there will be another ad after this one.
You may just override RAF ShowAdCounter field.
Just like this:
Roku_Ads().ShowAdCounter = ShowAdCounterFunc
then you need to define a function:
function ShowAdCounterFunc(par1, par2)
'do nothing
end function
this is helpful. any idea what the parameters (par1 and par2) for ShowAdCounter represent?
You could do something like this:
'use this before showAds()
Roku_Ads().ShowAdCounter = Handler().ShowAdCounter
function Handler()
return {
ShowAdCounter : function (par1, par2)
' set stop here and investigate what is inside
' add some code here to customize the labels
' par1.instance used for labels
' par2 - has time information about ads playing (index/total etc)
end function
}
end function
Note: add enough checking for 'invalid' value to do this code safe.
After debugging you will get enough information to customize labels, add any text, set color, fonts ...
I hope it will help
To disable the "Ad 1 of 1" text in Roku Ad Framework (RAF) when there's only one preroll ad, you can check the ad count in your onAdEvent handler and hide the ad counter text node if the count is 1.