Methods

(static) LoadNextSong() → {void}

Returns:
Type: 
void

(static) advanceToNextItem() → {void}

Advance to the next queue item on auto-finish. Audio stays in this routed /audio view (reload the stream in place via LoadNextSong). A non-audio next item in a mixed queue leaves /audio for the player route — playQueue routes it to /play, and /audio (not keepAlive) is destroyed.

Returns:
Type: 
void

(static) announceAudioNowPlaying() → {object}

Returns the metadata in the response — main.bs's transport dispatcher does the roAppManager call on the MAIN thread (roAppManager isn't creatable on render).

Returns:
Type: 
object

(static) applyTheme() → {void}

Returns:
Type: 
void

(static) applyTrackInfo(item) → {void}

Apply the queue-derived now-playing display (track number, title, artist, song, total length) from the current item. Called SYNCHRONOUSLY on a track change (pageContentChanged) so these update on the same tick as the position-bar/timestamp reset instead of lagging until the async stream load returns, and re-applied from the async stream/metadata callbacks once a fuller item resolves (idempotent — setFieldTextValue/setScreenTitle no-op when unchanged or invalid). The poster/backdrop stay in the async path: image loads are inherently async.

Parameters:
NameTypeDescription
itemobject
Returns:
Type: 
void

(static) audioNextTrack() → {object}

Returns:
Type: 
object

(static) audioPositionChanged() → {void}

Returns:
Type: 
void

(static) audioSeekRelative(deltaSeconds) → {object}

Parameters:
NameTypeDescription
deltaSecondsinteger
Returns:
Type: 
object

(static) audioSeekTo(targetSeconds) → {object}

5s end-slack (vs 30s for video) — songs are short, and we still want the seek to land before the track auto-advances to the next.

Parameters:
NameTypeDescription
targetSecondsfloat
Returns:
Type: 
object

(static) audioStateChanged() → {void}

Returns:
Type: 
void

(static) bufferPositionChanged() → {void}

Returns:
Type: 
void

(static) endScreenSaver() → {void}

Returns:
Type: 
void

(static) exitAudioPlayback() → {void}

Leave the routed /audio view, returning to the launching detail (the router resumes the view beneath). Stops playback + clears loop first. The physical back key already stops audio in onKeyEvent and bubbles to the outlet's goBack, so it does not route through here.

Returns:
Type: 
void

(static) exitScrubMode() → {void}

exitScrubMode: Moves player out of scrub mode state, resets back to standard play mode

Returns:
Type: 
void

(static) findCurrentSongIndex(songList) → {integer}

Parameters:
NameTypeDescription
songListdynamic
Returns:
Type: 
integer

(static) handleAudioVoiceSeek(evt) → {object}

Parameters:
NameTypeDescription
evtobject
Returns:
Type: 
object

(static) handleTransport(evt) → {object}

handleTransport: Roku voice transport handler. Called from source/main.bs when an roInputEvent with info.type = "transport" arrives and AudioPlayerView is the active scene.

Returns { status: "" } per roInput.EventResponse(). Status codes mirror video.

JellyRock-specific behaviors (audio has no continuous trickplay, no media segments):

  • "forward"/"rewind" are discrete 10s seeks.
  • "replay" seeks backward by playbackInstantReplaySeconds (same setting as video) — matches the Roku platform spec; users wanting loop control use the "loop" command.
  • "skip" advances to the next track.

See https://github.com/rokudev/dev-doc — docs/DEVELOPER/media-playback/voice-controls/transport-controls.md

Parameters:
NameTypeDescription
evtobject
Returns:
Type: 
object

(static) init() → {void}

Returns:
Type: 
void

(static) loadButtons() → {void}

If we have more than 1 song to play, set initial button states

Returns:
Type: 
void

(static) loopClicked() → {boolean}

Returns:
Type: 
boolean

(static) moveSeekbarThumb(playPositionBarWidth) → {void}

moveSeekbarThumb: Positions the thumb on the seekbar

Parameters:
NameTypeDescription
playPositionBarWidthfloat

width of the play position bar

Returns:
Type: 
void

(static) nextClicked() → {boolean}

Returns false at end-of-queue so callers can distinguish "advanced" from "no-op". Side effects (timestamp reset) only fire when an advance actually happens — pressing Next on the last track is a no-op, not a partial reset.

Returns:
Type: 
boolean

(static) onAlbumCoverLoadStatusChanged() → {void}

Toggle the JRPlaceholder behind albumCover based on the real poster's load state. Mirrors the canonical state machine from JRRowItem.bs onPosterLoadStatusChanged, but with itemType statically set to "MusicAlbum" in XML (no per-state retyping).

Returns:
Type: 
void

(static) onAudioStreamLoaded() → {void}

Returns:
Type: 
void

(static) onButtonSelected() → {void}

Event handler when user selects a button via OK key

Returns:
Type: 
void

(static) onDestroy() → {void}

onDestroy: Full teardown releasing all resources before component removal Called automatically via JRScreen.beforeViewClose when sgRouter permanently closes this view.

Returns:
Type: 
void

(static) onKeyEvent(key, press) → {boolean}

Process key press events

Parameters:
NameTypeDescription
keystring
pressboolean
Returns:
Type: 
boolean

(static) onMetaDataLoaded() → {void}

Returns:
Type: 
void

(static) onScreensaverTimeoutLoaded() → {void}

Returns:
Type: 
void

(static) pageContentChanged() → {void}

Update values on screen when page content changes

Returns:
Type: 
void

(static) playAction() → {boolean}

Returns:
Type: 
boolean

(static) previousClicked() → {boolean}

Returns:
Type: 
boolean

(static) processScrubAction(seekStep) → {void}

processScrubAction: Handles +/- seeking for the audio trickplay bar

Parameters:
NameTypeDescription
seekStepinteger

seconds to move the trickplay position (negative values allowed)

Returns:
Type: 
void

(static) resetSeekbarThumb() → {void}

resetSeekbarThumb: Resets the thumb to the playing position

Returns:
Type: 
void

(static) screenSaverActive() → {boolean}

Returns:
Type: 
boolean

(static) setAudioFavorite(isLike) → {object}

Parameters:
NameTypeDescription
isLikeboolean
Returns:
Type: 
object

(static) setLoopButtonImage() → {void}

Returns:
Type: 
void

(static) setOnScreenTextValues(item) → {void}

Populate on screen text variables

Parameters:
NameTypeDescription
itemobject
Returns:
Type: 
void

(static) setPosterImage(posterURL) → {void}

Set poster image on screen. Empty string clears the URI on both the main album cover and the screensaver cover — the JRPlaceholder behind albumCover surfaces, and the screensaver activator at startScreenSaver() routes to the audio-logo branch instead of drifting a fallback glyph around.

Parameters:
NameTypeDescription
posterURLdynamic
Returns:
Type: 
void

(static) setScreenTitle(item) → {void}

Set screen's title text to "Artist / Song" when both are available, just song name if no album artist, or empty string to reset the title.

Parameters:
NameTypeDescription
itemobject
Returns:
Type: 
void

(static) setShuffleIconState() → {void}

Returns:
Type: 
void

(static) setTrackNumberDisplay() → {void}

Returns:
Type: 
void

(static) setupAnimationTasks() → {void}

Returns:
Type: 
void

(static) setupButtons() → {void}

Setup playback buttons, default to Play button selected

Returns:
Type: 
void

(static) setupDataTasks() → {void}

Creates tasks to gather data needed to render Scene and play song

Returns:
Type: 
void

(static) setupInfoNodes() → {void}

Returns:
Type: 
void

(static) setupScreenSaver() → {void}

Returns:
Type: 
void

(static) shuffleClicked() → {boolean}

Returns:
Type: 
boolean

(static) startScreenSaver() → {void}

Returns:
Type: 
void

Stop + tear down without navigating (a deep link arrived while audio plays; the caller reroutes to the new content). Stops the audio the same way the back key does (onKeyEvent "back" -> control "stop") — the caller's goBack is programmatic, so it bypasses that key handler. NOT a full onDestroy: the caller's goBack triggers onDestroy for cleanup, and running onDestroy twice (it nulls m.audioPlayer) crashes the second pass.

Returns:
Type: 
void

(static) toggleShuffleEnabled() → {void}

Returns:
Type: 
void