
SolveLLC
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018
12:43 PM
RAF and ad pods
Due to a limitation of our ad server and having multiple demand partners......
Is there a way to tell RAF to play X number of ads regardless of how many are returned in the pod? For example if the pod returns 5 and we want to play 3.
Where does this come from if debug is set "RAF.showAds(); rendering preroll pod of 5 ads"
Is there a way to tell RAF to play X number of ads regardless of how many are returned in the pod? For example if the pod returns 5 and we want to play 3.
Where does this come from if debug is set "RAF.showAds(); rendering preroll pod of 5 ads"
4 REPLIES 4
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2018
03:51 PM
Re: RAF and ad pods
It's a RAF diagnostic. raf.showAds() plays all the ads that it is given, it does not do any selection.
raf.getAds(posn_msg) does select/return a pod from previously parsed pods coming from VMAP/SMRX but this does not seem to be your case.
For your case, i think you'll have to modify the ad-break structure prior to passing it to showAds(), so that it has the number of ads you desire. Rather simple to do. Check the data structure in RAF doco. Or dump it to console with "print formatJSON(ads)", format that in JSON pretty-printer and examine.
raf.getAds(posn_msg) does select/return a pod from previously parsed pods coming from VMAP/SMRX but this does not seem to be your case.
For your case, i think you'll have to modify the ad-break structure prior to passing it to showAds(), so that it has the number of ads you desire. Rather simple to do. Check the data structure in RAF doco. Or dump it to console with "print formatJSON(ads)", format that in JSON pretty-printer and examine.

SolveLLC
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018
08:14 AM
Re: RAF and ad pods
"RokuNB" wrote:
It's a RAF diagnostic. raf.showAds() plays all the ads that it is given, it does not do any selection.
raf.getAds(posn_msg) does select/return a pod from previously parsed pods coming from VMAP/SMRX but this does not seem to be your case.
For your case, i think you'll have to modify the ad-break structure prior to passing it to showAds(), so that it has the number of ads you desire. Rather simple to do. Check the data structure in RAF doco. Or dump it to console with "print formatJSON(ads)", format that in JSON pretty-printer and examine.
Is there a method to return how many valid ads were parsed from getAds?
NB_
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-06-2018
03:40 PM
Re: RAF and ad pods
"SolveLLC" wrote:
Is there a method to return how many valid ads were parsed from getAds?
getAds() returns an array of pods in this format (though i find it easier to dump formatJSON() and work on example, what i recommended), so just taking .count() of that will give you the number of pods. To count the ads per pod, you'll have to drill down a little deeper. But if i recollect, only the valid ads are retained per pod (the slots remaining empty are dropped).

SolveLLC
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-07-2018
09:15 AM
Re: RAF and ad pods
"RokuNB" wrote:"SolveLLC" wrote:
Is there a method to return how many valid ads were parsed from getAds?
getAds() returns an array of pods in this format (though i find it easier to dump formatJSON() and work on example, what i recommended), so just taking .count() of that will give you the number of pods. To count the ads per pod, you'll have to drill down a little deeper. But if i recollect, only the valid ads are retained per pod (the slots remaining empty are dropped).
Thanks!