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.
@@ -5552,6 +5552,46 @@ var StormcloudVideoPlayer = /*#__PURE__*/ function() {
5552
5552
  return min;
5553
5553
  }
5554
5554
  },
5555
+ {
5556
+ key: "getMaxHlsResolution",
5557
+ value: function getMaxHlsResolution() {
5558
+ var _this_hls;
5559
+ var levels = (_this_hls = this.hls) === null || _this_hls === void 0 ? void 0 : _this_hls.levels;
5560
+ if (!levels || levels.length === 0) return null;
5561
+ var max = null;
5562
+ var maxPixels = 0;
5563
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
5564
+ try {
5565
+ for(var _iterator = levels[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
5566
+ var level = _step.value;
5567
+ if (level.width && level.height) {
5568
+ var pixels = level.width * level.height;
5569
+ if (pixels > maxPixels) {
5570
+ maxPixels = pixels;
5571
+ max = {
5572
+ width: level.width,
5573
+ height: level.height
5574
+ };
5575
+ }
5576
+ }
5577
+ }
5578
+ } catch (err) {
5579
+ _didIteratorError = true;
5580
+ _iteratorError = err;
5581
+ } finally{
5582
+ try {
5583
+ if (!_iteratorNormalCompletion && _iterator.return != null) {
5584
+ _iterator.return();
5585
+ }
5586
+ } finally{
5587
+ if (_didIteratorError) {
5588
+ throw _iteratorError;
5589
+ }
5590
+ }
5591
+ }
5592
+ return max;
5593
+ }
5594
+ },
5555
5595
  {
5556
5596
  key: "getCurrentHlsSegmentDurationMs",
5557
5597
  value: function getCurrentHlsSegmentDurationMs() {