Your Digital Media Has Never Looked So Good

 
User avatar
SolveLLC
Topic Author
Posts: 305
Joined: Mon Aug 02, 2010 1:38 pm

RAF and ad pods

Wed Feb 07, 2018 1:43 pm

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"
 
User avatar
RokuNB
Posts: 398
Joined: Fri Mar 31, 2017 2:22 pm

Re: RAF and ad pods

Wed Feb 07, 2018 4:51 pm

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.
 
User avatar
SolveLLC
Topic Author
Posts: 305
Joined: Mon Aug 02, 2010 1:38 pm

Re: RAF and ad pods

Tue Mar 06, 2018 9:14 am

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?
 
User avatar
RokuNB
Posts: 398
Joined: Fri Mar 31, 2017 2:22 pm

Re: RAF and ad pods

Tue Mar 06, 2018 4:40 pm

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).
 
User avatar
SolveLLC
Topic Author
Posts: 305
Joined: Mon Aug 02, 2010 1:38 pm

Re: RAF and ad pods

Wed Mar 07, 2018 10:15 am

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!

Who is online

Users browsing this forum: No registered users and 4 guests