Skip to content

Commit 791f9b1

Browse files
committed
fix: Don't use info from MSE mode when using Remote Playback (#7504)
Related to #5022
1 parent a58befc commit 791f9b1

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

lib/player.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4308,7 +4308,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
43084308
* @export
43094309
*/
43104310
isLive() {
4311-
if (this.manifest_) {
4311+
if (this.manifest_ && !this.isRemotePlayback()) {
43124312
return this.manifest_.presentationTimeline.isLive();
43134313
}
43144314

@@ -4346,7 +4346,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
43464346
* @export
43474347
*/
43484348
isAudioOnly() {
4349-
if (this.manifest_) {
4349+
if (this.manifest_ && !this.isRemotePlayback()) {
43504350
const variants = this.manifest_.variants;
43514351
if (!variants.length) {
43524352
return false;
@@ -4387,7 +4387,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
43874387
* @export
43884388
*/
43894389
seekRange() {
4390-
if (this.manifest_) {
4390+
if (this.manifest_ && !this.isRemotePlayback()) {
43914391
// With HLS lazy-loading, there were some situations where the manifest
43924392
// had partially loaded, enough to move onto further load stages, but no
43934393
// segments had been loaded, so the timeline is still unknown.
@@ -4645,7 +4645,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
46454645
* @export
46464646
*/
46474647
getVariantTracks() {
4648-
if (this.manifest_) {
4648+
if (this.manifest_ && !this.isRemotePlayback()) {
46494649
const currentVariant = this.streamingEngine_ ?
46504650
this.streamingEngine_.getCurrentVariant() : null;
46514651

@@ -4701,7 +4701,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
47014701
* @export
47024702
*/
47034703
getTextTracks() {
4704-
if (this.manifest_) {
4704+
if (this.manifest_ && !this.isRemotePlayback()) {
47054705
const currentTextStream = this.streamingEngine_ ?
47064706
this.streamingEngine_.getCurrentTextStream() : null;
47074707
const tracks = [];
@@ -4914,7 +4914,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
49144914
* @export
49154915
*/
49164916
selectTextTrack(track) {
4917-
if (this.manifest_ && this.streamingEngine_) {
4917+
if (this.manifest_ && this.streamingEngine_&& !this.isRemotePlayback()) {
49184918
const stream = this.manifest_.textStreams.find(
49194919
(stream) => stream.id == track.id);
49204920

@@ -5005,7 +5005,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
50055005
* @export
50065006
*/
50075007
selectVariantTrack(track, clearBuffer = false, safeMargin = 0) {
5008-
if (this.manifest_ && this.streamingEngine_) {
5008+
if (this.manifest_ && this.streamingEngine_&& !this.isRemotePlayback()) {
50095009
const variant = this.manifest_.variants.find(
50105010
(variant) => variant.id == track.id);
50115011
if (!variant) {
@@ -5119,7 +5119,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
51195119
*/
51205120
selectAudioLanguage(language, role, channelsCount = 0, safeMargin = 0,
51215121
codec = '') {
5122-
if (this.manifest_ && this.playhead_) {
5122+
if (this.manifest_ && this.playhead_&& !this.isRemotePlayback()) {
51235123
this.currentAdaptationSetCriteria_ =
51245124
new shaka.media.PreferenceBasedCriteria(
51255125
language,
@@ -5192,7 +5192,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
51925192
* @export
51935193
*/
51945194
selectTextLanguage(language, role, forced = false) {
5195-
if (this.manifest_ && this.playhead_) {
5195+
if (this.manifest_ && this.playhead_ && !this.isRemotePlayback()) {
51965196
this.currentTextLanguage_ = language;
51975197
this.currentTextRole_ = role || '';
51985198
this.currentTextForced_ = forced;
@@ -5235,7 +5235,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
52355235
* @export
52365236
*/
52375237
selectVariantsByLabel(label, clearBuffer = true, safeMargin = 0) {
5238-
if (this.manifest_ && this.playhead_) {
5238+
if (this.manifest_ && this.playhead_ && !this.isRemotePlayback()) {
52395239
let firstVariantWithLabel = null;
52405240
for (const variant of this.manifest_.variants) {
52415241
if (variant.audio.label == label) {
@@ -5488,7 +5488,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
54885488
presentationTime = this.startTime_;
54895489
}
54905490

5491-
if (this.manifest_) {
5491+
if (this.manifest_ && !this.isRemotePlayback()) {
54925492
const timeline = this.manifest_.presentationTimeline;
54935493
const startTime = timeline.getInitialProgramDateTime() ||
54945494
timeline.getPresentationStartTime();
@@ -5516,7 +5516,7 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
55165516
* @export
55175517
*/
55185518
getPresentationStartTimeAsDate() {
5519-
if (this.manifest_) {
5519+
if (this.manifest_ && !this.isRemotePlayback()) {
55205520
const timeline = this.manifest_.presentationTimeline;
55215521
const startTime = timeline.getInitialProgramDateTime() ||
55225522
timeline.getPresentationStartTime();

0 commit comments

Comments
 (0)