Skip to content

Commit

Permalink
Better Handling of Subs / Audio Tracks When Not Ready
Browse files Browse the repository at this point in the history
  • Loading branch information
jaruba committed May 30, 2024
1 parent eaf269c commit 07a9ca4
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/WebOsVideo/WebOsVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,9 @@ function WebOsVideo(options) {

var subscribed = false;

var currentSubTrack = false;
var currentSubTrack = null;

var currentAudioTrack = false;
var currentAudioTrack = null;

var textTracks = [];

Expand Down Expand Up @@ -567,6 +567,10 @@ function WebOsVideo(options) {
return subtitlesOpacity || 100;
}
case 'audioTracks': {
if (stream === null) {
return [];
}

return audioTracks;
}
case 'selectedAudioTrackId': {
Expand Down

0 comments on commit 07a9ca4

Please sign in to comment.