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

Recommend banner ad sizes VideoPlayer SDK example?

Doesn't say in the SDK what size the Banner Ad HD and SD in the VideoPlayer SDK Sample should be.

I am thinking about using it as a sort of "news" section to update people on what's new with the channel as well as a way of advertising.

Is it possible to script this to be either rotating or random? Any recommendations on tips on where to learn how to do that?
0 Kudos
3 REPLIES 3
RokuJoel
Binge Watcher

Re: Recommend banner ad sizes VideoPlayer SDK example?

See SetAdURL on the IfPosterScreen page

SetAdURL(sdAdURL as String, hdAdURL as String) as Void

Set the URL of the banner ad image to be displayed on the poster screen. This is currently only valid for the "arced-landscape" and "flat-category" style of poster screens. Banner ad sizes are as follows:

Banner Ad HD = 728x90 Banner Ad SD = 540x60


- Joel
0 Kudos
tacticalcity
Visitor

Re: Recommend banner ad sizes VideoPlayer SDK example?

Thank you Joel.
0 Kudos
tacticalcity
Visitor

Re: Recommend banner ad sizes VideoPlayer SDK example?

Turns out I am more lost than I thought.

I tried just uncommenting the following in the category.xml file

 <!-- banner_ad sd_img="http://fanboitv.dynu.com/fanboitv/images/banner.gif" hd_img="http://fanboitv.dynu.com/fanboitv/images/banner_hd.gif"-->


Making it look like this...

 <banner_ad sd_img="http://fanboitv.dynu.com/fanboitv/images/banner.gif" hd_img="http://fanboitv.dynu.com/fanboitv/images/banner_hd.gif">


That broke the application.

Then I realized that you were telling me I needed to add some code to one of the .brs files. So I started opening them and looking for something containing "setAd" and I found this code...


screen.setAdDisplayMode("scale-to-fit")


in the rsHomeScreen.brs file.

Problem is that I have zero clue how to modify the code you gave me to work here.

The code surrounding the above code looks like this...

'******************************************************
'** Perform any startup/initialization stuff prior to
'** initially showing the screen.
'******************************************************
Function preShowHomeScreen(breadA=invalid, breadB=invalid) As Object

if validateParam(breadA, "roString", "preShowHomeScreen", true) = false return -1
if validateParam(breadA, "roString", "preShowHomeScreen", true) = false return -1

port=CreateObject("roMessagePort")
screen = CreateObject("roPosterScreen")
screen.SetMessagePort(port)
if breadA<>invalid and breadB<>invalid then
screen.SetBreadcrumbText(breadA, breadB)
end if

screen.SetListStyle("flat-category")
screen.setAdDisplayMode("scale-to-fit")
return screen

End Function


So what do I do now?
0 Kudos