stormcloud-video-player 0.6.6 → 0.7.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/stormcloud-vp.min.js +1 -1
- package/lib/index.cjs +544 -118
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +64 -1
- package/lib/index.d.ts +64 -1
- package/lib/index.js +510 -100
- 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 +392 -0
- package/lib/ui/OverlayRenderer.cjs.map +1 -0
- package/lib/ui/OverlayRenderer.d.cts +15 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +504 -94
- package/lib/ui/StormcloudVideoPlayer.cjs.map +1 -1
- package/lib/ui/StormcloudVideoPlayer.d.cts +1 -0
- package/lib/utils/overlays.cjs +286 -0
- package/lib/utils/overlays.cjs.map +1 -0
- package/lib/utils/overlays.d.cts +59 -0
- package/package.json +1 -1
package/lib/players/index.cjs
CHANGED
|
@@ -6070,6 +6070,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6070
6070
|
return this.isLiveStream;
|
|
6071
6071
|
}
|
|
6072
6072
|
},
|
|
6073
|
+
{
|
|
6074
|
+
key: "getMinHlsResolution",
|
|
6075
|
+
value: function getMinHlsResolution() {
|
|
6076
|
+
var _this_hls;
|
|
6077
|
+
var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
|
|
6078
|
+
if (!levels || levels.length === 0) return null;
|
|
6079
|
+
var min = null;
|
|
6080
|
+
var minPixels = Infinity;
|
|
6081
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
6082
|
+
try {
|
|
6083
|
+
for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
6084
|
+
var level = _step.value;
|
|
6085
|
+
if (level.width && level.height) {
|
|
6086
|
+
var pixels = level.width * level.height;
|
|
6087
|
+
if (pixels < minPixels) {
|
|
6088
|
+
minPixels = pixels;
|
|
6089
|
+
min = {
|
|
6090
|
+
width: level.width,
|
|
6091
|
+
height: level.height
|
|
6092
|
+
};
|
|
6093
|
+
}
|
|
6094
|
+
}
|
|
6095
|
+
}
|
|
6096
|
+
} catch (err) {
|
|
6097
|
+
_didIteratorError = true;
|
|
6098
|
+
_iteratorError = err;
|
|
6099
|
+
} finally{
|
|
6100
|
+
try {
|
|
6101
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
6102
|
+
_iterator.return();
|
|
6103
|
+
}
|
|
6104
|
+
} finally{
|
|
6105
|
+
if (_didIteratorError) {
|
|
6106
|
+
throw _iteratorError;
|
|
6107
|
+
}
|
|
6108
|
+
}
|
|
6109
|
+
}
|
|
6110
|
+
return min;
|
|
6111
|
+
}
|
|
6112
|
+
},
|
|
6073
6113
|
{
|
|
6074
6114
|
key: "videoElement",
|
|
6075
6115
|
get: function get() {
|