stormcloud-video-player 0.8.71 → 0.8.72
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/stormcloud-vp.min.js +1 -1
- package/lib/StormcloudPlayer.cjs +9 -3
- package/lib/StormcloudPlayer.cjs.map +1 -1
- package/lib/index.cjs +9 -3
- package/lib/index.cjs.map +1 -1
- package/lib/index.js +9 -3
- package/lib/index.js.map +1 -1
- package/lib/player/HlsEngine.cjs +9 -3
- package/lib/player/HlsEngine.cjs.map +1 -1
- package/lib/player/Scte35Parser.cjs +8 -0
- package/lib/player/Scte35Parser.cjs.map +1 -1
- package/lib/player/Scte35Parser.d.cts +2 -1
- package/lib/player/StormcloudVideoPlayer.cjs +9 -3
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/players/HlsPlayer.cjs +9 -3
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +9 -3
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +9 -3
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -6413,6 +6413,10 @@ function toNumber(val) {
|
|
|
6413
6413
|
var n = typeof val === "string" ? parseFloat(val) : Number(val);
|
|
6414
6414
|
return Number.isNaN(n) ? void 0 : n;
|
|
6415
6415
|
}
|
|
6416
|
+
function getDateRangeDurationSeconds(attrs) {
|
|
6417
|
+
var _toNumber;
|
|
6418
|
+
return (_toNumber = toNumber(attrs["DURATION"])) !== null && _toNumber !== void 0 ? _toNumber : toNumber(attrs["PLANNED-DURATION"]);
|
|
6419
|
+
}
|
|
6416
6420
|
function isManifestBasedMarker(marker) {
|
|
6417
6421
|
var raw = marker.raw;
|
|
6418
6422
|
if (!raw) return false;
|
|
@@ -8784,11 +8788,13 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
8784
8788
|
}
|
|
8785
8789
|
}
|
|
8786
8790
|
if (!tag) continue;
|
|
8791
|
+
if (tag.includes("EXT-X-CUE-OUT-CONT")) continue;
|
|
8787
8792
|
if (tag.includes("EXT-X-CUE-OUT") || tag.includes("EXT-X-DATERANGE")) {
|
|
8788
|
-
var
|
|
8793
|
+
var isDateRange = tag.includes("EXT-X-DATERANGE");
|
|
8794
|
+
var attrs = isDateRange ? parseAttributeList(value) : {};
|
|
8789
8795
|
var hasScteOut = tag.includes("EXT-X-CUE-OUT") || "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
|
|
8790
8796
|
if (hasScteOut) {
|
|
8791
|
-
var durationSeconds = parseCueOutDuration(value);
|
|
8797
|
+
var durationSeconds = isDateRange ? getDateRangeDurationSeconds(attrs) : parseCueOutDuration(value);
|
|
8792
8798
|
var marker = _object_spread_props(_object_spread({
|
|
8793
8799
|
type: "start"
|
|
8794
8800
|
}, durationSeconds !== void 0 ? {
|
|
@@ -8962,7 +8968,7 @@ var HlsEngine = /*#__PURE__*/ function() {
|
|
|
8962
8968
|
var hasScteOut = "SCTE35-OUT" in attrs || attrs["SCTE35-OUT"] !== void 0;
|
|
8963
8969
|
var hasScteIn = "SCTE35-IN" in attrs || attrs["SCTE35-IN"] !== void 0;
|
|
8964
8970
|
var klass = String((_attrs_CLASS = attrs["CLASS"]) !== null && _attrs_CLASS !== void 0 ? _attrs_CLASS : "");
|
|
8965
|
-
var duration =
|
|
8971
|
+
var duration = getDateRangeDurationSeconds(attrs);
|
|
8966
8972
|
if (hasScteOut || /com\.apple\.hls\.cue/i.test(klass)) {
|
|
8967
8973
|
var marker2 = _object_spread_props(_object_spread({
|
|
8968
8974
|
type: "start"
|