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: 

Question about screensaver

Hello.

In my BrightScript application after required time I have to do some operations and then run screensaver. I found in SDK project named "clock" and add libScreensaver.brs to my project. Now I can create screensaver in required time, but if box screensaver is enabled it openes after specified time and cover my screensaver. Tell me, please, how could I disable default box screensaver in my application, or how could I run default box screensaver in my application after time which was specified in my application?

Thanks!
0 Kudos
7 REPLIES 7

Re: Question about screensaver

Help! Help! Help!
0 Kudos
renojim
Community Streaming Expert

Re: Question about screensaver

Do you have screensaver_private=1 in your manifest?

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos

Re: Question about screensaver

"renojim" wrote:
Do you have screensaver_private=1 in your manifest?
-JT


No, but I've just added this string and nothing changed.
0 Kudos
renojim
Community Streaming Expert

Re: Question about screensaver

In order to have a private screen saver within your channel, you need to have screensaver_private=1 in your manifest (make sure that the last line of your manifest ends with a new line and you have to have a routine in your channel named RunScreenSaver() that never returns (the user pressing a button on the remote will kill the routine).

-JT
Roku Community Streaming Expert

Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.

I am not a Roku employee.
0 Kudos

Re: Question about screensaver

"renojim" wrote:
In order to have a private screen saver within your channel, you need to have screensaver_private=1 in your manifest (make sure that the last line of your manifest ends with a new line
-JT


My manifest file has next content:


title=Name
subtitle=About
screensaver_title=Roku Analog Clock
screensaver_private=1
mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png
major_version=1
minor_version=0
build_version=00000


Is it right?

"renojim" wrote:
you have to have a routine in your channel named RunScreenSaver() that never returns (the user pressing a button on the remote will kill the routine).
-JT


I don't use RunScreenSaver(). For starting ScreenSaver I use 2 files: analogclock.brs and libScreensaver.brs and create ScreenSaver by next metod:


Function RunScreenSaverStart()
canvas = CreateScreensaverCanvas("#000000")
index = Rnd(2)
if index = 1
canvas.SetImageFunc(CreateRokuAnalogClock) '(GetClockImage)
else if index = 2
canvas.SetImageFunc(CreateWhiteAnalogClock) '(GetClockImage)
end if
canvas.SetLocFunc(screensaverLib_RandomLocation)
canvas.SetLocUpdatePeriodInMS(6000)
canvas.SetUpdatePeriodInMS(1000)
canvas.SetUnderscan(.09)
return canvas
End Function


Does it mean that I use wrong way and for using ScreenSaver I have use only RunScreenSaver()?
0 Kudos
RokuJoel
Binge Watcher

Re: Question about screensaver

Yes, you need RunScreenSaver(), it works just like sub main(), it is effectively the main() for your screensaver. Don't include a main() or a runUserInterface() function if you want it to only function as a screensaver.

- Joel
0 Kudos

Re: Question about screensaver

"RokuJoel" wrote:
Yes, you need RunScreenSaver(), it works just like sub main(), it is effectively the main() for your screensaver.
- Joel


Ok, I got it. So I've changed my metod RunScreenSaverStart() and now ScreenSaver workes fine.
Thanks a lot.
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.