diff --git a/lib/player.js b/lib/player.js index 59edf19383..a99fc7b103 100644 --- a/lib/player.js +++ b/lib/player.js @@ -4308,7 +4308,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget { * @export */ isLive() { - if (this.manifest_) { + if (this.manifest_ && !this.isRemotePlayback()) { return this.manifest_.presentationTimeline.isLive(); } @@ -4346,7 +4346,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; @@ -4387,7 +4387,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. @@ -4645,7 +4645,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; @@ -4701,7 +4701,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 = []; @@ -4914,7 +4914,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); @@ -5005,7 +5005,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) { @@ -5119,7 +5119,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, @@ -5192,7 +5192,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; @@ -5235,7 +5235,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) { @@ -5488,7 +5488,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(); @@ -5516,7 +5516,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();