Skip to content

Commit

Permalink
enable pass-through of UTF-8 chars when provided via lang-attribute (D…
Browse files Browse the repository at this point in the history
  • Loading branch information
stschr authored and eirikbjornr committed Feb 14, 2024
1 parent 5d80879 commit e88e8ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/dash/DashAdapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,8 @@ function DashAdapter() {
mediaInfo.codec = 'cea-608-in-SEI';
mediaInfo.isEmbedded = true;
mediaInfo.isFragmented = false;
mediaInfo.lang = bcp47Normalize(lang);
let normLang = bcp47Normalize(lang);
mediaInfo.lang = (normLang) ? normLang : lang;
mediaInfo.roles = ['caption'];
mediaInfo.rolesWithSchemeIdUri = [{schemeIdUri:'urn:mpeg:dash:role:2011', value:'caption'}];
}
Expand Down
2 changes: 1 addition & 1 deletion src/dash/parser/matchers/LangMatcher.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class LangMatcher extends BaseMatcher {
},
str => {
let lang = bcp47Normalize(str);
if (lang !== undefined) {
if (lang) {
return lang;
}
return String(str);
Expand Down

0 comments on commit e88e8ac

Please sign in to comment.