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

how to use multiple ads using RAF (Roku Ad Framework)

I am using VAST sample XML for ads. I am using multiple xml files to get adds from different sources.

adIface = Roku_Ads()
adIface.setAdUrl("http://10.111.133.22:9000/abc.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/def.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/ghi.xml")
adPods = adIface.getAds()
adIface.setAdUrl("http://10.111.133.22:9000/jkl.xml")
adPods = adIface.getAds()

' While printing ads , we are getting single ad from abc.xml file.

print "***********************************"
print "***********************************"
print "***********************************"
for each ar in adPods
print "ads:::::::: " formatJSON(ar,0)
end for

print "***********************************"
print "***********************************"
print "****

' While defining multiple ads in single xml file ( for eg: all ads in xyz.xml) , we are getting top ad element defined in xyz.xml

adIface = Roku_Ads()
adIface.setAdUrl("http://10.111.133.22:9000/xyz.xml")
adPods = adIface.getAds()


I want to know how to get multiple ads from different sources or single source and returned in adPods array.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.