"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.
"SolveLLC" wrote:
Is there a method to return how many valid ads were parsed from getAds?
"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).