Methods
(static) probedPicksNeedNewAnswer(answerSource, audioIndex, subtitleIndex, sentSubtitleIndex) → {boolean}
True when picks made from the probed streams differ from what a transcode answer was built with, so that answer has to be asked for again. A direct play answer never does: the device plays the source itself and switches tracks on its own.
| Name | Type | Description |
|---|---|---|
answerSource | dynamic | the MediaSourceInfo the PlaybackInfo answer returned |
audioIndex | integer | the audio index picked from the probed streams |
subtitleIndex | integer | the subtitle index picked from the probed streams |
sentSubtitleIndex | integer | the subtitle index the answered request carried |
- Type:
- boolean
(static) serverAnswerPlays(blocker, deviceLoadsUpstream, serverAllowed) → {boolean}
True when the server's answer is the stream that plays, so the track picks it was built with matter. The device plays the source's own manifest URL when nothing blocks it and the device can load it; when it cannot but the server allowed direct play, the player's retry asks the server again with our picks (retryPlayback). Only a blocker, or a URL the device cannot load and the server refused, leaves the answer as it is.
| Name | Type | Description |
|---|---|---|
blocker | string | an UpstreamManifestBlocker value for the source |
deviceLoadsUpstream | boolean | the device's check that it can load the manifest URL |
serverAllowed | boolean | the answer's SupportsDirectPlay |
- Type:
- boolean
(static) serverAudioIndex(source) → {integer}
The audio stream index the server built its transcode for: the AudioStreamIndex in the TranscodingUrl, else the source's DefaultAudioStreamIndex, else -1.
| Name | Type | Description |
|---|---|---|
source | dynamic | a MediaSourceInfo from a PlaybackInfo answer |
- Type:
- integer
(static) sourceListsNoStreams(source) → {boolean}
True when the source exists and lists no media streams yet.
| Name | Type | Description |
|---|---|---|
source | dynamic | a MediaSourceInfo |
- Type:
- boolean