stormcloud-video-player 0.7.37 → 0.7.39
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/index.cjs +164 -34
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +17 -2
- package/lib/index.d.ts +17 -2
- package/lib/index.js +154 -36
- package/lib/index.js.map +1 -1
- package/lib/player/StormcloudVideoPlayer.cjs +40 -0
- package/lib/player/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/player/StormcloudVideoPlayer.d.cts +4 -0
- package/lib/players/HlsPlayer.cjs +40 -0
- package/lib/players/HlsPlayer.cjs.map +1 -1
- package/lib/players/index.cjs +40 -0
- package/lib/players/index.cjs.map +1 -1
- package/lib/ui/OverlayRenderer.cjs +4 -6
- package/lib/ui/OverlayRenderer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.cjs +152 -34
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +5 -0
- package/lib/utils/overlays.cjs +87 -7
- package/lib/utils/overlays.cjs.map +1 -1
- package/lib/utils/overlays.d.cts +8 -2
- package/package.json +1 -1
|
@@ -5464,6 +5464,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
5464
5464
|
return min;
|
|
5465
5465
|
}
|
|
5466
5466
|
},
|
|
5467
|
+
{
|
|
5468
|
+
key: "getMaxHlsResolution",
|
|
5469
|
+
value: function getMaxHlsResolution() {
|
|
5470
|
+
var _this_hls;
|
|
5471
|
+
var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
|
|
5472
|
+
if (!levels || levels.length === 0) return null;
|
|
5473
|
+
var max = null;
|
|
5474
|
+
var maxPixels = 0;
|
|
5475
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
5476
|
+
try {
|
|
5477
|
+
for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
5478
|
+
var level = _step.value;
|
|
5479
|
+
if (level.width && level.height) {
|
|
5480
|
+
var pixels = level.width * level.height;
|
|
5481
|
+
if (pixels > maxPixels) {
|
|
5482
|
+
maxPixels = pixels;
|
|
5483
|
+
max = {
|
|
5484
|
+
width: level.width,
|
|
5485
|
+
height: level.height
|
|
5486
|
+
};
|
|
5487
|
+
}
|
|
5488
|
+
}
|
|
5489
|
+
}
|
|
5490
|
+
} catch (err) {
|
|
5491
|
+
_didIteratorError = true;
|
|
5492
|
+
_iteratorError = err;
|
|
5493
|
+
} finally{
|
|
5494
|
+
try {
|
|
5495
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
5496
|
+
_iterator.return();
|
|
5497
|
+
}
|
|
5498
|
+
} finally{
|
|
5499
|
+
if (_didIteratorError) {
|
|
5500
|
+
throw _iteratorError;
|
|
5501
|
+
}
|
|
5502
|
+
}
|
|
5503
|
+
}
|
|
5504
|
+
return max;
|
|
5505
|
+
}
|
|
5506
|
+
},
|
|
5467
5507
|
{
|
|
5468
5508
|
key: "getCurrentHlsSegmentDurationMs",
|
|
5469
5509
|
value: function getCurrentHlsSegmentDurationMs() {
|