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

roSpringBoardScreen fastforward and rewind with audio

These two functions are in the documentation, but when I try to use them, the debugger tells me they are invalid.

Void AllowNavRewind(Boolean isAllowed)
Void AllowNavFastForward(Boolean isAllowed)

1. how do you allow fastforward/rewind of audio from springboard screen?
2. do you have to program the ff/rew events or can you sync a screen to a player to let the device handle it all?
3. if you have to program the events, how do you tell the audio player to ff or rew?
0 Kudos
5 REPLIES 5
RokuKevin
Visitor

Re: roSpringBoardScreen fastforward and rewind with audio

The SDK allows you to skip songs within a playlist of the audio player. The next song to be played is specified with the SetNext(integer index) function. There is no way to FF or REW within a single song in the audio player. You are correct that AllowNavRewind() and AllowNavFastForward() can enable the sending for FF and REW remote key presses to your script. It would be up to your script to handle those events by using SetNext() to specify the next song to play and start it playing. They can map to songs in a playlist, but not some arbitrary PlayStart within a song.

Note that AllowNavRewind() and AllowNavFastForward() are to be called on the roSpringBoard object, not the roAudioPlayer object.

--Kevin
0 Kudos
lucasgonze
Visitor

Re: roSpringBoardScreen fastforward and rewind with audio

The following code invokes AllowNavRewind on an roSpringboardScreen object. It does *not* throw an error in software version 2.6, build 693, and does throw an error in version 2.5 build 388. Does that make sense?


005: o = CreateObject("roAssociativeArray")
006:
007: 'Methods
008: o.Show = springboard_show
009: o.ReloadButtons = springboard_reload_buttons
010: screen = CreateObject("roSpringboardScreen")
011: screen.SetDescriptionStyle("audio")
012: screen.AllowUpdates(true)
013: screen.SetMessagePort(port)
014: screen.SetStaticRatingEnabled(false)
015: screen.setProgressIndicatorEnabled(true)
016: screen.AllowNavRight(true)
017: screen.AllowNavLeft(true)
018: screen.AllowNavRewind(true)
019: screen.AllowNavFastForward(true)
020: o.screen = screen 'keep alive as long as parent holds me
021:
022: return o
023:
024: End Function
/tmp/plugin/4KoHVm/pkg:/source/springboard.brs(18): runtime error f4: Member function not found in BrightScript Component or interface.

018: screen.AllowNavRewind(true)
0 Kudos
renojim
Community Streaming Expert

Re: roSpringBoardScreen fastforward and rewind with audio

I don't know if it makes any sense, but I noticed the same thing a while back. I just chalked it up to another case of the documentation not matching the firmware. I figured the functions weren't really implemented until v2.6.

-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
lucasgonze
Visitor

Re: roSpringBoardScreen fastforward and rewind with audio

Thanks for the reality check, then.

I'd check for the existence of the function within the object if type(myRoSpringBoard.AllowNavRewind ) returned something useful, but it gives a syntax error. Which means the only fix is to disable this completely, for all versions.
0 Kudos
RokuKevin
Visitor

Re: roSpringBoardScreen fastforward and rewind with audio

You could check the version within your bright script code like this:


Function IsAllowNavRewindSupported() As Boolean
version = CreateObject("roDeviceInfo").GetVersion()
major = Mid(version, 3, 1)
minor = Mid(version, 5, 2)
if Val(major) < 2 then
return false
else if Val(major) = 2 then
if Val(minor) < 6 then
return false
end if
end if
return true
End Function


--Kevin
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.