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: 
dynamitemedia
Binge Watcher

videoscreen close w/ update of springboard

once the roVideoScreen closes obviously i have the springboard appDetailScreen.brs in the background. so when the video screen closes the appDetailScreen.brs is still there waiting.

i know its possible, but i cant duplicate how i did it once before, or maybe it was a freak thing not sure.

but what i want is if the video screen closes i need it to refresh the appDetailScreen.brs, so if msg.isScreenClosed() on the videoScreen is where i am assuming it should go there

I see the netflix channel will do it as well once playback is finished it will update and ask to play the next episode etc.

i just dont want to have to go out and then back in to see the changes made on the springboard screen, again it has done it but for the life of me i cant duplicate it for 2 days now

Thanks in advance
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
13 REPLIES 13
TheEndless
Channel Surfer

Re: videoscreen close w/ update of springboard

A call to SetContent() should refresh the screen without having to exit it.
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
dynamitemedia
Binge Watcher

Re: videoscreen close w/ update of springboard

endless could you elaborate on that some more?

i already have in the springboard screen

screen.AllowUpdates(true)
screen.SetContent(show)
screen.show()


below is how i have the code on the roVideo screen, so can you tell me when this screen closes as you see below.

if msg <> invalid
if msg.isPartialResult()
shouldPlaylistExit = true
else if msg.isScreenClosed()
print "Screen closed"


exit while


so i am a bit confused what i should be putting in the section where the screen closes so it refreshes the page.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: videoscreen close w/ update of springboard

What are you wanting to refresh it with? Calling SetContent() on the Springboard again in the isScreenClosed() event of the video screen will refresh the springboard with whatever content you're passing to SetContent().
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
dynamitemedia
Binge Watcher

Re: videoscreen close w/ update of springboard

i just want to refresh to see the or not see the "resume playing" button

I tried using the setContent and it didnt work. i already tried:

 print "Screen closed"
screen.SetContent(show)
'screen.SetContent(0)
'screen.SetContent()
exit while


and got nothing but errors, could you show me what i should add and where cause i am obviously not understanding or missing something.
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
RokuChris
Roku Employee
Roku Employee

Re: videoscreen close w/ update of springboard

Making your call to SetContent() in the video screen's event loop will cause problems because the screen variable in that context is your video screen, not your springboard. You should wait to call SetContent() untill you have exited the video screen's event loop and control has returned to the springboard's event loop.
0 Kudos
TheEndless
Channel Surfer

Re: videoscreen close w/ update of springboard

"dynamitemedia" wrote:
i just want to refresh to see the or not see the "resume playing" button

I tried using the setContent and it didnt work. i already tried:

 print "Screen closed"
screen.SetContent(show)
'screen.SetContent(0)
'screen.SetContent()
exit while


and got nothing but errors, could you show me what i should add and where cause i am obviously not understanding or missing something.

Oh, SetContent() won't affect the buttons. You'd need to do that by redrawing the buttons. There should be .AddButton code somewhere in your code. You'd need to call that again and have it clear the current buttons and re-add the appropriate ones based on the status you want displayed (i.e., "Play" instead of "Resume"). The refreshShowDetail() function in the appDetailsScreen.brs in the videoplayer example does this. You'd just need to change it to conditionally add either a Play or Resume button, instead of just the Resume button as it does now.
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
dynamitemedia
Binge Watcher

Re: videoscreen close w/ update of springboard

There should be .AddButton code somewhere in your code. You'd need to call that again and have it clear the current buttons and re-add the appropriate ones based on the status you want displayed (i.e., "Play" instead of "Resume"). The refreshShowDetail() function in the appDetailsScreen.brs in the videoplayer example does this. You'd just need to change it to conditionally add either a Play or Resume button, instead of just the Resume button as it does now.


i already have the conditional play or resume and thats why i need it to refresh, i have it checking the registry for the last position if its 0 or invalid it doesnt show resume.

i have tried the refreshShowDetail() already as well and all i got was a error about not enough parameters for the function.

i think the problem is i am trying to add these in that section if the screen is closed. could you tell me where i should be calling the code?

could you show me a snipplet please, it would make this much easier. i have shown you what i have now.


quick edit: i also just tried clearing the buttons to see if that would work and i got a error with that as well
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
0 Kudos
TheEndless
Channel Surfer

Re: videoscreen close w/ update of springboard

As RokuChris noted above, the code needs to be added to the appDetailScreen, no appVideoScreen. In appDetailScreen, your button refresh code should go immediately after the call to showVideoScreen in the wait loop in showDetailScreen. Something along the lines of...
Function showDetailScreen(screen As Object, showList As Object, showIndex as Integer) As Integer
.
.
showVideoScreen(showList[showIndex])
resetButtons(screen)
.
.
End Function

Sub resetButtons(screen)
screen.ClearButtons()
If ... Then
screen.AddButton(1, "resume playing")
screen.AddButton(2, "play from beginning")
Else
screen.AddButton(2, "play")
End If
End Sub
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
dynamitemedia
Binge Watcher

Re: videoscreen close w/ update of springboard

"RokuChris" wrote:
Making your call to SetContent() in the video screen's event loop will cause problems because the screen variable in that context is your video screen, not your springboard. You should wait to call SetContent() untill you have exited the video screen's event loop and control has returned to the springboard's event loop.

so where would you say to do this then chris? im using this example like you showed us here
viewtopic.php?f=34&t=32867
Twitter: iptvmyway facebook: iptvmyay
Channels: Warriors of War, Go Fight Live, Heading Outdoorz, IPTVmyway
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.