diff --git a/lib/player.js b/lib/player.js index 21bbc523e6..f7931cd748 100644 --- a/lib/player.js +++ b/lib/player.js @@ -4343,7 +4343,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ isLive() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { return this.manifest_.presentationTimeline.isLive(); } @@ -4381,7 +4381,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ isAudioOnly() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { const variants = this.manifest_.variants; if (!variants.length) { return false; @@ -4422,7 +4422,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ seekRange() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { // With HLS lazy-loading, there were some situations where the manifest // had partially loaded, enough to move onto further load stages, but no // segments had been loaded, so the timeline is still unknown. @@ -4680,7 +4680,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ getVariantTracks() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { const currentVariant = this.streamingEngine_ ? this.streamingEngine_.getCurrentVariant() : null; @@ -4736,7 +4736,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ getTextTracks() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { const currentTextStream = this.streamingEngine_ ? this.streamingEngine_.getCurrentTextStream() : null; const tracks = []; @@ -4949,7 +4949,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ selectTextTrack(track) { - if (this.manifest_ && this.streamingEngine_) { + if (this.manifest_ && this.streamingEngine_&& !this.isRemotePlayback()) { const stream = this.manifest_.textStreams.find( (stream) => stream.id == track.id); @@ -5042,7 +5042,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ selectVariantTrack(track, clearBuffer = false, safeMargin = 0) { - if (this.manifest_ && this.streamingEngine_) { + if (this.manifest_ && this.streamingEngine_&& !this.isRemotePlayback()) { const variant = this.manifest_.variants.find( (variant) => variant.id == track.id); if (!variant) { @@ -5156,7 +5156,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { */ selectAudioLanguage(language, role, channelsCount = 0, safeMargin = 0, codec = '') { - if (this.manifest_ && this.playhead_) { + if (this.manifest_ && this.playhead_&& !this.isRemotePlayback()) { this.currentAdaptationSetCriteria_ = new shaka.media.PreferenceBasedCriteria( language, @@ -5229,7 +5229,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ selectTextLanguage(language, role, forced = false) { - if (this.manifest_ && this.playhead_) { + if (this.manifest_ && this.playhead_ && !this.isRemotePlayback()) { this.currentTextLanguage_ = language; this.currentTextRole_ = role || ''; this.currentTextForced_ = forced; @@ -5273,7 +5273,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ selectVariantsByLabel(label, clearBuffer = true, safeMargin = 0) { - if (this.manifest_ && this.playhead_) { + if (this.manifest_ && this.playhead_ && !this.isRemotePlayback()) { let firstVariantWithLabel = null; for (const variant of this.manifest_.variants) { if (variant.audio.label == label) { @@ -5527,7 +5527,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { presentationTime = this.startTime_; } - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { const timeline = this.manifest_.presentationTimeline; const startTime = timeline.getInitialProgramDateTime() || timeline.getPresentationStartTime(); @@ -5555,7 +5555,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ getPresentationStartTimeAsDate() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { const timeline = this.manifest_.presentationTimeline; const startTime = timeline.getInitialProgramDateTime() || timeline.getPresentationStartTime();