diff --git a/lib/util/stream_utils.js b/lib/util/stream_utils.js index a516746489..188583935b 100644 --- a/lib/util/stream_utils.js +++ b/lib/util/stream_utils.js @@ -1327,13 +1327,15 @@ shaka.util.StreamUtils = class { * @private */ static html5TrackToGenericShakaTrack_(html5Track) { + const language = html5Track.language; + /** @type {shaka.extern.Track} */ const track = { id: shaka.util.StreamUtils.html5TrackId(html5Track), active: false, type: '', bandwidth: 0, - language: shaka.util.LanguageUtils.normalize(html5Track.language), + language: shaka.util.LanguageUtils.normalize(language || 'und'), label: html5Track.label, kind: html5Track.kind, width: null, @@ -1363,6 +1365,7 @@ shaka.util.StreamUtils = class { originalAudioId: null, originalTextId: null, originalImageId: null, + originalLanguage: language, }; return track;