Skip to content

Commit

Permalink
fix(MediaCap): Default video width and height to 1
Browse files Browse the repository at this point in the history
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 shaka-project#1391

Change-Id: Idc27e6869a1276585a0ca35bd380e1b7ad1db242
  • Loading branch information
michellezhuogg committed Mar 18, 2021
1 parent f676fed commit 8d4fbf6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/util/stream_utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 8d4fbf6

Please sign in to comment.