stormcloud-video-player 0.6.6 → 0.7.1
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 +1340 -118
- package/lib/index.cjs.map +1 -1
- package/lib/index.d.cts +65 -1
- package/lib/index.d.ts +65 -1
- package/lib/index.js +1306 -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 +1189 -0
- package/lib/ui/OverlayRenderer.cjs.map +1 -0
- package/lib/ui/OverlayRenderer.d.cts +15 -0
- package/lib/ui/StormcloudVideoPlayer.cjs +1300 -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 +60 -0
- package/package.json +1 -1
|
@@ -120,6 +120,10 @@ declare class StormcloudVideoPlayer {
|
|
|
120
120
|
getVolume(): number;
|
|
121
121
|
isFullscreen(): boolean;
|
|
122
122
|
isLive(): boolean;
|
|
123
|
+
getMinHlsResolution(): {
|
|
124
|
+
width: number;
|
|
125
|
+
height: number;
|
|
126
|
+
} | null;
|
|
123
127
|
get videoElement(): HTMLVideoElement;
|
|
124
128
|
resize(): void;
|
|
125
129
|
destroy(): void;
|
|
@@ -6034,6 +6034,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
|
|
|
6034
6034
|
return this.isLiveStream;
|
|
6035
6035
|
}
|
|
6036
6036
|
},
|
|
6037
|
+
{
|
|
6038
|
+
key: "getMinHlsResolution",
|
|
6039
|
+
value: function getMinHlsResolution() {
|
|
6040
|
+
var _this_hls;
|
|
6041
|
+
var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
|
|
6042
|
+
if (!levels || levels.length === 0) return null;
|
|
6043
|
+
var min = null;
|
|
6044
|
+
var minPixels = Infinity;
|
|
6045
|
+
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
|
|
6046
|
+
try {
|
|
6047
|
+
for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
|
|
6048
|
+
var level = _step.value;
|
|
6049
|
+
if (level.width && level.height) {
|
|
6050
|
+
var pixels = level.width * level.height;
|
|
6051
|
+
if (pixels < minPixels) {
|
|
6052
|
+
minPixels = pixels;
|
|
6053
|
+
min = {
|
|
6054
|
+
width: level.width,
|
|
6055
|
+
height: level.height
|
|
6056
|
+
};
|
|
6057
|
+
}
|
|
6058
|
+
}
|
|
6059
|
+
}
|
|
6060
|
+
} catch (err) {
|
|
6061
|
+
_didIteratorError = true;
|
|
6062
|
+
_iteratorError = err;
|
|
6063
|
+
} finally{
|
|
6064
|
+
try {
|
|
6065
|
+
if (!_iteratorNormalCompletion && _iterator.return != null) {
|
|
6066
|
+
_iterator.return();
|
|
6067
|
+
}
|
|
6068
|
+
} finally{
|
|
6069
|
+
if (_didIteratorError) {
|
|
6070
|
+
throw _iteratorError;
|
|
6071
|
+
}
|
|
6072
|
+
}
|
|
6073
|
+
}
|
|
6074
|
+
return min;
|
|
6075
|
+
}
|
|
6076
|
+
},
|
|
6037
6077
|
{
|
|
6038
6078
|
key: "videoElement",
|
|
6039
6079
|
get: function get() {
|