rx-player 3.29.0-dev.2022103100 → 3.29.0-dev.2022110200

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. package/CHANGELOG.md +2 -3
  2. package/VERSION +1 -1
  3. package/dist/_esm5.processed/core/api/playback_observer.d.ts +5 -0
  4. package/dist/_esm5.processed/core/api/playback_observer.js +7 -0
  5. package/dist/_esm5.processed/core/api/public_api.js +2 -2
  6. package/dist/_esm5.processed/core/init/initialize_directfile.js +3 -8
  7. package/dist/_esm5.processed/core/init/load_on_media_source.js +3 -11
  8. package/dist/_esm5.processed/core/init/{stall_avoider.d.ts → rebuffering_controller.d.ts} +5 -2
  9. package/dist/_esm5.processed/core/init/{stall_avoider.js → rebuffering_controller.js} +93 -4
  10. package/dist/_esm5.processed/core/init/update_playback_rate.d.ts +0 -32
  11. package/dist/_esm5.processed/core/init/update_playback_rate.js +1 -46
  12. package/dist/_esm5.processed/default_config.js +1 -1
  13. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_extent.js +1 -8
  14. package/dist/_esm5.processed/parsers/texttracks/ttml/html/apply_origin.js +1 -9
  15. package/dist/rx-player.js +193 -182
  16. package/dist/rx-player.min.js +1 -1
  17. package/package.json +1 -1
  18. package/sonar-project.properties +1 -1
  19. package/src/core/api/playback_observer.ts +8 -0
  20. package/src/core/api/public_api.ts +2 -2
  21. package/src/core/init/initialize_directfile.ts +3 -11
  22. package/src/core/init/load_on_media_source.ts +12 -23
  23. package/src/core/init/{stall_avoider.ts → rebuffering_controller.ts} +106 -3
  24. package/src/core/init/update_playback_rate.ts +0 -70
  25. package/src/default_config.ts +1 -1
  26. package/src/parsers/texttracks/ttml/html/apply_extent.ts +1 -8
  27. package/src/parsers/texttracks/ttml/html/apply_origin.ts +1 -9
package/dist/rx-player.js CHANGED
@@ -2213,7 +2213,7 @@ var DEFAULT_CONFIG = {
2213
2213
  * small enough so this (arguably rare) situation won't lead to too much
2214
2214
  * waiting time.
2215
2215
  */
2216
- FORCE_DISCONTINUITY_SEEK_DELAY: 3000,
2216
+ FORCE_DISCONTINUITY_SEEK_DELAY: 5000,
2217
2217
  /**
2218
2218
  * Ratio used to know if an already loaded segment should be re-buffered.
2219
2219
  * We re-load the given segment if the current one times that ratio is
@@ -9595,8 +9595,6 @@ __webpack_require__.d(__webpack_exports__, {
9595
9595
  var empty = __webpack_require__(1545);
9596
9596
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/share.js
9597
9597
  var share = __webpack_require__(5583);
9598
- // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js
9599
- var ignoreElements = __webpack_require__(533);
9600
9598
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/filter.js
9601
9599
  var filter = __webpack_require__(4975);
9602
9600
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/take.js
@@ -9609,6 +9607,8 @@ var switchMap = __webpack_require__(4978);
9609
9607
  var of = __webpack_require__(2817);
9610
9608
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/merge.js
9611
9609
  var merge = __webpack_require__(3071);
9610
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js
9611
+ var ignoreElements = __webpack_require__(533);
9612
9612
  // EXTERNAL MODULE: ./src/compat/clear_element_src.ts
9613
9613
  var clear_element_src = __webpack_require__(5767);
9614
9614
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/Observable.js + 1 modules
@@ -9661,12 +9661,10 @@ var emit_loaded_event = __webpack_require__(5039);
9661
9661
  var initial_seek_and_play = __webpack_require__(7920);
9662
9662
  // EXTERNAL MODULE: ./src/core/init/link_drm_and_content.ts + 1 modules
9663
9663
  var link_drm_and_content = __webpack_require__(9607);
9664
- // EXTERNAL MODULE: ./src/core/init/stall_avoider.ts + 1 modules
9665
- var stall_avoider = __webpack_require__(467);
9664
+ // EXTERNAL MODULE: ./src/core/init/rebuffering_controller.ts + 1 modules
9665
+ var rebuffering_controller = __webpack_require__(342);
9666
9666
  // EXTERNAL MODULE: ./src/core/init/throw_on_media_error.ts
9667
9667
  var throw_on_media_error = __webpack_require__(2447);
9668
- // EXTERNAL MODULE: ./src/core/init/update_playback_rate.ts
9669
- var update_playback_rate = __webpack_require__(2983);
9670
9668
  ;// CONCATENATED MODULE: ./src/core/init/initialize_directfile.ts
9671
9669
  /**
9672
9670
  * Copyright 2015 CANAL+ Group
@@ -9696,7 +9694,6 @@ var update_playback_rate = __webpack_require__(2983);
9696
9694
 
9697
9695
 
9698
9696
 
9699
-
9700
9697
  // NOTE As of now (RxJS 7.4.0), RxJS defines `ignoreElements` default
9701
9698
  // first type parameter as `any` instead of the perfectly fine `unknown`,
9702
9699
  // leading to linter issues, as it forbids the usage of `any`.
@@ -9776,14 +9773,11 @@ function initializeDirectfileContent(_ref) {
9776
9773
  // through a throwing Observable.
9777
9774
  var mediaError$ = (0,throw_on_media_error/* default */.Z)(mediaElement);
9778
9775
  var observation$ = playbackObserver.getReference().asObservable();
9779
- // Set the speed set by the user on the media element while pausing a
9780
- // little longer while the buffer is empty.
9781
- var playbackRate$ = (0,update_playback_rate/* default */.Z)(mediaElement, speed, observation$).pipe((0,ignoreElements/* ignoreElements */.l)());
9782
9776
  /**
9783
9777
  * Observable trying to avoid various stalling situations, emitting "stalled"
9784
9778
  * events when it cannot, as well as "unstalled" events when it get out of one.
9785
9779
  */
9786
- var stallAvoider$ = (0,stall_avoider/* default */.Z)(playbackObserver, null, speed, empty/* EMPTY */.E, empty/* EMPTY */.E);
9780
+ var rebuffer$ = (0,rebuffering_controller/* default */.Z)(playbackObserver, null, speed, empty/* EMPTY */.E, empty/* EMPTY */.E);
9787
9781
  /**
9788
9782
  * Emit a "loaded" events once the initial play has been performed and the
9789
9783
  * media can begin playback.
@@ -9799,7 +9793,7 @@ function initializeDirectfileContent(_ref) {
9799
9793
  }
9800
9794
  return (0,emit_loaded_event/* default */.Z)(observation$, mediaElement, null, true);
9801
9795
  }));
9802
- return (0,merge/* merge */.T)(loadingEvts$, drmEvents$.pipe((0,ignoreElements/* ignoreElements */.l)()), mediaError$, playbackRate$, stallAvoider$);
9796
+ return (0,merge/* merge */.T)(loadingEvts$, drmEvents$.pipe((0,ignoreElements/* ignoreElements */.l)()), mediaError$, rebuffer$);
9803
9797
  }
9804
9798
 
9805
9799
  /***/ }),
@@ -9978,14 +9972,14 @@ function linkDrmAndContent(mediaElement, keySystems, contentProtections$, linkin
9978
9972
 
9979
9973
  /***/ }),
9980
9974
 
9981
- /***/ 467:
9975
+ /***/ 342:
9982
9976
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
9983
9977
 
9984
9978
  "use strict";
9985
9979
 
9986
9980
  // EXPORTS
9987
9981
  __webpack_require__.d(__webpack_exports__, {
9988
- "Z": function() { return /* binding */ StallAvoider; }
9982
+ "Z": function() { return /* binding */ RebufferingController; }
9989
9983
  });
9990
9984
 
9991
9985
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/withLatestFrom.js
@@ -10000,6 +9994,8 @@ var ignoreElements = __webpack_require__(533);
10000
9994
  var map = __webpack_require__(9127);
10001
9995
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/merge.js
10002
9996
  var merge = __webpack_require__(3071);
9997
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/finalize.js
9998
+ var finalize = __webpack_require__(3286);
10003
9999
  // EXTERNAL MODULE: ./src/compat/browser_detection.ts
10004
10000
  var browser_detection = __webpack_require__(3666);
10005
10001
  ;// CONCATENATED MODULE: ./src/compat/is_seeking_approximate.ts
@@ -10040,9 +10036,11 @@ var media_error = __webpack_require__(3714);
10040
10036
  var log = __webpack_require__(3887);
10041
10037
  // EXTERNAL MODULE: ./src/utils/ranges.ts
10042
10038
  var ranges = __webpack_require__(2829);
10039
+ // EXTERNAL MODULE: ./src/utils/task_canceller.ts
10040
+ var task_canceller = __webpack_require__(288);
10043
10041
  // EXTERNAL MODULE: ./src/core/stream/events_generators.ts
10044
10042
  var events_generators = __webpack_require__(8567);
10045
- ;// CONCATENATED MODULE: ./src/core/init/stall_avoider.ts
10043
+ ;// CONCATENATED MODULE: ./src/core/init/rebuffering_controller.ts
10046
10044
  /**
10047
10045
  * Copyright 2015 CANAL+ Group
10048
10046
  *
@@ -10065,13 +10063,17 @@ var events_generators = __webpack_require__(8567);
10065
10063
 
10066
10064
 
10067
10065
 
10066
+
10068
10067
  /**
10069
10068
  * Work-around rounding errors with floating points by setting an acceptable,
10070
10069
  * very short, deviation when checking equalities.
10071
10070
  */
10072
10071
  var EPSILON = 1 / 60;
10073
10072
  /**
10074
- * Monitor situations where playback is stalled and try to get out of those.
10073
+ * Monitor playback, trying to avoid stalling situation.
10074
+ * If stopping the player to build buffer is needed, temporarily set the
10075
+ * playback rate (i.e. speed) at `0` until enough buffer is available again.
10076
+ *
10075
10077
  * Emit "stalled" then "unstalled" respectively when an unavoidable stall is
10076
10078
  * encountered and exited.
10077
10079
  * @param {object} playbackObserver - emit the current playback conditions.
@@ -10083,7 +10085,7 @@ var EPSILON = 1 / 60;
10083
10085
  * discontinuities for loaded Period and buffer types.
10084
10086
  * @returns {Observable}
10085
10087
  */
10086
- function StallAvoider(playbackObserver, manifest, speed, lockedStream$, discontinuityUpdate$) {
10088
+ function RebufferingController(playbackObserver, manifest, speed, lockedStream$, discontinuityUpdate$) {
10087
10089
  var initialDiscontinuitiesStore = [];
10088
10090
  /**
10089
10091
  * Emit every known audio and video buffer discontinuities in chronological
@@ -10145,6 +10147,7 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10145
10147
  // This is why we're disabling the eslint rule.
10146
10148
  /* eslint-disable-next-line @typescript-eslint/no-unsafe-argument */
10147
10149
  (0,ignoreElements/* ignoreElements */.l)());
10150
+ var playbackRateUpdater = new PlaybackRateUpdater(playbackObserver, speed);
10148
10151
  var stall$ = playbackObserver.getReference().asObservable().pipe((0,withLatestFrom/* withLatestFrom */.M)(discontinuitiesStore$), (0,map/* map */.U)(function (_ref3) {
10149
10152
  var observation = _ref3[0],
10150
10153
  discontinuitiesStore = _ref3[1];
@@ -10177,6 +10180,11 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10177
10180
  };
10178
10181
  }
10179
10182
  if (_now - freezing.timestamp > FREEZING_STALLED_DELAY) {
10183
+ if (rebuffering === null || ignoredStallTimeStamp !== null) {
10184
+ playbackRateUpdater.stopRebuffering();
10185
+ } else {
10186
+ playbackRateUpdater.startRebuffering();
10187
+ }
10180
10188
  return {
10181
10189
  type: "stalled",
10182
10190
  value: "freezing"
@@ -10186,6 +10194,7 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10186
10194
  prevFreezingState = null;
10187
10195
  }
10188
10196
  if (rebuffering === null) {
10197
+ playbackRateUpdater.stopRebuffering();
10189
10198
  if (readyState === 1) {
10190
10199
  // With a readyState set to 1, we should still not be able to play:
10191
10200
  // Return that we're stalled
@@ -10211,6 +10220,7 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10211
10220
  if (ignoredStallTimeStamp !== null) {
10212
10221
  var _now2 = performance.now();
10213
10222
  if (_now2 - ignoredStallTimeStamp < FORCE_DISCONTINUITY_SEEK_DELAY) {
10223
+ playbackRateUpdater.stopRebuffering();
10214
10224
  log/* default.debug */.Z.debug("Init: letting the device get out of a stall by itself");
10215
10225
  return {
10216
10226
  type: "stalled",
@@ -10221,6 +10231,7 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10221
10231
  }
10222
10232
  }
10223
10233
  ignoredStallTimeStamp = null;
10234
+ playbackRateUpdater.startRebuffering();
10224
10235
  if (manifest === null) {
10225
10236
  return {
10226
10237
  type: "stalled",
@@ -10277,7 +10288,9 @@ function StallAvoider(playbackObserver, manifest, speed, lockedStream$, disconti
10277
10288
  value: stalledReason
10278
10289
  };
10279
10290
  }));
10280
- return (0,merge/* merge */.T)(unlock$, stall$);
10291
+ return (0,merge/* merge */.T)(unlock$, stall$).pipe((0,finalize/* finalize */.x)(function () {
10292
+ playbackRateUpdater.dispose();
10293
+ }));
10281
10294
  }
10282
10295
  /**
10283
10296
  * @param {Array.<Object>} discontinuitiesStore
@@ -10387,6 +10400,82 @@ function updateDiscontinuitiesStore(discontinuitiesStore, evt, observation) {
10387
10400
  function generateDiscontinuityError(stalledPosition, seekTo) {
10388
10401
  return new media_error/* default */.Z("DISCONTINUITY_ENCOUNTERED", "A discontinuity has been encountered at position " + String(stalledPosition) + ", seeked at position " + String(seekTo));
10389
10402
  }
10403
+ /**
10404
+ * Manage playback speed, allowing to force a playback rate of `0` when
10405
+ * rebuffering is wanted.
10406
+ *
10407
+ * Only one `PlaybackRateUpdater` should be created per HTMLMediaElement.
10408
+ * Note that the `PlaybackRateUpdater` reacts to playback event and wanted
10409
+ * speed change. You should call its `dispose` method once you don't need it
10410
+ * anymore.
10411
+ * @class PlaybackRateUpdater
10412
+ */
10413
+ var PlaybackRateUpdater = /*#__PURE__*/function () {
10414
+ /**
10415
+ * Create a new `PlaybackRateUpdater`.
10416
+ * @param {Object} playbackObserver
10417
+ * @param {Object} speed
10418
+ */
10419
+ function PlaybackRateUpdater(playbackObserver, speed) {
10420
+ this._speedUpdateCanceller = new task_canceller/* default */.ZP();
10421
+ this._isRebuffering = false;
10422
+ this._playbackObserver = playbackObserver;
10423
+ this._isDisposed = false;
10424
+ this._speed = speed;
10425
+ this._updateSpeed();
10426
+ }
10427
+ /**
10428
+ * Force the playback rate to `0`, to start a rebuffering phase.
10429
+ *
10430
+ * You can call `stopRebuffering` when you want the rebuffering phase to end.
10431
+ */
10432
+ var _proto = PlaybackRateUpdater.prototype;
10433
+ _proto.startRebuffering = function startRebuffering() {
10434
+ if (this._isRebuffering || this._isDisposed) {
10435
+ return;
10436
+ }
10437
+ this._isRebuffering = true;
10438
+ this._speedUpdateCanceller.cancel();
10439
+ log/* default.info */.Z.info("Init: Pause playback to build buffer");
10440
+ this._playbackObserver.setPlaybackRate(0);
10441
+ }
10442
+ /**
10443
+ * If in a rebuffering phase (during which the playback rate is forced to
10444
+ * `0`), exit that phase to apply the wanted playback rate instead.
10445
+ *
10446
+ * Do nothing if not in a rebuffering phase.
10447
+ */;
10448
+ _proto.stopRebuffering = function stopRebuffering() {
10449
+ if (!this._isRebuffering || this._isDisposed) {
10450
+ return;
10451
+ }
10452
+ this._isRebuffering = false;
10453
+ this._speedUpdateCanceller = new task_canceller/* default */.ZP();
10454
+ this._updateSpeed();
10455
+ }
10456
+ /**
10457
+ * The `PlaybackRateUpdater` allocate resources to for example listen to
10458
+ * wanted speed changes and react to it.
10459
+ *
10460
+ * Consequently, you should call the `dispose` method, when you don't want the
10461
+ * `PlaybackRateUpdater` to have an effect anymore.
10462
+ */;
10463
+ _proto.dispose = function dispose() {
10464
+ this._speedUpdateCanceller.cancel();
10465
+ this._isDisposed = true;
10466
+ };
10467
+ _proto._updateSpeed = function _updateSpeed() {
10468
+ var _this = this;
10469
+ this._speed.onUpdate(function (lastSpeed) {
10470
+ log/* default.info */.Z.info("Init: Resume playback speed", lastSpeed);
10471
+ _this._playbackObserver.setPlaybackRate(lastSpeed);
10472
+ }, {
10473
+ clearSignal: this._speedUpdateCanceller.signal,
10474
+ emitCurrentValue: true
10475
+ });
10476
+ };
10477
+ return PlaybackRateUpdater;
10478
+ }();
10390
10479
 
10391
10480
  /***/ }),
10392
10481
 
@@ -10456,69 +10545,6 @@ function throwOnMediaError(mediaElement) {
10456
10545
 
10457
10546
  /***/ }),
10458
10547
 
10459
- /***/ 2983:
10460
- /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10461
-
10462
- "use strict";
10463
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
10464
- /* harmony export */ "Z": function() { return /* binding */ updatePlaybackRate; }
10465
- /* harmony export */ });
10466
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9127);
10467
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6108);
10468
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3741);
10469
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(4978);
10470
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9917);
10471
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(2817);
10472
- /* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(2006);
10473
- /* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3887);
10474
- /**
10475
- * Copyright 2015 CANAL+ Group
10476
- *
10477
- * Licensed under the Apache License, Version 2.0 (the "License");
10478
- * you may not use this file except in compliance with the License.
10479
- * You may obtain a copy of the License at
10480
- *
10481
- * http://www.apache.org/licenses/LICENSE-2.0
10482
- *
10483
- * Unless required by applicable law or agreed to in writing, software
10484
- * distributed under the License is distributed on an "AS IS" BASIS,
10485
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10486
- * See the License for the specific language governing permissions and
10487
- * limitations under the License.
10488
- */
10489
-
10490
-
10491
- /**
10492
- * Manage playback speed.
10493
- * Set playback rate set by the user, pause playback when the player appear to
10494
- * rebuffering and restore the speed once it appears to exit rebuffering status.
10495
- *
10496
- * @param {HTMLMediaElement} mediaElement
10497
- * @param {Observable} speed - last speed set by the user
10498
- * @param {Observable} observation$ - Current playback conditions
10499
- * @returns {Observable}
10500
- */
10501
- function updatePlaybackRate(mediaElement, speed, observation$) {
10502
- var forcePause$ = observation$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_0__/* .map */ .U)(function (observation) {
10503
- return observation.rebuffering !== null;
10504
- }), (0,rxjs__WEBPACK_IMPORTED_MODULE_1__/* .startWith */ .O)(false), (0,rxjs__WEBPACK_IMPORTED_MODULE_2__/* .distinctUntilChanged */ .x)());
10505
- return forcePause$.pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_3__/* .switchMap */ .w)(function (shouldForcePause) {
10506
- if (shouldForcePause) {
10507
- return (0,rxjs__WEBPACK_IMPORTED_MODULE_4__/* .defer */ .P)(function () {
10508
- _log__WEBPACK_IMPORTED_MODULE_5__/* ["default"].info */ .Z.info("Init: Pause playback to build buffer");
10509
- mediaElement.playbackRate = 0;
10510
- return (0,rxjs__WEBPACK_IMPORTED_MODULE_6__.of)(0);
10511
- });
10512
- }
10513
- return speed.asObservable().pipe((0,rxjs__WEBPACK_IMPORTED_MODULE_7__/* .tap */ .b)(function (lastSpeed) {
10514
- _log__WEBPACK_IMPORTED_MODULE_5__/* ["default"].info */ .Z.info("Init: Resume playback speed", lastSpeed);
10515
- mediaElement.playbackRate = lastSpeed;
10516
- }));
10517
- }));
10518
- }
10519
-
10520
- /***/ }),
10521
-
10522
10548
  /***/ 7127:
10523
10549
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
10524
10550
 
@@ -24891,12 +24917,7 @@ function applyExtent(element, extent) {
24891
24917
  log/* default.warn */.Z.warn("TTML Parser: unhandled extent unit:", firstExtent[2]);
24892
24918
  }
24893
24919
  if (secondExtent[2] === "px" || secondExtent[2] === "%" || secondExtent[2] === "em") {
24894
- var toNum = Number(secondExtent[1]);
24895
- if (secondExtent[2] === "%" && !isNaN(toNum) && (toNum < 0 || toNum > 100)) {
24896
- element.style.width = "80%";
24897
- } else {
24898
- element.style.height = secondExtent[1] + secondExtent[2];
24899
- }
24920
+ element.style.height = secondExtent[1] + secondExtent[2];
24900
24921
  } else if (secondExtent[2] === "c") {
24901
24922
  addClassName(element, "proportional-style");
24902
24923
  element.setAttribute("data-proportional-height", secondExtent[1]);
@@ -25043,13 +25064,7 @@ function applyOrigin(element, origin) {
25043
25064
  log/* default.warn */.Z.warn("TTML Parser: unhandled origin unit:", firstOrigin[2]);
25044
25065
  }
25045
25066
  if (secondOrigin[2] === "px" || secondOrigin[2] === "%" || secondOrigin[2] === "em") {
25046
- var toNum = Number(secondOrigin[1]);
25047
- if (secondOrigin[2] === "%" && !isNaN(toNum) && (toNum < 0 || toNum > 100)) {
25048
- element.style.bottom = "5%";
25049
- element.style.left = "10%";
25050
- } else {
25051
- element.style.top = secondOrigin[1] + secondOrigin[2];
25052
- }
25067
+ element.style.top = secondOrigin[1] + secondOrigin[2];
25053
25068
  } else if (secondOrigin[2] === "c") {
25054
25069
  addClassName(element, "proportional-style");
25055
25070
  element.setAttribute("data-proportional-top", secondOrigin[1]);
@@ -39328,60 +39343,47 @@ function catchError(selector) {
39328
39343
 
39329
39344
  /***/ }),
39330
39345
 
39331
- /***/ 3741:
39346
+ /***/ 4975:
39332
39347
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
39333
39348
 
39334
39349
  "use strict";
39335
39350
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39336
- /* harmony export */ "x": function() { return /* binding */ distinctUntilChanged; }
39351
+ /* harmony export */ "h": function() { return /* binding */ filter; }
39337
39352
  /* harmony export */ });
39338
- /* harmony import */ var _util_identity__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(278);
39339
- /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(6798);
39340
- /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(2566);
39341
-
39353
+ /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6798);
39354
+ /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2566);
39342
39355
 
39343
39356
 
39344
- function distinctUntilChanged(comparator, keySelector) {
39345
- if (keySelector === void 0) { keySelector = _util_identity__WEBPACK_IMPORTED_MODULE_0__/* .identity */ .y; }
39346
- comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;
39347
- return (0,_util_lift__WEBPACK_IMPORTED_MODULE_1__/* .operate */ .e)(function (source, subscriber) {
39348
- var previousKey;
39349
- var first = true;
39350
- source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_2__/* .createOperatorSubscriber */ .x)(subscriber, function (value) {
39351
- var currentKey = keySelector(value);
39352
- if (first || !comparator(previousKey, currentKey)) {
39353
- first = false;
39354
- previousKey = currentKey;
39355
- subscriber.next(value);
39356
- }
39357
- }));
39357
+ function filter(predicate, thisArg) {
39358
+ return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__/* .operate */ .e)(function (source, subscriber) {
39359
+ var index = 0;
39360
+ source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__/* .createOperatorSubscriber */ .x)(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));
39358
39361
  });
39359
39362
  }
39360
- function defaultCompare(a, b) {
39361
- return a === b;
39362
- }
39363
- //# sourceMappingURL=distinctUntilChanged.js.map
39363
+ //# sourceMappingURL=filter.js.map
39364
39364
 
39365
39365
  /***/ }),
39366
39366
 
39367
- /***/ 4975:
39367
+ /***/ 3286:
39368
39368
  /***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
39369
39369
 
39370
39370
  "use strict";
39371
39371
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
39372
- /* harmony export */ "h": function() { return /* binding */ filter; }
39372
+ /* harmony export */ "x": function() { return /* binding */ finalize; }
39373
39373
  /* harmony export */ });
39374
39374
  /* harmony import */ var _util_lift__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(6798);
39375
- /* harmony import */ var _OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2566);
39376
-
39377
39375
 
39378
- function filter(predicate, thisArg) {
39376
+ function finalize(callback) {
39379
39377
  return (0,_util_lift__WEBPACK_IMPORTED_MODULE_0__/* .operate */ .e)(function (source, subscriber) {
39380
- var index = 0;
39381
- source.subscribe((0,_OperatorSubscriber__WEBPACK_IMPORTED_MODULE_1__/* .createOperatorSubscriber */ .x)(subscriber, function (value) { return predicate.call(thisArg, value, index++) && subscriber.next(value); }));
39378
+ try {
39379
+ source.subscribe(subscriber);
39380
+ }
39381
+ finally {
39382
+ subscriber.add(callback);
39383
+ }
39382
39384
  });
39383
39385
  }
39384
- //# sourceMappingURL=filter.js.map
39386
+ //# sourceMappingURL=finalize.js.map
39385
39387
 
39386
39388
  /***/ }),
39387
39389
 
@@ -41684,8 +41686,36 @@ var take = __webpack_require__(4727);
41684
41686
  var takeUntil = __webpack_require__(3505);
41685
41687
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/map.js
41686
41688
  var map = __webpack_require__(9127);
41687
- // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js
41688
- var distinctUntilChanged = __webpack_require__(3741);
41689
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/identity.js
41690
+ var identity = __webpack_require__(278);
41691
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/lift.js
41692
+ var lift = __webpack_require__(6798);
41693
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
41694
+ var OperatorSubscriber = __webpack_require__(2566);
41695
+ ;// CONCATENATED MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/distinctUntilChanged.js
41696
+
41697
+
41698
+
41699
+ function distinctUntilChanged(comparator, keySelector) {
41700
+ if (keySelector === void 0) { keySelector = identity/* identity */.y; }
41701
+ comparator = comparator !== null && comparator !== void 0 ? comparator : defaultCompare;
41702
+ return (0,lift/* operate */.e)(function (source, subscriber) {
41703
+ var previousKey;
41704
+ var first = true;
41705
+ source.subscribe((0,OperatorSubscriber/* createOperatorSubscriber */.x)(subscriber, function (value) {
41706
+ var currentKey = keySelector(value);
41707
+ if (first || !comparator(previousKey, currentKey)) {
41708
+ first = false;
41709
+ previousKey = currentKey;
41710
+ subscriber.next(value);
41711
+ }
41712
+ }));
41713
+ });
41714
+ }
41715
+ function defaultCompare(a, b) {
41716
+ return a === b;
41717
+ }
41718
+ //# sourceMappingURL=distinctUntilChanged.js.map
41689
41719
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/Observable.js + 1 modules
41690
41720
  var Observable = __webpack_require__(1480);
41691
41721
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/of.js
@@ -41753,8 +41783,6 @@ function isPOJO(obj) {
41753
41783
  //# sourceMappingURL=argsArgArrayOrObject.js.map
41754
41784
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/from.js + 8 modules
41755
41785
  var from = __webpack_require__(3102);
41756
- // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/identity.js
41757
- var identity = __webpack_require__(278);
41758
41786
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/mapOneOrManyArgs.js
41759
41787
  var mapOneOrManyArgs = __webpack_require__(3211);
41760
41788
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/args.js
@@ -41764,8 +41792,6 @@ function createObject(keys, values) {
41764
41792
  return keys.reduce(function (result, key, i) { return ((result[key] = values[i]), result); }, {});
41765
41793
  }
41766
41794
  //# sourceMappingURL=createObject.js.map
41767
- // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/OperatorSubscriber.js
41768
- var OperatorSubscriber = __webpack_require__(2566);
41769
41795
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/executeSchedule.js
41770
41796
  var executeSchedule = __webpack_require__(7845);
41771
41797
  ;// CONCATENATED MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/combineLatest.js
@@ -41849,8 +41875,6 @@ var switchMap = __webpack_require__(4978);
41849
41875
  var merge = __webpack_require__(3071);
41850
41876
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/observable/empty.js
41851
41877
  var empty = __webpack_require__(1545);
41852
- // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/util/lift.js
41853
- var lift = __webpack_require__(6798);
41854
41878
  ;// CONCATENATED MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/skipWhile.js
41855
41879
 
41856
41880
 
@@ -43102,19 +43126,8 @@ function isPromise(val) {
43102
43126
  */
43103
43127
 
43104
43128
  /* harmony default export */ var fetchers_manifest = (ManifestFetcher);
43105
- ;// CONCATENATED MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/finalize.js
43106
-
43107
- function finalize(callback) {
43108
- return (0,lift/* operate */.e)(function (source, subscriber) {
43109
- try {
43110
- source.subscribe(subscriber);
43111
- }
43112
- finally {
43113
- subscriber.add(callback);
43114
- }
43115
- });
43116
- }
43117
- //# sourceMappingURL=finalize.js.map
43129
+ // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/finalize.js
43130
+ var finalize = __webpack_require__(3286);
43118
43131
  // EXTERNAL MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/ignoreElements.js
43119
43132
  var ignoreElements = __webpack_require__(533);
43120
43133
  ;// CONCATENATED MODULE: ./src/compat/should_reload_media_source_on_decipherability_update.ts
@@ -47747,7 +47760,7 @@ var DownloadingQueue = /*#__PURE__*/function () {
47747
47760
  var self = this;
47748
47761
  return (0,defer/* defer */.P)(function () {
47749
47762
  return recursivelyRequestSegments(currentNeededSegment);
47750
- }).pipe(finalize(function () {
47763
+ }).pipe((0,finalize/* finalize */.x)(function () {
47751
47764
  _this2._mediaSegmentRequest = null;
47752
47765
  }));
47753
47766
  function recursivelyRequestSegments(startingSegment) {
@@ -49809,7 +49822,7 @@ function AdaptationStream(_ref) {
49809
49822
  var bitrateEstimate$ = abrEstimate$.pipe((0,filter/* filter */.h)(function (_ref2) {
49810
49823
  var bitrate = _ref2.bitrate;
49811
49824
  return bitrate != null;
49812
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(function (old, current) {
49825
+ }), distinctUntilChanged(function (old, current) {
49813
49826
  return old.bitrate === current.bitrate;
49814
49827
  }), (0,map/* map */.U)(function (_ref3) {
49815
49828
  var bitrate = _ref3.bitrate;
@@ -49888,7 +49901,7 @@ function AdaptationStream(_ref) {
49888
49901
  // Do not fast-switch anything
49889
49902
  lastEstimate.asObservable().pipe((0,map/* map */.U)(function (estimate) {
49890
49903
  return estimate === null ? undefined : estimate.knownStableBitrate;
49891
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
49904
+ }), distinctUntilChanged());
49892
49905
  var representationChange$ = (0,of.of)(stream_events_generators/* default.representationChange */.Z.representationChange(adaptation.type, period, representation));
49893
49906
  return (0,concat/* concat */.z)(representationChange$, createRepresentationStream(representation, terminateCurrentStream$, fastSwitchThreshold$)).pipe((0,tap/* tap */.b)(function (evt) {
49894
49907
  if (evt.type === "added-segment") {
@@ -50706,7 +50719,7 @@ function ActivePeriodEmitter(buffers$) {
50706
50719
  }
50707
50720
  return period.start < acc.start ? period : acc;
50708
50721
  }, null);
50709
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(function (a, b) {
50722
+ }), distinctUntilChanged(function (a, b) {
50710
50723
  return a === null && b === null || a !== null && b !== null && a.id === b.id;
50711
50724
  }));
50712
50725
  }
@@ -50759,13 +50772,13 @@ function areStreamsComplete() {
50759
50772
  return evt.type === "complete-stream" || evt.type === "stream-status" && !evt.value.hasFinishedLoading;
50760
50773
  }), (0,map/* map */.U)(function (evt) {
50761
50774
  return evt.type === "complete-stream";
50762
- }), (0,startWith/* startWith */.O)(false), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
50775
+ }), (0,startWith/* startWith */.O)(false), distinctUntilChanged());
50763
50776
  });
50764
50777
  return combineLatest(isCompleteArray).pipe((0,map/* map */.U)(function (areComplete) {
50765
50778
  return areComplete.every(function (isComplete) {
50766
50779
  return isComplete;
50767
50780
  });
50768
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
50781
+ }), distinctUntilChanged());
50769
50782
  }
50770
50783
  ;// CONCATENATED MODULE: ./src/core/stream/orchestrator/get_time_ranges_for_content.ts
50771
50784
  /**
@@ -50945,14 +50958,14 @@ function StreamOrchestrator(content, playbackObserver, representationEstimator,
50945
50958
  }));
50946
50959
  var isLastPeriodKnown$ = (0,event_emitter/* fromEvent */.R)(manifest, "manifestUpdate").pipe((0,map/* map */.U)(function () {
50947
50960
  return manifest.isLastPeriodKnown;
50948
- }), (0,startWith/* startWith */.O)(manifest.isLastPeriodKnown), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
50961
+ }), (0,startWith/* startWith */.O)(manifest.isLastPeriodKnown), distinctUntilChanged());
50949
50962
  // Emits an "end-of-stream" event once every PeriodStream are complete.
50950
50963
  // Emits a 'resume-stream" when it's not
50951
50964
  var endOfStream$ = combineLatest([areStreamsComplete.apply(void 0, streamsArray), isLastPeriodKnown$]).pipe((0,map/* map */.U)(function (_ref) {
50952
50965
  var areComplete = _ref[0],
50953
50966
  isLastPeriodKnown = _ref[1];
50954
50967
  return areComplete && isLastPeriodKnown;
50955
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(), (0,map/* map */.U)(function (emitEndOfStream) {
50968
+ }), distinctUntilChanged(), (0,map/* map */.U)(function (emitEndOfStream) {
50956
50969
  return emitEndOfStream ? stream_events_generators/* default.endOfStream */.Z.endOfStream() : stream_events_generators/* default.resumeStream */.Z.resumeStream();
50957
50970
  }));
50958
50971
  return merge/* merge.apply */.T.apply(void 0, streamsArray.concat([activePeriodChanged$, endOfStream$]));
@@ -51363,7 +51376,7 @@ function ContentTimeBoundariesObserver(manifest, lastAdaptationChange, playbackO
51363
51376
  }), (0,ignoreElements/* ignoreElements */.l)());
51364
51377
  return (0,merge/* merge */.T)(updateDurationOnManifestUpdate$, updateDurationAndTimeBoundsOnTrackChange$, outOfManifest$, contentDuration.asObservable().pipe(skipWhile(function (val) {
51365
51378
  return val === undefined;
51366
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(), (0,map/* map */.U)(function (value) {
51379
+ }), distinctUntilChanged(), (0,map/* map */.U)(function (value) {
51367
51380
  return {
51368
51381
  type: "contentDurationUpdate",
51369
51382
  value: value
@@ -51985,7 +51998,7 @@ function areSourceBuffersUpdating$(sourceBuffers) {
51985
51998
  return false;
51986
51999
  })), interval(500).pipe((0,map/* map */.U)(function () {
51987
52000
  return sourceBuffer.updating;
51988
- }))).pipe((0,startWith/* startWith */.O)(sourceBuffer.updating), (0,distinctUntilChanged/* distinctUntilChanged */.x)()));
52001
+ }))).pipe((0,startWith/* startWith */.O)(sourceBuffer.updating), distinctUntilChanged()));
51989
52002
  };
51990
52003
  for (var i = 0; i < sourceBuffers.length; i++) {
51991
52004
  _loop(i);
@@ -51994,7 +52007,7 @@ function areSourceBuffersUpdating$(sourceBuffers) {
51994
52007
  return areUpdating.some(function (isUpdating) {
51995
52008
  return isUpdating;
51996
52009
  });
51997
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
52010
+ }), distinctUntilChanged());
51998
52011
  }
51999
52012
  /**
52000
52013
  * Emit a boolean that tells if the media source is opened or not.
@@ -52008,10 +52021,10 @@ function isMediaSourceOpened$(mediaSource) {
52008
52021
  return false;
52009
52022
  })), (0,event_listeners/* onSourceClose$ */.UG)(mediaSource).pipe((0,map/* map */.U)(function () {
52010
52023
  return false;
52011
- }))).pipe((0,startWith/* startWith */.O)(mediaSource.readyState === "open"), (0,distinctUntilChanged/* distinctUntilChanged */.x)());
52024
+ }))).pipe((0,startWith/* startWith */.O)(mediaSource.readyState === "open"), distinctUntilChanged());
52012
52025
  }
52013
- // EXTERNAL MODULE: ./src/core/init/stall_avoider.ts + 1 modules
52014
- var stall_avoider = __webpack_require__(467);
52026
+ // EXTERNAL MODULE: ./src/core/init/rebuffering_controller.ts + 1 modules
52027
+ var rebuffering_controller = __webpack_require__(342);
52015
52028
  ;// CONCATENATED MODULE: ./node_modules/rxjs/dist/esm5/internal/operators/pairwise.js
52016
52029
 
52017
52030
 
@@ -52246,7 +52259,7 @@ function streamEventsEmitter(manifest, mediaElement, observation$) {
52246
52259
  return lastScheduledEvents = scheduledEvents;
52247
52260
  }), (0,map/* map */.U)(function (evt) {
52248
52261
  return evt.length > 0;
52249
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(), (0,switchMap/* switchMap */.w)(function (hasEvents) {
52262
+ }), distinctUntilChanged(), (0,switchMap/* switchMap */.w)(function (hasEvents) {
52250
52263
  if (!hasEvents) {
52251
52264
  return empty/* EMPTY */.E;
52252
52265
  }
@@ -52286,8 +52299,6 @@ function streamEventsEmitter(manifest, mediaElement, observation$) {
52286
52299
  */
52287
52300
 
52288
52301
  /* harmony default export */ var init_stream_events_emitter = (stream_events_emitter);
52289
- // EXTERNAL MODULE: ./src/core/init/update_playback_rate.ts
52290
- var update_playback_rate = __webpack_require__(2983);
52291
52302
  ;// CONCATENATED MODULE: ./src/core/init/load_on_media_source.ts
52292
52303
  /**
52293
52304
  * Copyright 2015 CANAL+ Group
@@ -52318,7 +52329,6 @@ var update_playback_rate = __webpack_require__(2983);
52318
52329
 
52319
52330
 
52320
52331
 
52321
-
52322
52332
  /**
52323
52333
  * Returns a function allowing to load or reload the content in arguments into
52324
52334
  * a single or multiple MediaSources.
@@ -52428,17 +52438,11 @@ function createMediaSourceLoader(_ref) {
52428
52438
  return (0,of.of)(evt);
52429
52439
  }
52430
52440
  }));
52431
- /**
52432
- * On subscription, keep the playback speed synchronized to the speed set by
52433
- * the user on the media element and force a speed of `0` when the buffer is
52434
- * empty, so it can build back buffer.
52435
- */
52436
- var playbackRate$ = (0,update_playback_rate/* default */.Z)(mediaElement, speed, observation$).pipe((0,ignoreElements/* ignoreElements */.l)());
52437
52441
  /**
52438
52442
  * Observable trying to avoid various stalling situations, emitting "stalled"
52439
52443
  * events when it cannot, as well as "unstalled" events when it get out of one.
52440
52444
  */
52441
- var stallAvoider$ = (0,stall_avoider/* default */.Z)(playbackObserver, manifest, speed, lockedStream$, discontinuityUpdate$);
52445
+ var rebuffer$ = (0,rebuffering_controller/* default */.Z)(playbackObserver, manifest, speed, lockedStream$, discontinuityUpdate$);
52442
52446
  /**
52443
52447
  * Emit a "loaded" events once the initial play has been performed and the
52444
52448
  * media can begin playback.
@@ -52447,7 +52451,7 @@ function createMediaSourceLoader(_ref) {
52447
52451
  var loadingEvts$ = seekAndPlay$.pipe((0,switchMap/* switchMap */.w)(function (evt) {
52448
52452
  return evt.type === "warning" ? (0,of.of)(evt) : (0,emit_loaded_event/* default */.Z)(observation$, mediaElement, segmentBuffersStore, false);
52449
52453
  }));
52450
- return (0,merge/* merge */.T)(loadingEvts$, playbackRate$, stallAvoider$, streams$, contentTimeObserver, streamEvents$).pipe(finalize(function () {
52454
+ return (0,merge/* merge */.T)(loadingEvts$, rebuffer$, streams$, contentTimeObserver, streamEvents$).pipe((0,finalize/* finalize */.x)(function () {
52451
52455
  mediaDurationUpdater.stop();
52452
52456
  // clean-up every created SegmentBuffers
52453
52457
  segmentBuffersStore.disposeAll();
@@ -52929,7 +52933,7 @@ function InitializeOnMediaSource(_ref) {
52929
52933
  var manifestEvents$ = (0,merge/* merge */.T)((0,event_emitter/* fromEvent */.R)(manifest, "manifestUpdate").pipe((0,map/* map */.U)(function () {
52930
52934
  return events_generators/* default.manifestUpdate */.Z.manifestUpdate();
52931
52935
  })), (0,event_emitter/* fromEvent */.R)(manifest, "decipherabilityUpdate").pipe((0,map/* map */.U)(events_generators/* default.decipherabilityUpdate */.Z.decipherabilityUpdate)));
52932
- return (0,merge/* merge */.T)(manifestEvents$, manifestUpdate$, recursiveLoad$).pipe((0,startWith/* startWith */.O)(events_generators/* default.manifestReady */.Z.manifestReady(manifest)), finalize(function () {
52936
+ return (0,merge/* merge */.T)(manifestEvents$, manifestUpdate$, recursiveLoad$).pipe((0,startWith/* startWith */.O)(events_generators/* default.manifestReady */.Z.manifestReady(manifest)), (0,finalize/* finalize */.x)(function () {
52933
52937
  scheduleRefresh$.complete();
52934
52938
  }));
52935
52939
  /**
@@ -52997,7 +53001,7 @@ function InitializeOnMediaSource(_ref) {
52997
53001
  return (0,merge/* merge */.T)(handleReloads$, currentLoad$);
52998
53002
  }
52999
53003
  }));
53000
- return (0,merge/* merge */.T)(loadContent$, mediaError$, drmEvents$.pipe((0,ignoreElements/* ignoreElements */.l)())).pipe(finalize(function () {
53004
+ return (0,merge/* merge */.T)(loadContent$, mediaError$, drmEvents$.pipe((0,ignoreElements/* ignoreElements */.l)())).pipe((0,finalize/* finalize */.x)(function () {
53001
53005
  playbackCanceller.cancel();
53002
53006
  }));
53003
53007
  }
@@ -53569,6 +53573,13 @@ var PlaybackObserver = /*#__PURE__*/function () {
53569
53573
  this._internalSeeksIncoming.push(time);
53570
53574
  this._mediaElement.currentTime = time;
53571
53575
  }
53576
+ /**
53577
+ * Update the playback rate of the `HTMLMediaElement`.
53578
+ * @param {number} playbackRate
53579
+ */;
53580
+ _proto.setPlaybackRate = function setPlaybackRate(playbackRate) {
53581
+ this._mediaElement.playbackRate = playbackRate;
53582
+ }
53572
53583
  /**
53573
53584
  * Returns the current `readyState` advertised by the `HTMLMediaElement`.
53574
53585
  * @returns {number}
@@ -55258,7 +55269,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55258
55269
  // Workaround to support Firefox autoplay on FF 42.
55259
55270
  // See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
55260
55271
  videoElement.preload = "auto";
55261
- _this.version = /* PLAYER_VERSION */"3.29.0-dev.2022103100";
55272
+ _this.version = /* PLAYER_VERSION */"3.29.0-dev.2022110200";
55262
55273
  _this.log = log/* default */.Z;
55263
55274
  _this.state = "STOPPED";
55264
55275
  _this.videoElement = videoElement;
@@ -55288,7 +55299,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55288
55299
  // payload when we perform multiple texttrack operations before the event
55289
55300
  // loop is freed.
55290
55301
  // In that case we only want to fire one time the observable.
55291
- (0,distinctUntilChanged/* distinctUntilChanged */.x)(function (textTracksA, textTracksB) {
55302
+ distinctUntilChanged(function (textTracksA, textTracksB) {
55292
55303
  if (textTracksA.length !== textTracksB.length) {
55293
55304
  return false;
55294
55305
  }
@@ -55735,7 +55746,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55735
55746
  return evt.type === "stalled" || evt.type === "unstalled";
55736
55747
  }), (0,map/* map */.U)(function (x) {
55737
55748
  return x.value;
55738
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(function (prevStallReason, currStallReason) {
55749
+ }), distinctUntilChanged(function (prevStallReason, currStallReason) {
55739
55750
  return prevStallReason === null && currStallReason === null || prevStallReason !== null && currStallReason !== null && prevStallReason === currStallReason;
55740
55751
  }));
55741
55752
  /** Emit when the content is considered "loaded". */
@@ -55778,7 +55789,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55778
55789
  skipWhile(function (state) {
55779
55790
  return isFirstLoad && state === "PAUSED";
55780
55791
  } /* PLAYER_STATES.PAUSED */)));
55781
- }))).pipe((0,distinctUntilChanged/* distinctUntilChanged */.x)());
55792
+ }))).pipe(distinctUntilChanged());
55782
55793
  var playbackSubscription;
55783
55794
  stoppedContent$.subscribe(function () {
55784
55795
  if (playbackSubscription !== undefined) {
@@ -55819,7 +55830,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
55819
55830
  }
55820
55831
  }), (0,map/* map */.U)(function (state) {
55821
55832
  return state !== "RELOADING" && state !== "STOPPED";
55822
- }), (0,distinctUntilChanged/* distinctUntilChanged */.x)(), (0,switchMap/* switchMap */.w)(function (canSendObservation) {
55833
+ }), distinctUntilChanged(), (0,switchMap/* switchMap */.w)(function (canSendObservation) {
55823
55834
  return canSendObservation ? observation$ : empty/* EMPTY */.E;
55824
55835
  }), (0,takeUntil/* takeUntil */.R)(stoppedContent$)).subscribe(function (o) {
55825
55836
  updateReloadingMetadata(_this2.state);
@@ -57555,7 +57566,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
57555
57566
  }]);
57556
57567
  return Player;
57557
57568
  }(event_emitter/* default */.Z);
57558
- Player.version = /* PLAYER_VERSION */"3.29.0-dev.2022103100";
57569
+ Player.version = /* PLAYER_VERSION */"3.29.0-dev.2022110200";
57559
57570
  /* harmony default export */ var public_api = (Player);
57560
57571
  ;// CONCATENATED MODULE: ./src/core/api/index.ts
57561
57572
  /**