@scarlett-player/hls 0.2.0 → 0.4.0
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/dist/index.cjs +7 -1
- package/dist/index.js +7 -1
- package/dist/light.cjs +7 -1
- package/dist/light.js +7 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -386,7 +386,7 @@ function createHLSPlugin(config) {
|
|
|
386
386
|
return video;
|
|
387
387
|
}
|
|
388
388
|
video = document.createElement("video");
|
|
389
|
-
video.style.cssText = "width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
389
|
+
video.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
390
390
|
video.preload = "metadata";
|
|
391
391
|
video.controls = false;
|
|
392
392
|
video.playsInline = true;
|
|
@@ -692,6 +692,12 @@ function createHLSPlugin(config) {
|
|
|
692
692
|
} else {
|
|
693
693
|
throw new Error("HLS playback not supported in this browser");
|
|
694
694
|
}
|
|
695
|
+
if (video) {
|
|
696
|
+
const muted = api.getState("muted");
|
|
697
|
+
const volume = api.getState("volume");
|
|
698
|
+
if (muted !== void 0) video.muted = muted;
|
|
699
|
+
if (volume !== void 0) video.volume = volume;
|
|
700
|
+
}
|
|
695
701
|
api.setState("playbackState", "ready");
|
|
696
702
|
api.setState("buffering", false);
|
|
697
703
|
},
|
package/dist/index.js
CHANGED
|
@@ -97,7 +97,7 @@ function createHLSPlugin(config) {
|
|
|
97
97
|
return video;
|
|
98
98
|
}
|
|
99
99
|
video = document.createElement("video");
|
|
100
|
-
video.style.cssText = "width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
100
|
+
video.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
101
101
|
video.preload = "metadata";
|
|
102
102
|
video.controls = false;
|
|
103
103
|
video.playsInline = true;
|
|
@@ -403,6 +403,12 @@ function createHLSPlugin(config) {
|
|
|
403
403
|
} else {
|
|
404
404
|
throw new Error("HLS playback not supported in this browser");
|
|
405
405
|
}
|
|
406
|
+
if (video) {
|
|
407
|
+
const muted = api.getState("muted");
|
|
408
|
+
const volume = api.getState("volume");
|
|
409
|
+
if (muted !== void 0) video.muted = muted;
|
|
410
|
+
if (volume !== void 0) video.volume = volume;
|
|
411
|
+
}
|
|
406
412
|
api.setState("playbackState", "ready");
|
|
407
413
|
api.setState("buffering", false);
|
|
408
414
|
},
|
package/dist/light.cjs
CHANGED
|
@@ -385,7 +385,7 @@ function createHLSPlugin(config) {
|
|
|
385
385
|
return video;
|
|
386
386
|
}
|
|
387
387
|
video = document.createElement("video");
|
|
388
|
-
video.style.cssText = "width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
388
|
+
video.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
389
389
|
video.preload = "metadata";
|
|
390
390
|
video.controls = false;
|
|
391
391
|
video.playsInline = true;
|
|
@@ -685,6 +685,12 @@ function createHLSPlugin(config) {
|
|
|
685
685
|
} else {
|
|
686
686
|
throw new Error("HLS playback not supported in this browser");
|
|
687
687
|
}
|
|
688
|
+
if (video) {
|
|
689
|
+
const muted = api.getState("muted");
|
|
690
|
+
const volume = api.getState("volume");
|
|
691
|
+
if (muted !== void 0) video.muted = muted;
|
|
692
|
+
if (volume !== void 0) video.volume = volume;
|
|
693
|
+
}
|
|
688
694
|
api.setState("playbackState", "ready");
|
|
689
695
|
api.setState("buffering", false);
|
|
690
696
|
},
|
package/dist/light.js
CHANGED
|
@@ -96,7 +96,7 @@ function createHLSPlugin(config) {
|
|
|
96
96
|
return video;
|
|
97
97
|
}
|
|
98
98
|
video = document.createElement("video");
|
|
99
|
-
video.style.cssText = "width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
99
|
+
video.style.cssText = "position:absolute;top:0;left:0;width:100%;height:100%;display:block;object-fit:contain;background:#000";
|
|
100
100
|
video.preload = "metadata";
|
|
101
101
|
video.controls = false;
|
|
102
102
|
video.playsInline = true;
|
|
@@ -396,6 +396,12 @@ function createHLSPlugin(config) {
|
|
|
396
396
|
} else {
|
|
397
397
|
throw new Error("HLS playback not supported in this browser");
|
|
398
398
|
}
|
|
399
|
+
if (video) {
|
|
400
|
+
const muted = api.getState("muted");
|
|
401
|
+
const volume = api.getState("volume");
|
|
402
|
+
if (muted !== void 0) video.muted = muted;
|
|
403
|
+
if (volume !== void 0) video.volume = volume;
|
|
404
|
+
}
|
|
399
405
|
api.setState("playbackState", "ready");
|
|
400
406
|
api.setState("buffering", false);
|
|
401
407
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scarlett-player/hls",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "HLS Provider Plugin for Scarlett Player",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dist"
|
|
23
23
|
],
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"@scarlett-player/core": "^0.
|
|
25
|
+
"@scarlett-player/core": "^0.4.0",
|
|
26
26
|
"hls.js": "^1.4.0"
|
|
27
27
|
},
|
|
28
28
|
"peerDependenciesMeta": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"vitest": "^1.6.0",
|
|
38
38
|
"@vitest/coverage-v8": "^1.6.0",
|
|
39
39
|
"jsdom": "^24.0.0",
|
|
40
|
-
"@scarlett-player/core": "0.
|
|
40
|
+
"@scarlett-player/core": "0.4.0"
|
|
41
41
|
},
|
|
42
42
|
"keywords": [
|
|
43
43
|
"video",
|