stormcloud-video-player 0.7.36 → 0.7.38

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.
@@ -147,6 +147,10 @@ declare class StormcloudVideoPlayer {
147
147
  width: number;
148
148
  height: number;
149
149
  } | null;
150
+ getMaxHlsResolution(): {
151
+ width: number;
152
+ height: number;
153
+ } | null;
150
154
  getCurrentHlsSegmentDurationMs(): number | null;
151
155
  get videoElement(): HTMLVideoElement;
152
156
  resize(): void;
@@ -5516,6 +5516,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5516
5516
  return min;
5517
5517
  }
5518
5518
  },
5519
+ {
5520
+ key: "getMaxHlsResolution",
5521
+ value: function getMaxHlsResolution() {
5522
+ var _this_hls;
5523
+ var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
5524
+ if (!levels || levels.length === 0) return null;
5525
+ var max = null;
5526
+ var maxPixels = 0;
5527
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5528
+ try {
5529
+ for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5530
+ var level = _step.value;
5531
+ if (level.width && level.height) {
5532
+ var pixels = level.width * level.height;
5533
+ if (pixels > maxPixels) {
5534
+ maxPixels = pixels;
5535
+ max = {
5536
+ width: level.width,
5537
+ height: level.height
5538
+ };
5539
+ }
5540
+ }
5541
+ }
5542
+ } catch (err) {
5543
+ _didIteratorError = true;
5544
+ _iteratorError = err;
5545
+ } finally{
5546
+ try {
5547
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5548
+ _iterator.return();
5549
+ }
5550
+ } finally{
5551
+ if (_didIteratorError) {
5552
+ throw _iteratorError;
5553
+ }
5554
+ }
5555
+ }
5556
+ return max;
5557
+ }
5558
+ },
5519
5559
  {
5520
5560
  key: "getCurrentHlsSegmentDurationMs",
5521
5561
  value: function getCurrentHlsSegmentDurationMs() {