Methods

(static) availSubtitleTrackIdx(tracknameToFind) → {integer}

Roku translates the info provided in subtitleTracks into availableSubtitleTracks Including ignoring tracks, if they are not understood, thus making indexing unpredictable. This function translates between our internel selected subtitle index and the corresponding index in availableSubtitleTracks.

Parameters:
NameTypeDescription
tracknameToFindstring
Returns:
Type: 
integer

(static) destroyPlayer() → {void}

Tear down the current player child (stop -> report stop to Jellyfin -> onDestroy -> remove).

Returns:
Type: 
void

(static) exitPlayback() → {void}

Leave the play route: pops this host off the router history (beforeViewClose -> onScreenHidden + onDestroy tear the player down) and resumes the view beneath (the item's details, or Home). Called on queue-exhaustion, playback error, and voice "stop". Replaces ViewCreator/VideoPlayerView's SceneManager.popScene.

Returns:
Type: 
void

(static) handleFocus(_dataopt) → {boolean}

Router: take remote focus. Hand it to the player child if mounted; the player also grabs focus itself once content loads (VideoPlayerView.onVideoContentLoaded).

Parameters:
NameTypeAttributesDefaultDescription
_dataobject<optional>
{}
Returns:
Type: 
boolean

(static) handleTransport(evt) → {object}

handleTransport: voice transport delegate. main.bs forwards transport commands here (the router-active view is this host, not the inner player); forward to the child player's own handler.

Parameters:
NameTypeDescription
evtobject
Returns:
Type: 
object

(static) init() → {void}

Returns:
Type: 
void

(static) mountPlayer() → {void}

Build + mount the VideoPlayerView as a child of this host. Ported from ViewCreator.CreateVideoPlayerView; the only behavioral change is appendChild to the host instead of SceneManager.pushScene.

Returns:
Type: 
void

(static) onDestroy() → {void}

Router: this view is being destroyed (goBack / sign-out resetRouter). Tear down the player child. abandonApiPromises() is injected here by the auto-abandon-promises BSC plugin (JRScreen.onDestroy's floor doesn't chain to SG-component overrides).

Returns:
Type: 
void

(static) onPlaybackInfoLoaded() → {void}

The playback info task has returned data

Returns:
Type: 
void

(static) onPlayerStateChange() → {void}

=========================================================================== End-of-playback / queue advancement state machine. Ported from ViewCreator.onStateChange; the pop/push has become host-internal destroy/remount, and the queue-exhausted pop has become exitPlayback (goBack).

Returns:
Type: 
void

(static) onScreenHidden() → {void}

Returns:
Type: 
void

(static) onScreenShown() → {void}

Router lifecycle (via JRScreen's onViewOpen bridge): mount the player for the current queue item. The launching code (QueueManager.playQueue -> JRScene) has already built the queue, so the host just reads getCurrentItem. Guard against a redundant call (e.g. screensaver-exit re-fires onScreenShown).

Returns:
Type: 
void

(static) onSelectAudioPressed() → {void}

onSelectAudioPressed: Display audio selection dialog

Returns:
Type: 
void

(static) onSelectPlaybackInfoPressed() → {void}

User requested playback info

Returns:
Type: 
void

(static) onSelectSubtitlePressed() → {void}

User requested subtitle selection popup

Returns:
Type: 
void

(static) onSelectVideoSourcePressed() → {void}

onSelectVideoSourcePressed: Display video source selection dialog

Returns:
Type: 
void

(static) onSelectionMade() → {void}

User has selected something from the radioDialog popup

Returns:
Type: 
void

(static) playCurrentQueueItem() → {void}

Host-internal advancement: remount the player for the CURRENT queue position. Callers (onPlayerStateChange next-item / Live TV restart; VideoPlayerView channel switch) set the position + backdrop first. Replaces ViewCreator's clearPreviousScene + playQueue (which created a new pushed scene).

Returns:
Type: 
void

(static) processAudioSelection() → {void}

processAudioSelection: Audio track selection handler

Returns:
Type: 
void

(static) processSubtitleSelection() → {void}

Returns:
Type: 
void

(static) processVideoSourceSelection() → {void}

processVideoSourceSelection: Video source selection handler Triggers video reload with the new MediaSource ID

Returns:
Type: 
void

A deep link arrived while this player is active. Stop + report the player NOW (synchronously) WITHOUT navigating — the caller (JRScene.replayDeepLinkReplacingPlayer) then goBacks, whose beforeViewClose -> onDestroy does the full teardown. destroyPlayer is idempotent (guards m.view), so that second teardown is a safe no-op — NOT a full onDestroy here, which would run twice and double-tear-down.

Returns:
Type: 
void