rx-player 3.33.4-dev.2024080600 → 3.33.4-dev.2024083000
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.
- package/CHANGELOG.md +10 -0
- package/VERSION +1 -1
- package/dist/_esm5.processed/compat/browser_detection.d.ts +3 -1
- package/dist/_esm5.processed/compat/browser_detection.js +7 -1
- package/dist/_esm5.processed/compat/can_reuse_media_keys.d.ts +2 -0
- package/dist/_esm5.processed/compat/can_reuse_media_keys.js +4 -2
- package/dist/_esm5.processed/core/api/public_api.js +2 -2
- package/dist/_esm5.processed/core/init/media_source_content_initializer.js +2 -2
- package/dist/_esm5.processed/core/init/utils/initial_seek_and_play.js +3 -1
- package/dist/rx-player.js +88 -83
- package/dist/rx-player.min.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v3.33.4 (upcoming)
|
|
4
|
+
|
|
5
|
+
### Bug fixes
|
|
6
|
+
|
|
7
|
+
- Compat: Fix autoPlay on Tizen when the content starts on a discontinuity [#1500]
|
|
8
|
+
|
|
9
|
+
### Other improvements
|
|
10
|
+
|
|
11
|
+
- DASH: provide a more precize calculation for the timeshift buffer depth [#1492]
|
|
12
|
+
|
|
3
13
|
## v3.33.3
|
|
4
14
|
|
|
5
15
|
### Bug fixes
|
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
3.33.4-dev.
|
|
1
|
+
3.33.4-dev.2024083000
|
|
@@ -37,8 +37,10 @@ declare let isWebOs2021: boolean;
|
|
|
37
37
|
declare let isWebOs2022: boolean;
|
|
38
38
|
/** `true` for Panasonic devices. */
|
|
39
39
|
declare let isPanasonic: boolean;
|
|
40
|
+
/** `true` we're relying on Philips's NetTv browser. */
|
|
41
|
+
declare let isPhilipsNetTv: boolean;
|
|
40
42
|
/** `true` for the PlayStation 5 game console. */
|
|
41
43
|
declare let isPlayStation5: boolean;
|
|
42
44
|
/** `true` for the Xbox game consoles. */
|
|
43
45
|
declare let isXbox: boolean;
|
|
44
|
-
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
46
|
+
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPhilipsNetTv, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
@@ -38,6 +38,8 @@ var isWebOs2021 = false;
|
|
|
38
38
|
var isWebOs2022 = false;
|
|
39
39
|
/** `true` for Panasonic devices. */
|
|
40
40
|
var isPanasonic = false;
|
|
41
|
+
/** `true` we're relying on Philips's NetTv browser. */
|
|
42
|
+
var isPhilipsNetTv = false;
|
|
41
43
|
/** `true` for the PlayStation 5 game console. */
|
|
42
44
|
var isPlayStation5 = false;
|
|
43
45
|
/** `true` for the Xbox game consoles. */
|
|
@@ -113,6 +115,10 @@ var isXbox = false;
|
|
|
113
115
|
isWebOs2021 = true;
|
|
114
116
|
}
|
|
115
117
|
}
|
|
118
|
+
else if (navigator.userAgent.indexOf("NETTV") !== -1 &&
|
|
119
|
+
navigator.userAgent.indexOf("Philips") !== -1) {
|
|
120
|
+
isPhilipsNetTv = true;
|
|
121
|
+
}
|
|
116
122
|
else if (/[Pp]anasonic/.test(navigator.userAgent)) {
|
|
117
123
|
isPanasonic = true;
|
|
118
124
|
}
|
|
@@ -120,4 +126,4 @@ var isXbox = false;
|
|
|
120
126
|
isXbox = true;
|
|
121
127
|
}
|
|
122
128
|
})());
|
|
123
|
-
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
129
|
+
export { isEdgeChromium, isIE11, isIEOrEdge, isFirefox, isPanasonic, isPhilipsNetTv, isPlayStation5, isXbox, isSafariDesktop, isSafariMobile, isSamsungBrowser, isTizen, isWebOs, isWebOs2021, isWebOs2022, };
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
* - (2022-11-21): WebOS (LG TVs), for some encrypted contents, just
|
|
8
8
|
* rebuffered indefinitely when loading a content already-loaded on the
|
|
9
9
|
* HTMLMediaElement.
|
|
10
|
+
* - (2024-08-23): Seen on Philips 2024 and 2023 in:
|
|
11
|
+
* https://github.com/canalplus/rx-player/issues/1464
|
|
10
12
|
*
|
|
11
13
|
* @returns {boolean}
|
|
12
14
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isPanasonic, isWebOs, } from "./browser_detection";
|
|
1
|
+
import { isPanasonic, isPhilipsNetTv, isWebOs, } from "./browser_detection";
|
|
2
2
|
/**
|
|
3
3
|
* Returns `true` if a `MediaKeys` instance (the `Encrypted Media Extension`
|
|
4
4
|
* concept) can be reused between contents.
|
|
@@ -8,9 +8,11 @@ import { isPanasonic, isWebOs, } from "./browser_detection";
|
|
|
8
8
|
* - (2022-11-21): WebOS (LG TVs), for some encrypted contents, just
|
|
9
9
|
* rebuffered indefinitely when loading a content already-loaded on the
|
|
10
10
|
* HTMLMediaElement.
|
|
11
|
+
* - (2024-08-23): Seen on Philips 2024 and 2023 in:
|
|
12
|
+
* https://github.com/canalplus/rx-player/issues/1464
|
|
11
13
|
*
|
|
12
14
|
* @returns {boolean}
|
|
13
15
|
*/
|
|
14
16
|
export default function canReuseMediaKeys() {
|
|
15
|
-
return !isWebOs && !isPanasonic;
|
|
17
|
+
return !isWebOs && !isPhilipsNetTv && !isPanasonic;
|
|
16
18
|
}
|
|
@@ -88,7 +88,7 @@ var Player = /** @class */ (function (_super) {
|
|
|
88
88
|
// Workaround to support Firefox autoplay on FF 42.
|
|
89
89
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
90
90
|
videoElement.preload = "auto";
|
|
91
|
-
_this.version = /* PLAYER_VERSION */ "3.33.4-dev.
|
|
91
|
+
_this.version = /* PLAYER_VERSION */ "3.33.4-dev.2024083000";
|
|
92
92
|
_this.log = log;
|
|
93
93
|
_this.state = "STOPPED";
|
|
94
94
|
_this.videoElement = videoElement;
|
|
@@ -2511,5 +2511,5 @@ var Player = /** @class */ (function (_super) {
|
|
|
2511
2511
|
Player._priv_currentlyUsedVideoElements = new WeakSet();
|
|
2512
2512
|
return Player;
|
|
2513
2513
|
}(EventEmitter));
|
|
2514
|
-
Player.version = /* PLAYER_VERSION */ "3.33.4-dev.
|
|
2514
|
+
Player.version = /* PLAYER_VERSION */ "3.33.4-dev.2024083000";
|
|
2515
2515
|
export default Player;
|
|
@@ -355,6 +355,8 @@ var MediaSourceContentInitializer = /** @class */ (function (_super) {
|
|
|
355
355
|
}, { clearSignal: cancelSignal, emitCurrentValue: true });
|
|
356
356
|
var streamObserver = createStreamPlaybackObserver(playbackObserver, { autoPlay: autoPlay, manifest: manifest, initialPlayPerformed: initialPlayPerformed, initialSeekPerformed: initialSeekPerformed, speed: speed, startTime: initialTime }, cancelSignal);
|
|
357
357
|
var rebufferingController = this._createRebufferingController(playbackObserver, manifest, speed, cancelSignal);
|
|
358
|
+
var contentTimeBoundariesObserver = this
|
|
359
|
+
._createContentTimeBoundariesObserver(manifest, mediaSource, streamObserver, segmentBuffersStore, cancelSignal);
|
|
358
360
|
if (mayMediaElementFailOnUndecipherableData) {
|
|
359
361
|
// On some devices, just reload immediately when data become undecipherable
|
|
360
362
|
manifest.addEventListener("decipherabilityUpdate", function (elts) {
|
|
@@ -363,8 +365,6 @@ var MediaSourceContentInitializer = /** @class */ (function (_super) {
|
|
|
363
365
|
}
|
|
364
366
|
}, cancelSignal);
|
|
365
367
|
}
|
|
366
|
-
var contentTimeBoundariesObserver = this
|
|
367
|
-
._createContentTimeBoundariesObserver(manifest, mediaSource, streamObserver, segmentBuffersStore, cancelSignal);
|
|
368
368
|
/**
|
|
369
369
|
* Emit a "loaded" events once the initial play has been performed and the
|
|
370
370
|
* media can begin playback.
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
import { shouldValidateMetadata } from "../../../compat";
|
|
17
17
|
import { READY_STATES } from "../../../compat/browser_compatibility_types";
|
|
18
18
|
import { isSafariMobile } from "../../../compat/browser_detection";
|
|
19
|
+
import isSeekingApproximate from "../../../compat/is_seeking_approximate";
|
|
19
20
|
/* eslint-disable-next-line max-len */
|
|
20
21
|
import shouldPreventSeekingAt0Initially from "../../../compat/should_prevent_seeking_at_0_initially";
|
|
21
22
|
import { MediaError } from "../../../errors";
|
|
@@ -110,7 +111,8 @@ export default function performInitialSeekAndPlay(mediaElement, playbackObserver
|
|
|
110
111
|
}
|
|
111
112
|
if (!isAwaitingSeek &&
|
|
112
113
|
!observation.seeking &&
|
|
113
|
-
observation.
|
|
114
|
+
((isSeekingApproximate && observation.readyState >= 3) ||
|
|
115
|
+
observation.rebuffering === null) &&
|
|
114
116
|
observation.readyState >= 1) {
|
|
115
117
|
stopListening();
|
|
116
118
|
onPlayable();
|
package/dist/rx-player.js
CHANGED
|
@@ -60,6 +60,7 @@ var READY_STATES = {
|
|
|
60
60
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
61
61
|
/* harmony export */ A7: function() { return /* binding */ isPlayStation5; },
|
|
62
62
|
/* harmony export */ Fr: function() { return /* binding */ isSafariDesktop; },
|
|
63
|
+
/* harmony export */ NV: function() { return /* binding */ isPhilipsNetTv; },
|
|
63
64
|
/* harmony export */ P5: function() { return /* binding */ isPanasonic; },
|
|
64
65
|
/* harmony export */ Pb: function() { return /* binding */ isSamsungBrowser; },
|
|
65
66
|
/* harmony export */ ZN: function() { return /* binding */ isTizen; },
|
|
@@ -113,6 +114,8 @@ var isWebOs2021 = false;
|
|
|
113
114
|
var isWebOs2022 = false;
|
|
114
115
|
/** `true` for Panasonic devices. */
|
|
115
116
|
var isPanasonic = false;
|
|
117
|
+
/** `true` we're relying on Philips's NetTv browser. */
|
|
118
|
+
var isPhilipsNetTv = false;
|
|
116
119
|
/** `true` for the PlayStation 5 game console. */
|
|
117
120
|
var isPlayStation5 = false;
|
|
118
121
|
/** `true` for the Xbox game consoles. */
|
|
@@ -168,6 +171,8 @@ var isXbox = false;
|
|
|
168
171
|
} else if (/[Ww]eb[O0]S.TV-2021/.test(navigator.userAgent) || /[Cc]hr[o0]me\/79/.test(navigator.userAgent)) {
|
|
169
172
|
isWebOs2021 = true;
|
|
170
173
|
}
|
|
174
|
+
} else if (navigator.userAgent.indexOf("NETTV") !== -1 && navigator.userAgent.indexOf("Philips") !== -1) {
|
|
175
|
+
isPhilipsNetTv = true;
|
|
171
176
|
} else if (/[Pp]anasonic/.test(navigator.userAgent)) {
|
|
172
177
|
isPanasonic = true;
|
|
173
178
|
} else if (navigator.userAgent.indexOf("Xbox") !== -1) {
|
|
@@ -726,6 +731,43 @@ var isNode = typeof window === "undefined";
|
|
|
726
731
|
|
|
727
732
|
/***/ }),
|
|
728
733
|
|
|
734
|
+
/***/ 7913:
|
|
735
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
736
|
+
|
|
737
|
+
"use strict";
|
|
738
|
+
/* harmony import */ var _browser_detection__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(443);
|
|
739
|
+
/**
|
|
740
|
+
* Copyright 2015 CANAL+ Group
|
|
741
|
+
*
|
|
742
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
743
|
+
* you may not use this file except in compliance with the License.
|
|
744
|
+
* You may obtain a copy of the License at
|
|
745
|
+
*
|
|
746
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
747
|
+
*
|
|
748
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
749
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
750
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
751
|
+
* See the License for the specific language governing permissions and
|
|
752
|
+
* limitations under the License.
|
|
753
|
+
*/
|
|
754
|
+
|
|
755
|
+
/**
|
|
756
|
+
* On some devices (right now only seen on Tizen), seeking through the
|
|
757
|
+
* `currentTime` property can lead to the browser re-seeking once the
|
|
758
|
+
* segments have been loaded to improve seeking performances (for
|
|
759
|
+
* example, by seeking right to an intra video frame).
|
|
760
|
+
*
|
|
761
|
+
* This can lead to conflicts with the RxPlayer code.
|
|
762
|
+
*
|
|
763
|
+
* This boolean is only `true` on the devices where this behavior has been
|
|
764
|
+
* observed.
|
|
765
|
+
*/
|
|
766
|
+
var isSeekingApproximate = _browser_detection__WEBPACK_IMPORTED_MODULE_0__/* .isTizen */ .ZN;
|
|
767
|
+
/* harmony default export */ __webpack_exports__.A = (isSeekingApproximate);
|
|
768
|
+
|
|
769
|
+
/***/ }),
|
|
770
|
+
|
|
729
771
|
/***/ 7402:
|
|
730
772
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
731
773
|
|
|
@@ -4898,11 +4940,13 @@ function _createOrLoadSession() {
|
|
|
4898
4940
|
* - (2022-11-21): WebOS (LG TVs), for some encrypted contents, just
|
|
4899
4941
|
* rebuffered indefinitely when loading a content already-loaded on the
|
|
4900
4942
|
* HTMLMediaElement.
|
|
4943
|
+
* - (2024-08-23): Seen on Philips 2024 and 2023 in:
|
|
4944
|
+
* https://github.com/canalplus/rx-player/issues/1464
|
|
4901
4945
|
*
|
|
4902
4946
|
* @returns {boolean}
|
|
4903
4947
|
*/
|
|
4904
4948
|
function canReuseMediaKeys() {
|
|
4905
|
-
return !browser_detection/* isWebOs */.hF && !browser_detection/* isPanasonic */.P5;
|
|
4949
|
+
return !browser_detection/* isWebOs */.hF && !browser_detection/* isPhilipsNetTv */.NV && !browser_detection/* isPanasonic */.P5;
|
|
4906
4950
|
}
|
|
4907
4951
|
;// CONCATENATED MODULE: ./src/compat/should_renew_media_key_system_access.ts
|
|
4908
4952
|
/**
|
|
@@ -9609,7 +9653,7 @@ var currentMediaState = new WeakMap();
|
|
|
9609
9653
|
/* harmony import */ var _utils_get_loaded_reference__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(5097);
|
|
9610
9654
|
/* harmony import */ var _utils_initial_seek_and_play__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(107);
|
|
9611
9655
|
/* harmony import */ var _utils_initialize_content_decryption__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(6899);
|
|
9612
|
-
/* harmony import */ var _utils_rebuffering_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
9656
|
+
/* harmony import */ var _utils_rebuffering_controller__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(3137);
|
|
9613
9657
|
/* harmony import */ var _utils_throw_on_media_error__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(8345);
|
|
9614
9658
|
|
|
9615
9659
|
/**
|
|
@@ -20132,8 +20176,8 @@ function getMaximumLiveSeekablePosition(contentLastPosition) {
|
|
|
20132
20176
|
// authorize exceptionally going over it.
|
|
20133
20177
|
return Math.max(Math.pow(2, 32), contentLastPosition + YEAR_IN_SECONDS);
|
|
20134
20178
|
}
|
|
20135
|
-
// EXTERNAL MODULE: ./src/core/init/utils/rebuffering_controller.ts
|
|
20136
|
-
var rebuffering_controller = __webpack_require__(
|
|
20179
|
+
// EXTERNAL MODULE: ./src/core/init/utils/rebuffering_controller.ts
|
|
20180
|
+
var rebuffering_controller = __webpack_require__(3137);
|
|
20137
20181
|
;// CONCATENATED MODULE: ./src/core/init/utils/stream_events_emitter/are_same_stream_events.ts
|
|
20138
20182
|
/**
|
|
20139
20183
|
* Copyright 2015 CANAL+ Group
|
|
@@ -20846,6 +20890,7 @@ var MediaSourceContentInitializer = /*#__PURE__*/function (_ContentInitializer)
|
|
|
20846
20890
|
startTime: initialTime
|
|
20847
20891
|
}, cancelSignal);
|
|
20848
20892
|
var rebufferingController = this._createRebufferingController(playbackObserver, manifest, speed, cancelSignal);
|
|
20893
|
+
var contentTimeBoundariesObserver = this._createContentTimeBoundariesObserver(manifest, mediaSource, streamObserver, segmentBuffersStore, cancelSignal);
|
|
20849
20894
|
if (may_media_element_fail_on_undecipherable_data) {
|
|
20850
20895
|
// On some devices, just reload immediately when data become undecipherable
|
|
20851
20896
|
manifest.addEventListener("decipherabilityUpdate", function (elts) {
|
|
@@ -20856,7 +20901,6 @@ var MediaSourceContentInitializer = /*#__PURE__*/function (_ContentInitializer)
|
|
|
20856
20901
|
}
|
|
20857
20902
|
}, cancelSignal);
|
|
20858
20903
|
}
|
|
20859
|
-
var contentTimeBoundariesObserver = this._createContentTimeBoundariesObserver(manifest, mediaSource, streamObserver, segmentBuffersStore, cancelSignal);
|
|
20860
20904
|
/**
|
|
20861
20905
|
* Emit a "loaded" events once the initial play has been performed and the
|
|
20862
20906
|
* media can begin playback.
|
|
@@ -21371,6 +21415,8 @@ var should_validate_metadata = __webpack_require__(2097);
|
|
|
21371
21415
|
var browser_compatibility_types = __webpack_require__(9770);
|
|
21372
21416
|
// EXTERNAL MODULE: ./src/compat/browser_detection.ts
|
|
21373
21417
|
var browser_detection = __webpack_require__(443);
|
|
21418
|
+
// EXTERNAL MODULE: ./src/compat/is_seeking_approximate.ts
|
|
21419
|
+
var is_seeking_approximate = __webpack_require__(7913);
|
|
21374
21420
|
;// CONCATENATED MODULE: ./src/compat/should_prevent_seeking_at_0_initially.ts
|
|
21375
21421
|
|
|
21376
21422
|
/**
|
|
@@ -21414,6 +21460,7 @@ var reference = __webpack_require__(8315);
|
|
|
21414
21460
|
|
|
21415
21461
|
|
|
21416
21462
|
|
|
21463
|
+
|
|
21417
21464
|
/* eslint-disable-next-line max-len */
|
|
21418
21465
|
|
|
21419
21466
|
|
|
@@ -21503,7 +21550,7 @@ function performInitialSeekAndPlay(mediaElement, playbackObserver, startTime, mu
|
|
|
21503
21550
|
isAwaitingSeek = false;
|
|
21504
21551
|
return;
|
|
21505
21552
|
}
|
|
21506
|
-
if (!isAwaitingSeek && !observation.seeking && observation.rebuffering === null && observation.readyState >= 1) {
|
|
21553
|
+
if (!isAwaitingSeek && !observation.seeking && (is_seeking_approximate/* default */.A && observation.readyState >= 3 || observation.rebuffering === null) && observation.readyState >= 1) {
|
|
21507
21554
|
stopListening();
|
|
21508
21555
|
onPlayable();
|
|
21509
21556
|
}
|
|
@@ -21720,63 +21767,21 @@ function initializeContentDecryption(mediaElement, keySystems, protectionRef, ca
|
|
|
21720
21767
|
|
|
21721
21768
|
/***/ }),
|
|
21722
21769
|
|
|
21723
|
-
/***/
|
|
21770
|
+
/***/ 3137:
|
|
21724
21771
|
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
21725
21772
|
|
|
21726
21773
|
"use strict";
|
|
21727
|
-
|
|
21728
|
-
|
|
21729
|
-
|
|
21730
|
-
|
|
21731
|
-
|
|
21732
|
-
|
|
21733
|
-
|
|
21734
|
-
var
|
|
21735
|
-
|
|
21736
|
-
var
|
|
21737
|
-
|
|
21738
|
-
/**
|
|
21739
|
-
* Copyright 2015 CANAL+ Group
|
|
21740
|
-
*
|
|
21741
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
21742
|
-
* you may not use this file except in compliance with the License.
|
|
21743
|
-
* You may obtain a copy of the License at
|
|
21744
|
-
*
|
|
21745
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
21746
|
-
*
|
|
21747
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
21748
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
21749
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
21750
|
-
* See the License for the specific language governing permissions and
|
|
21751
|
-
* limitations under the License.
|
|
21752
|
-
*/
|
|
21753
|
-
|
|
21754
|
-
/**
|
|
21755
|
-
* On some devices (right now only seen on Tizen), seeking through the
|
|
21756
|
-
* `currentTime` property can lead to the browser re-seeking once the
|
|
21757
|
-
* segments have been loaded to improve seeking performances (for
|
|
21758
|
-
* example, by seeking right to an intra video frame).
|
|
21759
|
-
*
|
|
21760
|
-
* This can lead to conflicts with the RxPlayer code.
|
|
21761
|
-
*
|
|
21762
|
-
* This boolean is only `true` on the devices where this behavior has been
|
|
21763
|
-
* observed.
|
|
21764
|
-
*/
|
|
21765
|
-
var isSeekingApproximate = browser_detection/* isTizen */.ZN;
|
|
21766
|
-
/* harmony default export */ var is_seeking_approximate = (isSeekingApproximate);
|
|
21767
|
-
// EXTERNAL MODULE: ./src/config.ts + 2 modules
|
|
21768
|
-
var config = __webpack_require__(5151);
|
|
21769
|
-
// EXTERNAL MODULE: ./src/errors/media_error.ts
|
|
21770
|
-
var media_error = __webpack_require__(5575);
|
|
21771
|
-
// EXTERNAL MODULE: ./src/log.ts + 1 modules
|
|
21772
|
-
var log = __webpack_require__(9477);
|
|
21773
|
-
// EXTERNAL MODULE: ./src/utils/event_emitter.ts
|
|
21774
|
-
var event_emitter = __webpack_require__(79);
|
|
21775
|
-
// EXTERNAL MODULE: ./src/utils/ranges.ts
|
|
21776
|
-
var ranges = __webpack_require__(3650);
|
|
21777
|
-
// EXTERNAL MODULE: ./src/utils/task_canceller.ts
|
|
21778
|
-
var task_canceller = __webpack_require__(2507);
|
|
21779
|
-
;// CONCATENATED MODULE: ./src/core/init/utils/rebuffering_controller.ts
|
|
21774
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
21775
|
+
/* harmony export */ A: function() { return /* binding */ RebufferingController; }
|
|
21776
|
+
/* harmony export */ });
|
|
21777
|
+
/* harmony import */ var _babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7387);
|
|
21778
|
+
/* harmony import */ var _compat_is_seeking_approximate__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(7913);
|
|
21779
|
+
/* harmony import */ var _config__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(5151);
|
|
21780
|
+
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(5575);
|
|
21781
|
+
/* harmony import */ var _log__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(9477);
|
|
21782
|
+
/* harmony import */ var _utils_event_emitter__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(79);
|
|
21783
|
+
/* harmony import */ var _utils_ranges__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3650);
|
|
21784
|
+
/* harmony import */ var _utils_task_canceller__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2507);
|
|
21780
21785
|
|
|
21781
21786
|
/**
|
|
21782
21787
|
* Copyright 2015 CANAL+ Group
|
|
@@ -21827,10 +21832,10 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21827
21832
|
_this._speed = speed;
|
|
21828
21833
|
_this._discontinuitiesStore = [];
|
|
21829
21834
|
_this._isStarted = false;
|
|
21830
|
-
_this._canceller = new
|
|
21835
|
+
_this._canceller = new _utils_task_canceller__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay();
|
|
21831
21836
|
return _this;
|
|
21832
21837
|
}
|
|
21833
|
-
(0,
|
|
21838
|
+
(0,_babel_runtime_helpers_inheritsLoose__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(RebufferingController, _EventEmitter);
|
|
21834
21839
|
var _proto = RebufferingController.prototype;
|
|
21835
21840
|
_proto.start = function start() {
|
|
21836
21841
|
var _this2 = this;
|
|
@@ -21876,14 +21881,14 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21876
21881
|
readyState = observation.readyState,
|
|
21877
21882
|
rebuffering = observation.rebuffering,
|
|
21878
21883
|
freezing = observation.freezing;
|
|
21879
|
-
var _config$getCurrent =
|
|
21884
|
+
var _config$getCurrent = _config__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A.getCurrent(),
|
|
21880
21885
|
BUFFER_DISCONTINUITY_THRESHOLD = _config$getCurrent.BUFFER_DISCONTINUITY_THRESHOLD,
|
|
21881
21886
|
FORCE_DISCONTINUITY_SEEK_DELAY = _config$getCurrent.FORCE_DISCONTINUITY_SEEK_DELAY,
|
|
21882
21887
|
FREEZING_STALLED_DELAY = _config$getCurrent.FREEZING_STALLED_DELAY,
|
|
21883
21888
|
UNFREEZING_SEEK_DELAY = _config$getCurrent.UNFREEZING_SEEK_DELAY,
|
|
21884
21889
|
UNFREEZING_DELTA_POSITION = _config$getCurrent.UNFREEZING_DELTA_POSITION;
|
|
21885
|
-
if (!observation.seeking &&
|
|
21886
|
-
|
|
21890
|
+
if (!observation.seeking && _compat_is_seeking_approximate__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A && ignoredStallTimeStamp === null && lastSeekingPosition !== null && observation.position < lastSeekingPosition) {
|
|
21891
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.debug("Init: the device appeared to have seeked back by itself.");
|
|
21887
21892
|
var now = performance.now();
|
|
21888
21893
|
ignoredStallTimeStamp = now;
|
|
21889
21894
|
}
|
|
@@ -21892,7 +21897,7 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21892
21897
|
var _now = performance.now();
|
|
21893
21898
|
var referenceTimestamp = prevFreezingState === null ? freezing.timestamp : prevFreezingState.attemptTimestamp;
|
|
21894
21899
|
if (_now - referenceTimestamp > UNFREEZING_SEEK_DELAY) {
|
|
21895
|
-
|
|
21900
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("Init: trying to seek to un-freeze player");
|
|
21896
21901
|
_this2._playbackObserver.setCurrentTime(_this2._playbackObserver.getCurrentTime() + UNFREEZING_DELTA_POSITION);
|
|
21897
21902
|
prevFreezingState = {
|
|
21898
21903
|
attemptTimestamp: _now
|
|
@@ -21934,11 +21939,11 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21934
21939
|
var _now2 = performance.now();
|
|
21935
21940
|
if (_now2 - ignoredStallTimeStamp < FORCE_DISCONTINUITY_SEEK_DELAY) {
|
|
21936
21941
|
playbackRateUpdater.stopRebuffering();
|
|
21937
|
-
|
|
21942
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.debug("Init: letting the device get out of a stall by itself");
|
|
21938
21943
|
_this2.trigger("stalled", stalledReason);
|
|
21939
21944
|
return;
|
|
21940
21945
|
} else {
|
|
21941
|
-
|
|
21946
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("Init: ignored stall for too long, checking discontinuity", _now2 - ignoredStallTimeStamp);
|
|
21942
21947
|
}
|
|
21943
21948
|
}
|
|
21944
21949
|
ignoredStallTimeStamp = null;
|
|
@@ -21954,9 +21959,9 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21954
21959
|
if (skippableDiscontinuity !== null) {
|
|
21955
21960
|
var realSeekTime = skippableDiscontinuity + 0.001;
|
|
21956
21961
|
if (realSeekTime <= _this2._playbackObserver.getCurrentTime()) {
|
|
21957
|
-
|
|
21962
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.info("Init: position to seek already reached, no seeking", _this2._playbackObserver.getCurrentTime(), realSeekTime);
|
|
21958
21963
|
} else {
|
|
21959
|
-
|
|
21964
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("SA: skippable discontinuity found in the stream", position, realSeekTime);
|
|
21960
21965
|
_this2._playbackObserver.setCurrentTime(realSeekTime);
|
|
21961
21966
|
_this2.trigger("warning", generateDiscontinuityError(stalledPosition, realSeekTime));
|
|
21962
21967
|
return;
|
|
@@ -21971,11 +21976,11 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
21971
21976
|
// calculate a stalled state. This is useful for some
|
|
21972
21977
|
// implementation that might drop an injected segment, or in
|
|
21973
21978
|
// case of small discontinuity in the content.
|
|
21974
|
-
var nextBufferRangeGap = (0,
|
|
21979
|
+
var nextBufferRangeGap = (0,_utils_ranges__WEBPACK_IMPORTED_MODULE_5__/* .getNextRangeGap */ .Td)(buffered, freezePosition);
|
|
21975
21980
|
if (_this2._speed.getValue() > 0 && nextBufferRangeGap < BUFFER_DISCONTINUITY_THRESHOLD) {
|
|
21976
21981
|
var seekTo = freezePosition + nextBufferRangeGap + EPSILON;
|
|
21977
21982
|
if (_this2._playbackObserver.getCurrentTime() < seekTo) {
|
|
21978
|
-
|
|
21983
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("Init: discontinuity encountered inferior to the threshold", freezePosition, seekTo, BUFFER_DISCONTINUITY_THRESHOLD);
|
|
21979
21984
|
_this2._playbackObserver.setCurrentTime(seekTo);
|
|
21980
21985
|
_this2.trigger("warning", generateDiscontinuityError(freezePosition, seekTo));
|
|
21981
21986
|
return;
|
|
@@ -22035,7 +22040,7 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
22035
22040
|
var rebufferingPos = (_a = observation.rebuffering.position) !== null && _a !== void 0 ? _a : currPos;
|
|
22036
22041
|
var lockedPeriodStart = period.start;
|
|
22037
22042
|
if (currPos < lockedPeriodStart && Math.abs(rebufferingPos - lockedPeriodStart) < 1) {
|
|
22038
|
-
|
|
22043
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("Init: rebuffering because of a future locked stream.\n" + "Trying to unlock by seeking to the next Period");
|
|
22039
22044
|
this._playbackObserver.setCurrentTime(lockedPeriodStart + 0.001);
|
|
22040
22045
|
}
|
|
22041
22046
|
}
|
|
@@ -22047,7 +22052,7 @@ var RebufferingController = /*#__PURE__*/function (_EventEmitter) {
|
|
|
22047
22052
|
this._canceller.cancel();
|
|
22048
22053
|
};
|
|
22049
22054
|
return RebufferingController;
|
|
22050
|
-
}(
|
|
22055
|
+
}(_utils_event_emitter__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A);
|
|
22051
22056
|
/**
|
|
22052
22057
|
* @param {Array.<Object>} discontinuitiesStore
|
|
22053
22058
|
* @param {Object} manifest
|
|
@@ -22079,14 +22084,14 @@ function findSeekableDiscontinuity(discontinuitiesStore, manifest, stalledPositi
|
|
|
22079
22084
|
if (nextPeriod !== null) {
|
|
22080
22085
|
discontinuityEnd = nextPeriod.start + EPSILON;
|
|
22081
22086
|
} else {
|
|
22082
|
-
|
|
22087
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.warn("Init: discontinuity at Period's end but no next Period");
|
|
22083
22088
|
}
|
|
22084
22089
|
} else if (stalledPosition < end + EPSILON) {
|
|
22085
22090
|
discontinuityEnd = end + EPSILON;
|
|
22086
22091
|
}
|
|
22087
22092
|
}
|
|
22088
22093
|
if (discontinuityEnd !== undefined) {
|
|
22089
|
-
|
|
22094
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.info("Init: discontinuity found", stalledPosition, discontinuityEnd);
|
|
22090
22095
|
maxDiscontinuityEnd = maxDiscontinuityEnd !== null && maxDiscontinuityEnd > discontinuityEnd ? maxDiscontinuityEnd : discontinuityEnd;
|
|
22091
22096
|
}
|
|
22092
22097
|
}
|
|
@@ -22155,7 +22160,7 @@ function updateDiscontinuitiesStore(discontinuitiesStore, evt, observation) {
|
|
|
22155
22160
|
* @returns {Error}
|
|
22156
22161
|
*/
|
|
22157
22162
|
function generateDiscontinuityError(stalledPosition, seekTo) {
|
|
22158
|
-
return new
|
|
22163
|
+
return new _errors__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A("DISCONTINUITY_ENCOUNTERED", "A discontinuity has been encountered at position " + String(stalledPosition) + ", seeked at position " + String(seekTo));
|
|
22159
22164
|
}
|
|
22160
22165
|
/**
|
|
22161
22166
|
* Manage playback speed, allowing to force a playback rate of `0` when
|
|
@@ -22174,7 +22179,7 @@ var PlaybackRateUpdater = /*#__PURE__*/function () {
|
|
|
22174
22179
|
* @param {Object} speed
|
|
22175
22180
|
*/
|
|
22176
22181
|
function PlaybackRateUpdater(playbackObserver, speed) {
|
|
22177
|
-
this._speedUpdateCanceller = new
|
|
22182
|
+
this._speedUpdateCanceller = new _utils_task_canceller__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay();
|
|
22178
22183
|
this._isRebuffering = false;
|
|
22179
22184
|
this._playbackObserver = playbackObserver;
|
|
22180
22185
|
this._isDisposed = false;
|
|
@@ -22193,7 +22198,7 @@ var PlaybackRateUpdater = /*#__PURE__*/function () {
|
|
|
22193
22198
|
}
|
|
22194
22199
|
this._isRebuffering = true;
|
|
22195
22200
|
this._speedUpdateCanceller.cancel();
|
|
22196
|
-
|
|
22201
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.info("Init: Pause playback to build buffer");
|
|
22197
22202
|
this._playbackObserver.setPlaybackRate(0);
|
|
22198
22203
|
}
|
|
22199
22204
|
/**
|
|
@@ -22207,7 +22212,7 @@ var PlaybackRateUpdater = /*#__PURE__*/function () {
|
|
|
22207
22212
|
return;
|
|
22208
22213
|
}
|
|
22209
22214
|
this._isRebuffering = false;
|
|
22210
|
-
this._speedUpdateCanceller = new
|
|
22215
|
+
this._speedUpdateCanceller = new _utils_task_canceller__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .Ay();
|
|
22211
22216
|
this._updateSpeed();
|
|
22212
22217
|
}
|
|
22213
22218
|
/**
|
|
@@ -22224,7 +22229,7 @@ var PlaybackRateUpdater = /*#__PURE__*/function () {
|
|
|
22224
22229
|
_proto2._updateSpeed = function _updateSpeed() {
|
|
22225
22230
|
var _this3 = this;
|
|
22226
22231
|
this._speed.onUpdate(function (lastSpeed) {
|
|
22227
|
-
|
|
22232
|
+
_log__WEBPACK_IMPORTED_MODULE_4__/* ["default"] */ .A.info("Init: Resume playback speed", lastSpeed);
|
|
22228
22233
|
_this3._playbackObserver.setPlaybackRate(lastSpeed);
|
|
22229
22234
|
}, {
|
|
22230
22235
|
clearSignal: this._speedUpdateCanceller.signal,
|
|
@@ -53677,7 +53682,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
|
|
|
53677
53682
|
// Workaround to support Firefox autoplay on FF 42.
|
|
53678
53683
|
// See: https://bugzilla.mozilla.org/show_bug.cgi?id=1194624
|
|
53679
53684
|
videoElement.preload = "auto";
|
|
53680
|
-
_this.version = /* PLAYER_VERSION */"3.33.4-dev.
|
|
53685
|
+
_this.version = /* PLAYER_VERSION */"3.33.4-dev.2024083000";
|
|
53681
53686
|
_this.log = src_log/* default */.A;
|
|
53682
53687
|
_this.state = "STOPPED";
|
|
53683
53688
|
_this.videoElement = videoElement;
|
|
@@ -56165,7 +56170,7 @@ var Player = /*#__PURE__*/function (_EventEmitter) {
|
|
|
56165
56170
|
* Use of a WeakSet ensure the object is garbage collected if it's not used anymore.
|
|
56166
56171
|
*/
|
|
56167
56172
|
Player._priv_currentlyUsedVideoElements = new WeakSet();
|
|
56168
|
-
Player.version = /* PLAYER_VERSION */"3.33.4-dev.
|
|
56173
|
+
Player.version = /* PLAYER_VERSION */"3.33.4-dev.2024083000";
|
|
56169
56174
|
/* harmony default export */ var public_api = (Player);
|
|
56170
56175
|
;// CONCATENATED MODULE: ./src/core/api/index.ts
|
|
56171
56176
|
/**
|