From f60881917e82bf8ff021cd324b2219f1a8bde4f0 Mon Sep 17 00:00:00 2001 From: Denis Seleznev Date: Mon, 14 Aug 2023 21:36:59 +0300 Subject: [PATCH] Fix gettting maxWidth and maxHeight for restrictToElementSize option --- lib/abr/simple_abr_manager.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/abr/simple_abr_manager.js b/lib/abr/simple_abr_manager.js index 0b5a885ffc..d79a582912 100644 --- a/lib/abr/simple_abr_manager.js +++ b/lib/abr/simple_abr_manager.js @@ -182,8 +182,8 @@ shaka.abr.SimpleAbrManager = class { if (this.resizeObserver_ && this.config_.restrictToElementSize) { const devicePixelRatio = this.config_.ignoreDevicePixelRatio ? 1 : window.devicePixelRatio; - maxHeight = this.mediaElement_.clientWidth * devicePixelRatio; - maxWidth = this.mediaElement_.clientHeight * devicePixelRatio; + maxHeight = this.mediaElement_.clientHeight * devicePixelRatio; + maxWidth = this.mediaElement_.clientWidth * devicePixelRatio; } // Get sorted Variants.