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: 
newchannel
Roku Guru

Seeking Help With The Following

Hi,

I would like to have some assistance on how to add the following to my channel. I have a private channel and in the process of making changes to submit as public. I'm going to just list some things here that I need to change and if you can lend some guidance that would be great. (Also, if you would like to help me test the channel the code is VTNbeta)

1. I apparently used roVideoScreen and should have used roVideoPLayer so viewers can't fast forward through the advertisements. Is there a simple fix to either stop the FF in roVideoScreen of the pre-roll ads or do I have to change over to roVideoPlayer? If I have to change to roVideoPlayer, how do I do this change? I'm still in learning mode and not sure.

2. How do I add a time delay so that if the viewers pauses a video and then comes back to it they won't have to watch the preroll ads all over again? And, where does this time delay coding get added?

Thank you SO much in advance!
http://www.victoryNOWfilmsandtv.com
0 Kudos
6 REPLIES 6
destruk
Binge Watcher

Re: Seeking Help With The Following

1 - you would use rovideoplayer for the advertisement, and rovideoscreen for the content.
ie A) create an rocanvas to prevent flicker when the player type changes from rovideoplayer to rovideoscreen
B) Then create an Rovideoplayer to play the ad - if the ad is cancelled by the user, close the rovideoplayer and rocanvas to return to the content menu/springboard
C) If the ad plays successfully, close the roVideoPlayer and create an RoVideoScreen to play the content
D) When the content is done, close the RoVideoScreen and the RoCanvas to return to the content menu/springboard

2 - If your main content is playing, and the user pauses the video, then when they unpause the video another ad shouldn't be playing, it'll simply resume from the paused position
2A ) - if your main content is playing, and the user quits/stops playback entirely to return to the springboard/content selection screen, when they resume, you would have to check for that and decide if in this case you want the ad routine to start or not before resuming the content item.
0 Kudos
TheEndless
Channel Surfer

Re: Seeking Help With The Following

Here's an old developer blog post that illustrates what destruk is describing for pre-rolls: http://blog.roku.com/developer/2011/06/ ... r-channel/
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
newchannel
Roku Guru

Re: Seeking Help With The Following

Currently, if a viewer clicks to play content, a preroll plays and then content.

If viewer pauses content and then clicks resume it plays the preroll again.

What should I do to make it play the content after "pause" and "resume" and not play the preroll?

Thank you.
http://www.victoryNOWfilmsandtv.com
0 Kudos
destruk
Binge Watcher

Re: Seeking Help With The Following

Probably the easiest way to make that happen is - you can only resume when the resume button is available on the screen, and resume will only be there if the content has a bookmark in the roku registry for the content ID. So to 'skip' the ad before play when resume is selected via the button on the screen, just change the resume play button to play the content. Pause doesn't return to the springboard screen until the user quits either, so no need to worry about the pause option.
0 Kudos
newchannel
Roku Guru

Re: Seeking Help With The Following

destruk,

Interesting...I am seeing what you mean. I know I have a unique ID for each of my "content ID's" in the code. But where do I change the "pause" to "play content". Is it one of the brs files or do I change something in the XML.

Thank you!!!
😄
http://www.victoryNOWfilmsandtv.com
0 Kudos
destruk
Binge Watcher

Re: Seeking Help With The Following

The button display for the springboard would most likely be in the appDetailScreen.brs for the videoplayer example app.
If you have a button option for "Pause" - search for that in the script and then add a variable to the play video routine so it knows to skip the advert.
0 Kudos