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.
| Name | Type | Description |
|---|---|---|
tracknameToFind | string |
- Type:
- integer
(static) destroyPlayer() → {void}
Tear down the current player child (stop -> report stop to Jellyfin -> onDestroy -> remove).
- 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.
- 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).
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
_data | object | <optional> | {} |
- 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.
| Name | Type | Description |
|---|---|---|
evt | object |
- Type:
- object
(static) init() → {void}
- 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.
- 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).
- Type:
- void
(static) onPlaybackInfoLoaded() → {void}
The playback info task has returned data
- 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).
- Type:
- void
(static) onScreenHidden() → {void}
- 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).
- Type:
- void
(static) onSelectAudioPressed() → {void}
onSelectAudioPressed: Display audio selection dialog
- Type:
- void
(static) onSelectPlaybackInfoPressed() → {void}
User requested playback info
- Type:
- void
(static) onSelectSubtitlePressed() → {void}
User requested subtitle selection popup
- Type:
- void
(static) onSelectVideoSourcePressed() → {void}
onSelectVideoSourcePressed: Display video source selection dialog
- Type:
- void
(static) onSelectionMade() → {void}
User has selected something from the radioDialog popup
- 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).
- Type:
- void
(static) processAudioSelection() → {void}
processAudioSelection: Audio track selection handler
- Type:
- void
(static) processSubtitleSelection() → {void}
- Type:
- void
(static) processVideoSourceSelection() → {void}
processVideoSourceSelection: Video source selection handler Triggers video reload with the new MediaSource ID
- Type:
- void
(static) teardownForDeepLink() → {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.
- Type:
- void