Forum Discussion

scrager's avatar
scrager
Visitor
16 years ago

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?

5 Replies

  • 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
  • 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's avatar
    renojim
    Community Streaming Expert
    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
  • 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.
  • 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