Your Digital Media Has Never Looked So Good

 
scrager
Topic Author
Posts: 31
Joined: Mon Feb 08, 2010 8:31 am

roSpringBoardScreen fastforward and rewind with audio

Sun Feb 28, 2010 9:31 pm

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?
 
User avatar
RokuKevin
Roku Engineering
Posts: 796
Joined: Tue Sep 22, 2009 2:29 pm

Re: roSpringBoardScreen fastforward and rewind with audio

Wed Mar 03, 2010 2:49 pm

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
 
lucasgonze
Posts: 106
Joined: Tue Mar 09, 2010 5:57 pm

Re: roSpringBoardScreen fastforward and rewind with audio

Mon Aug 16, 2010 10:47 am

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)
 
renojim
** Valued Community Member **
Posts: 3490
Joined: Mon Feb 15, 2010 1:35 pm

Re: roSpringBoardScreen fastforward and rewind with audio

Mon Aug 16, 2010 11:02 am

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
 
lucasgonze
Posts: 106
Joined: Tue Mar 09, 2010 5:57 pm

Re: roSpringBoardScreen fastforward and rewind with audio

Mon Aug 16, 2010 11:13 am

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.
 
User avatar
RokuKevin
Roku Engineering
Posts: 796
Joined: Tue Sep 22, 2009 2:29 pm

Re: roSpringBoardScreen fastforward and rewind with audio

Thu Aug 19, 2010 5:44 pm

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

Who is online

Users browsing this forum: No registered users and 4 guests