Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Search instead for 
Did you mean: 
Blackhawk
Level 7

Play video with ad

 I'm using Video Player channel to play the channel, but I want the channel to play with ads
I cant get it to play because of this
appDetailScreen:
if type(msg) = "roSpringboardScreenEvent" then

if msg.isScreenClosed()

print "Screen closed"

exit while

else if msg.isRemoteKeyPressed()

print "Remote key pressed"

if msg.GetIndex() = remoteKeyLeft then

showIndex = getPrevShow(showList, showIndex)

if showIndex <> -1

refreshShowDetail(screen, showList, showIndex)

end if

else if msg.GetIndex() = remoteKeyRight

showIndex = getNextShow(showList, showIndex)

if showIndex <> -1

refreshShowDetail(screen, showList, showIndex)

end if

endif

else if msg.isButtonPressed()

print "ButtonPressed"

print "ButtonPressed"

if msg.GetIndex() = 1

PlayStart = RegRead(showList[showIndex].ContentId)

if PlayStart <> invalid then

showList[showIndex].PlayStart = PlayStart.ToInt()

endif

showVideoScreen(showList[showIndex])

refreshShowDetail(screen,showList,showIndex)

PlayVideoWithAd(videoContent)

endif

if msg.GetIndex() = 2

showList[showIndex].PlayStart = 0

showVideoScreen(showList[showIndex])

refreshShowDetail(screen,showList,showIndex)

playWithRaf: CustomAdBufferingScreen

endif

if msg.GetIndex() = 3

endif

print "Button pressed: "; msg.GetIndex(); " " msg.GetData()

end if

else

print "Unexpected message class: "; type(msg)

end if

end while



Is there any way to fix this problem
0 Kudos