Skip to content

Commit

Permalink
Handle exceptions for unexpected values
Browse files Browse the repository at this point in the history
  • Loading branch information
SangwonOh committed Jul 5, 2022
1 parent 52abed2 commit 2c73b1c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/js/api/provider/html5/providers/WebRTCLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -938,8 +938,16 @@ const WebRTCLoader = function (provider,

provider.setCurrentQuality = (qualityIndex) => {

if (!playlistFromOme) {
return -1;
}

let rendition = playlistFromOme.renditions[qualityIndex];

if (!rendition) {
return spec.currentQuality;
}

sendMessage(ws, {
command: 'change_rendition',
id: mainPeerConnectionInfo.id,
Expand Down

0 comments on commit 2c73b1c

Please sign in to comment.