Skip to content

Commit

Permalink
fix: tracks lang and label conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
tymmesyde committed Jan 16, 2025
1 parent 0046fef commit f4ebfc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/HTMLVideo/HTMLVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ function HTMLVideo(options) {
.map(function(track, index) {
return Object.freeze({
id: 'EMBEDDED_' + String(index),
lang: track.language.length > 0 ? track.language : null,
label: track.label.length > 0 ? track.label : null,
lang: track.language,
label: track.label || null,
origin: 'EMBEDDED',
embedded: true
});
Expand Down
4 changes: 2 additions & 2 deletions src/TitanVideo/TitanVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ function TitanVideo(options) {
return Object.freeze({
id: 'EMBEDDED_' + String(index),
lang: track.language,
label: track.label.length > 0 ? track.label : null,
label: track.label || null,
origin: 'EMBEDDED',
embedded: true
});
Expand Down Expand Up @@ -265,7 +265,7 @@ function TitanVideo(options) {
return Object.freeze({
id: 'EMBEDDED_' + String(index),
lang: track.language,
label: track.label.length > 0 ? track.label : null,
label: track.label || null,
origin: 'EMBEDDED',
embedded: true
});
Expand Down
4 changes: 2 additions & 2 deletions src/WebOsVideo/WebOsVideo.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ function WebOsVideo(options) {
textTracks.push({
id: 'EMBEDDED_' + textTrackId,
lang: track.lang || 'eng',
label: track.label.length > 0 ? track.label : null,
label: track.label || null,
origin: 'EMBEDDED',
embedded: true,
mode: textTrackId === currentSubTrack ? 'showing' : 'disabled',
Expand All @@ -392,7 +392,7 @@ function WebOsVideo(options) {
audioTracks.push({
id: 'EMBEDDED_' + audioTrackId,
lang: track.lang || 'eng',
label: track.label.length > 0 ? track.label : null,
label: track.label || null,
origin: 'EMBEDDED',
embedded: true,
mode: audioTrackId === currentAudioTrack ? 'showing' : 'disabled',
Expand Down

0 comments on commit f4ebfc9

Please sign in to comment.