@clipmux/player 0.1.1 → 0.1.2
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/README.md +126 -117
- package/dist/index.cjs +17 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +17 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -7578,6 +7578,9 @@ function sortVideoQualities(qualities, desc) {
|
|
|
7578
7578
|
function compareVideoQualityAsc(a, b) {
|
|
7579
7579
|
return a.height === b.height ? (a.bitrate ?? 0) - (b.bitrate ?? 0) : a.height - b.height;
|
|
7580
7580
|
}
|
|
7581
|
+
function isHLSProvider(provider2) {
|
|
7582
|
+
return provider2?.$$PROVIDER_TYPE === "HLS";
|
|
7583
|
+
}
|
|
7581
7584
|
function isHTMLAudioElement(element) {
|
|
7582
7585
|
return !IS_SERVER3 && element instanceof HTMLAudioElement;
|
|
7583
7586
|
}
|
|
@@ -11987,8 +11990,8 @@ var init_vidstack_D5Pzx_k5 = __esm({
|
|
|
11987
11990
|
canGoogleCast.set(supported);
|
|
11988
11991
|
}
|
|
11989
11992
|
#watchFullscreenSupport() {
|
|
11990
|
-
const { canFullscreen } = this.$state, supported = this.#fullscreen.supported || !!this.#$provider()?.fullscreen?.supported;
|
|
11991
|
-
|
|
11993
|
+
const { canFullscreen: canFullscreen2 } = this.$state, supported = this.#fullscreen.supported || !!this.#$provider()?.fullscreen?.supported;
|
|
11994
|
+
canFullscreen2.set(supported);
|
|
11992
11995
|
}
|
|
11993
11996
|
#watchPiPSupport() {
|
|
11994
11997
|
const { canPictureInPicture } = this.$state, supported = !!this.#$provider()?.pictureInPicture?.supported;
|
|
@@ -14766,8 +14769,8 @@ var init_vidstack_D5Pzx_k5 = __esm({
|
|
|
14766
14769
|
return fullscreen();
|
|
14767
14770
|
}
|
|
14768
14771
|
#isSupported() {
|
|
14769
|
-
const { canFullscreen } = this.#media.$state;
|
|
14770
|
-
return
|
|
14772
|
+
const { canFullscreen: canFullscreen2 } = this.#media.$state;
|
|
14773
|
+
return canFullscreen2();
|
|
14771
14774
|
}
|
|
14772
14775
|
};
|
|
14773
14776
|
MuteButton = class extends Component {
|
|
@@ -18140,6 +18143,7 @@ var init_vidstack_D5Pzx_k5 = __esm({
|
|
|
18140
18143
|
|
|
18141
18144
|
// node_modules/.pnpm/@vidstack+react@1.12.13_@types+react@19.2.14_react@19.2.4/node_modules/@vidstack/react/prod/vidstack.js
|
|
18142
18145
|
init_vidstack_D5Pzx_k5();
|
|
18146
|
+
init_vidstack_D5Pzx_k5();
|
|
18143
18147
|
init_vidstack_CZgUA94N();
|
|
18144
18148
|
|
|
18145
18149
|
// node_modules/.pnpm/@vidstack+react@1.12.13_@types+react@19.2.14_react@19.2.4/node_modules/@vidstack/react/prod/chunks/vidstack-DqtDbuaC.js
|
|
@@ -21119,6 +21123,15 @@ function ClipMuxPlayer({
|
|
|
21119
21123
|
analytics.onError(e2?.message || "unknown");
|
|
21120
21124
|
onError?.(new Error(e2?.message || "Playback error"));
|
|
21121
21125
|
},
|
|
21126
|
+
onProviderChange: (provider2) => {
|
|
21127
|
+
if (isHLSProvider(provider2)) {
|
|
21128
|
+
provider2.config = {
|
|
21129
|
+
...provider2.config,
|
|
21130
|
+
maxBufferLength: 30,
|
|
21131
|
+
maxMaxBufferLength: 30
|
|
21132
|
+
};
|
|
21133
|
+
}
|
|
21134
|
+
},
|
|
21122
21135
|
onTimeUpdate: (detail) => {
|
|
21123
21136
|
if (playerStateRef.current) {
|
|
21124
21137
|
playerStateRef.current.currentTime = detail.currentTime;
|