Skip to content

Commit

Permalink
fix(WebOSVideo): return null instead of empty string for tracks with …
Browse files Browse the repository at this point in the history
…no lang
  • Loading branch information
tymmesyde committed May 13, 2024
1 parent 5c50f9c commit 733ea82
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/WebOsVideo/WebOsVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ function WebOsVideo(options) {
for (var i = 0; i < info.subtitleTrackInfo.length; i++) {
var textTrack = info.subtitleTrackInfo[i];
textTrack.index = i;
var textTrackLang = textTrack.language === '(null)' ? '' : textTrack.language;
var textTrackLang = textTrack.language === '(null)' ? null : textTrack.language;

var textTrackId = 'EMBEDDED_' + textTrack.index;

Expand Down Expand Up @@ -217,7 +217,7 @@ function WebOsVideo(options) {
if (!currentAudioTrack && !audioTracks.length) {
currentAudioTrack = audioTrackId;
}
var audioTrackLang = audioTrack.language === '(null)' ? '' : audioTrack.language;
var audioTrackLang = audioTrack.language === '(null)' ? null : audioTrack.language;
audioTracks.push({
id: audioTrackId,
lang: audioTrackLang,
Expand Down

0 comments on commit 733ea82

Please sign in to comment.