Is there a way we could put rotating banner ads on the poster screen? thanks.
You could implement something on the server side. Point the adURLs on the poster screen at a script on your servers that has the rotation logic in it and redirects to the appropriate image. You might also have to re-set the adURLs using a timestamp/cachebuster parameter anytime you wanted the banner to change. I’ve done the first part before, but not the second part. It should definitely be possible.
thanks ill look into it.
so would the timestamp / cachebuster run on the server side or the roku box? thanks.
“uarlive” wrote:
so would the timestamp / cachebuster run on the server side or the roku box? thanks.
The roku would request a url with a parameter formed similar to this: http://server/rotating-image-script.php?20110318124302
It guarantees that the device (and any possible proxies between it and the server) aren’t using cached content. It doesn’t have to be a timestamp, just as long as it’s reasonably unique. On the server side, you can essentially ignore the timestamp/unique string, and just rotate the ad as desired and return an image when the script is called.
Like RokuChris mentioned, you would need to re-set the adurls in the Roku code for the banner to change without leaving the poster screen(I think, I’m getting beyond my knowledge limit here).
thanks. the one issue i forgot to mention is the ads are clickable and play a video as well. how would that effect this solution? thanks. the code below is the function that is called from isAdSelected which plays the video ad.
Sub AdVideo()
videoScreen = CreateObject("roVideoScreen")
port = CreateObject("roMessagePort")
videoScreen.SetMessagePort(port)
episode = {
Stream: { Url: ".mp4"}
StreamFormat: "mp4"
}
videoScreen.SetContent(episode)
videoScreen.Show()
while true
msg = wait(0, videoscreen.GetMessagePort())
if type(msg) = "roVideoScreenEvent" then
if msg.isScreenClosed() then
exit while
endif
endif
end while
End Sub
“uarlive” wrote:
thanks. the one issue i forgot to mention is the ads are clickable and play a video as well. how would that effect this solution? thanks. the code below is the function that is called from isAdSelected which plays the video ad.Sub AdVideo() videoScreen = CreateObject("roVideoScreen") port = CreateObject("roMessagePort") videoScreen.SetMessagePort(port) episode = { Stream: { Url: ".mp4"} StreamFormat: "mp4" } videoScreen.SetContent(episode) videoScreen.Show() while true msg = wait(0, videoscreen.GetMessagePort()) if type(msg) = "roVideoScreenEvent" then if msg.isScreenClosed() then exit while endif endif end while End Sub ```I don't know if this would be the most efficient way to do it, but I'd probably do a second request, as a roURLTransfer object, and then getToString the id or complete url of the proper video to play. Use the same timestamp/unique string on the request to prevent caching, and the same logic on the server side for deciding when to rotate, only instead of returning the image for the ad, you return a string that your app can use to pull the video. I'd provide example code, but I'm really not strong enough in brightscript to pull it off. There might be a more elegant solution, hopefully someone else can chime in with some code :).
“uarlive” wrote:
thanks. the one issue i forgot to mention is the ads are clickable and play a video as well. how would that effect this solution? thanks. the code below is the function that is called from isAdSelected which plays the video ad.
Or, to accomplish the same thing without the extra hit to your servers, have your rotation script return a chunk of XML that contains both the banner URLs and the associated video URLs and any other metadata needed for your ad experience.
ok so if i have a php script to rotate the banners and that part works on the server. what do i need to return to setURL to show the banner on the roku box? thanks for all the help. i have tried using html and placing the complete setURL command with image path in the txt file that gets rotated.
