From 8d4fbf691ea4bfe6de7afd4f3d39ae70597ecb12 Mon Sep 17 00:00:00 2001 From: Michelle Zhuo Date: Thu, 18 Mar 2021 14:50:38 -0700 Subject: [PATCH] fix(MediaCap): Default video width and height to 1 When querying MediaCapabilities.decodingInfo(), if the video width or height is not present, set 1 as default. Linux Firefox would claim the variant is unsupported via decodingInfo() if the values are falsy. Issue #1391 Change-Id: Idc27e6869a1276585a0ca35bd380e1b7ad1db242 --- lib/util/stream_utils.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/util/stream_utils.js b/lib/util/stream_utils.js index bd3b0df920..3c10607359 100644 --- a/lib/util/stream_utils.js +++ b/lib/util/stream_utils.js @@ -364,8 +364,8 @@ shaka.util.StreamUtils = class { // VideoConfiguration mediaDecodingConfig['video'] = { contentType: fullType, - width: video.width || 0, - height: video.height || 0, + width: video.width || 1, + height: video.height || 1, bitrate: video.bandwidth || variant.bandwidth || 1, // framerate must be greater than 0, otherwise the config is invalid. framerate: video.frameRate || 1,