Methods

(static) advanceTo(index) → {void}

advanceTo: Move a VIDEO queue to another item because playback moved there: the next one when an item ends, or the player's next / previous. The queue ARRIVES at that item, so it starts from the beginning on the viewer's explicit version pick (nodeHelpers.startFresh): a position saved on it belongs to an earlier session, and the viewer is watching in order. Resume is the Resume button's job; jellyfin-web's nextTrack also plays with no start position. Without this only a multi-version item resumed (its version chooser reads positions) while every other item started at 0.

Not an arrival: the item behind a Cinema Mode intro (followsIntro), which is the one the viewer launched, and Live TV, which has no position to start from.

Audio moves with moveForward / moveBack / setPosition and is untouched.

Parameters:
NameTypeDescription
indexinteger

the queue position to move to

Returns:
Type: 
void

(static) beginPlaybackStart(label) → {dynamic}

Opens the wait for a playback start (appWaits, LoadingKind.PLAYBACK_START) and holds it until the player that mounts for it takes it (takePlaybackStart). Every start passes through here (the launchers below, the details screen, a channel switch), so the spinner, its stages and its label are the same for all of them. A start pressed while another is pending replaces it.

Parameters:
NameTypeDescription
labelstring

the text above the spinner, such as a channel's name; "" for none

Returns:

the start's Promise (invalid without a scene)

Type: 
dynamic

(static) cancelActiveQuickPlayTask() → {void}

Stop, unobserve, and drop the in-flight QuickPlayTask if one exists. Safe to call when none is active. The single teardown path for m.activeQuickPlayTask (reused by onQuickPlayTaskOutput).

Returns:
Type: 
void

(static) cancelActiveShuffleTask() → {void}

The single teardown path for m.shuffleTask. Safe to call when none is active.

Returns:
Type: 
void

(static) clear() → {void}

Clear all content from play queue

Returns:
Type: 
void

(static) endQuickPlayWithNothing(kind, status) → {void}

A QuickPlayTask found nothing to play. A playback start fails; a photo-album run, which has no start and uses the plain spinner (launchPhotoAlbum), stops that spinner. Then the viewer is told why (showNothingToPlay).

Parameters:
NameTypeDescription
kinddynamic

quickplayOutcome.KIND_*, from the Task's output

statusdynamic

quickplayOutcome.STATUS_*, from the Task's output

Returns:
Type: 
void

(static) failPendingPlaybackStart(reason) → {void}

Ends the pending start, which will not reach a player (reason, for the log).

Parameters:
NameTypeDescription
reasonstring
Returns:
Type: 
void

(static) getCount() → {dynamic}

Return the number of items in the play queue

Returns:
Type: 
dynamic

(static) getCurrentItem() → {dynamic}

Return the item currently in focus from the play queue

Returns:
Type: 
dynamic

(static) getIsShuffled() → {dynamic}

Return whether or not shuffle is enabled

Returns:
Type: 
dynamic

(static) getItemByIndex(index) → {dynamic}

Return the item in the passed index from the play queue

Parameters:
NameTypeDescription
indexdynamic
Returns:
Type: 
dynamic

(static) getItemType(item) → {string}

getItemType: Returns the media type of the passed item

Parameters:
NameTypeDescription
itemdynamic

Item to evaluate

Returns:

indicating type of media item is

Type: 
string

(static) getPosition() → {dynamic}

Returns current playback position within the queue

Returns:
Type: 
dynamic

(static) getQueue() → {dynamic}

Return the current play queue

Returns:
Type: 
dynamic

(static) getQueueTypes() → {dynamic}

Return the types of items in current play queue

Returns:
Type: 
dynamic

(static) getQueueUniqueTypes() → {dynamic}

Return the unique types of items in current play queue

Returns:
Type: 
dynamic

(static) getUnshuffledQueue() → {dynamic}

Return original, unshuffled queue

Returns:
Type: 
dynamic

(static) getVersionPreference() → {dynamic}

getVersionPreference: The explicit version pick for this queue, or invalid when there is none.

Returns:
Type: 
dynamic

(static) init() → {void}

Returns:
Type: 
void

(static) insertAfterCurrent(newItem) → {void}

insertAfterCurrent: Put an item directly after the one playing, so the queue reaches it next.

The Cinema Mode intro queues the item it plays in front of. Appending that copy to the END plays the rest of the queue first: measured 2026-09-19 on 10.11, a Play All queue became [e1, e2, e3, e4, e1] and the intro was followed by e2, with e1 played last. With one item queued (every other intro path), the end IS the next slot, which is why it went unnoticed.

Parameters:
NameTypeDescription
newItemdynamic

the queue item to play next

Returns:
Type: 
void

(static) isPrerollActive() → {boolean}

Return isPrerollActive status

Returns:
Type: 
boolean

(static) launchItem(itemNode) → {void}

Single-tap playback launcher. Routed views (Home rows / library grids / search / details extras) call this directly. Synchronous types build the queue inline via the quickplay.* helpers + playQueue (which routes to PlayerHostView); async types (need an API call to expand into a queue) go through QuickPlayTask.

Parameters:
NameTypeDescription
itemNodeobject
Returns:
Type: 
void

(static) launchPhotoAlbum(isRandom, id) → {void}

Launch a PhotoAlbum slideshow. isRandom = true is the Shuffle button (random slideshow); false is the Slideshow button (sequential). Sets the shuffle mode the onQuickPlayTaskOutput photo branch reads, then runs the loadPhotoAlbum task.

Parameters:
NameTypeDescription
isRandomboolean
idstring
Returns:
Type: 
void

(static) launchQuickPlayAction(input) → {void}

Start playback of an async action (the details screen's Play all / trailer / instant mix, and their deep links): opens its playback start, then runs the QuickPlayTask.

Parameters:
NameTypeDescription
inputobject
Returns:
Type: 
void

(static) launchShuffle(input) → {void}

Shuffle-play a Series / Season / Person via GetShuffleItemsTask (the API resolves the randomized item set off the render thread). Owns the task on this node. PhotoAlbum shuffle does not come here: it launches a random slideshow through launchPhotoAlbum instead.

Parameters:
NameTypeDescription
inputobject
Returns:
Type: 
void

(static) moveBack() → {void}

Move queue position back one

Returns:
Type: 
void

(static) moveForward() → {void}

Move queue position ahead one

Returns:
Type: 
void

(static) onPlaybackStartEnded(start) → {void}

A start ended. One that failed before any player took it (the viewer left the screen it was pressed on, or its time limit ran out) stops the queue build still working for it, so playback does not begin on whatever screen the viewer went to. Both builds only read, so stopping them loses nothing.

Parameters:
NameTypeDescription
startobject
Returns:
Type: 
void

(static) onQuickPlayTaskOutput(msg) → {void}

QuickPlayTask finished: build the queue from its output and play (ported from main.bs's handleQuickPlayOutput). Photo output routes the slideshow to the /photo view through m.global.photoLaunchRequest.

Parameters:
NameTypeDescription
msgobject
Returns:
Type: 
void

(static) onShuffleItemsLoaded(msg) → {void}

GetShuffleItemsTask finished: set the resolved items as the queue and play. The task already randomizes server-side; toggleShuffle applies the Fisher-Yates client shuffle on top when there's more than one item.

Parameters:
NameTypeDescription
msgobject
Returns:
Type: 
void

(static) playQueue() → {void}

Play items in queue.

QueueManager has no router chain, so it can't navigateTo. It sets m.global.playbackLaunchRequest and JRScene.onPlaybackLaunchRequested turns that into the route: audio -> /audio (AudioPlayerView), every video-family type -> the play route (/details/:type/:id/play, PlayerHostView). The view reads this same queue on mount. In-view queue advancement (next-item / Live TV restart / channel switch) does not come back through here: the video host remounts its child; the audio view reloads in place.

Returns:
Type: 
void

(static) push(newItem) → {void}

Push new items to the play queue

Parameters:
NameTypeDescription
newItemdynamic
Returns:
Type: 
void

(static) resetQueueItemOrder() → {void}

Reset queue items back to original, unshuffled order

Returns:
Type: 
void

(static) resetShuffle() → {void}

Reset shuffle to off state

Returns:
Type: 
void

(static) runQuickPlayAction(input) → {void}

Run a QuickPlayTask for an async action and route its output to the queue. Used by launchQuickPlayAction, launchItem's async branch (item taps that expand into a queue) and the photo-album slideshow. Owns the task on this node's render thread. Clears the queue up front so the QuickPlayTask output (which appends via pushToQueue / set) starts from empty.

Parameters:
NameTypeDescription
inputobject
Returns:
Type: 
void

(static) set(items) → {void}

Replace play queue with passed array

Parameters:
NameTypeDescription
itemsdynamic
Returns:
Type: 
void

(static) setCurrentStartingPoint(positionTicks, isExactopt) → {void}

Set starting point for the current item in the queue

before a reload), false for a saved resume position (see nodeHelpers.setExactStart / setResumeStart)

Parameters:
NameTypeAttributesDefaultDescription
positionTicksdynamic

where the current item starts

isExactboolean<optional>
false

true for a place the caller named (a position the player saved

Returns:
Type: 
void

(static) setPosition(newPosition) → {void}

Set the queue position

Parameters:
NameTypeDescription
newPositiondynamic
Returns:
Type: 
void

(static) setPrerollStatus(newStatus) → {void}

Set prerollActive status

Parameters:
NameTypeDescription
newStatusboolean
Returns:
Type: 
void

(static) setVersionPreference(preference) → {void}

setVersionPreference: Record an explicit version pick for the rest of this queue: the details screen's Video menu at launch, or a switch in the player. invalid forgets it.

Parameters:
NameTypeDescription
preferencedynamic

from versionPick.preferenceFor()

Returns:
Type: 
void

(static) showNothingToPlay(kind, status) → {void}

Tells the viewer that a launch found nothing to play: try again when a read failed, nothing there when every read answered, can't when nothing here builds it (quickplayOutcome). Only a build whose output arrived gets here, and that means the viewer still waits on it. Back, leaving the screen and a start's time limit end the start, which stops the Task (onPlaybackStartEnded); a newer press of the same launcher stops its own Task first (runQuickPlayAction, launchShuffle); and a slideshow's plain spinner holds the remote until it ends. So none of those ever shows a message.

Parameters:
NameTypeDescription
kinddynamic

quickplayOutcome.KIND_*

statusdynamic

quickplayOutcome.STATUS_*

Returns:
Type: 
void

(static) shuffleQueueItems() → {void}

Save a copy of the original queue and randomize order of queue items

Returns:
Type: 
void

(static) startCurrentFresh() → {void}

startCurrentFresh: Start the current item from the beginning: the first item of a queue the viewer did not launch to resume, such as Play All or shuffle.

Returns:
Type: 
void

(static) startFresh(item) → {void}

startFresh: nodeHelpers.startFresh for anything with a position to start from, not Live TV.

Parameters:
NameTypeDescription
itemdynamic
Returns:
Type: 
void

(static) takePlaybackStart() → {dynamic}

Hands the pending start to the player mounting for it, which ends it from then on (on its stream, a failure, or teardown). invalid when none is pending: a queue advance or a Live TV restart remounts the player without one.

Returns:
Type: 
dynamic

(static) toggleShuffle() → {void}

Toggle shuffleEnabled state

Returns:
Type: 
void