From 9a3ac18f1bbdae282b0614aabf6cad45e6511164 Mon Sep 17 00:00:00 2001 From: Denis Seleznev Date: Tue, 15 Aug 2023 18:44:10 +0300 Subject: [PATCH] fix: gettting maxWidth and maxHeight for restrictToElementSize option (#5481) --- 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 8f3d866c0c..dfc02f83ce 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.