Skip to content

Commit 648a5d4

Browse files
authored
Add check for video track presence in quality level processing (#478)
1 parent bc7003c commit 648a5d4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/js/api/provider/html5/providers/WebRTCLoader.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -733,10 +733,14 @@ const WebRTCLoader = function (provider,
733733

734734
let rendition = renditions[i];
735735

736+
if (!rendition.video_track && !rendition.audio_track) {
737+
continue;
738+
}
739+
736740
spec.qualityLevels.push({
737-
bitrate: rendition.video_track.video.bitrate,
738-
height: rendition.video_track.video.height,
739-
width: rendition.video_track.video.width,
741+
bitrate: rendition.video_track ? rendition.video_track.video.bitrate : rendition.audio_track.bitrate,
742+
height: rendition.video_track ? rendition.video_track.video.height : 0,
743+
width: rendition.video_track ? rendition.video_track.video.width : 0,
740744
index: i,
741745
label: rendition.name
742746
});

0 commit comments

Comments
 (0)