Skip to content

Commit 97c28c9

Browse files
authored
fix(HLS): Fix preload initial variant on Tizen (#8873)
Regression introduced in #8835 by changing the order of operations in the preload manager.
1 parent bf26c3f commit 97c28c9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/media/preload_manager.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,6 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
430430
await this.parseManifestInner_();
431431
this.throwIfDestroyed_();
432432

433-
await this.chooseInitialVariant_();
434-
this.throwIfDestroyed_();
435-
436433
if (!shaka.drm.DrmUtils.isMediaKeysPolyfilled('webkit')) {
437434
await this.initializeDrm();
438435
this.throwIfDestroyed_();
@@ -557,6 +554,8 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
557554
if (!this.manifest_) {
558555
this.manifest_ = await this.parser_.start(
559556
this.assetUri_, this.manifestPlayerInterface_);
557+
558+
await this.chooseInitialVariant_();
560559
}
561560

562561
this.manifestPromise_.resolve();
@@ -675,9 +674,6 @@ shaka.media.PreloadManager = class extends shaka.util.FakeEventTarget {
675674
* @private
676675
*/
677676
async chooseInitialVariant_() {
678-
goog.asserts.assert(
679-
this.manifest_, 'The manifest should already be parsed.');
680-
681677
// This step does not have any associated events, as it is only part of the
682678
// "load" state in the old state graph.
683679

0 commit comments

Comments
 (0)