Skip to content

Commit

Permalink
Merge pull request #76 from Stremio/fix/webos-null-tracks-lang
Browse files Browse the repository at this point in the history
fix(WebOSVideo): return null instead of empty string for tracks with no lang
  • Loading branch information
jaruba authored May 13, 2024
2 parents 5c50f9c + 733ea82 commit 7c0a2d3
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 7c0a2d3

Please sign in to comment.