Skip to content

Commit

Permalink
enable pass-through of UTF-8 chars when provided via lang-attribute (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
stschr committed Nov 30, 2023
1 parent 2b957f8 commit 01117ab
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
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
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 01117ab

Please sign in to comment.