diff --git a/lib/hls/hls_parser.js b/lib/hls/hls_parser.js index 63d397c92b..2e909b2c0c 100644 --- a/lib/hls/hls_parser.js +++ b/lib/hls/hls_parser.js @@ -2361,6 +2361,7 @@ shaka.hls.HlsParser = class { } let kind = undefined; + let accessibilityPurpose = null; if (type == shaka.util.ManifestParserUtils.ContentType.TEXT) { if (roles.includes('public.accessibility.transcribes-spoken-dialog') && roles.includes('public.accessibility.describes-music-and-sound')) { @@ -2368,6 +2369,11 @@ shaka.hls.HlsParser = class { } else { kind = shaka.util.ManifestParserUtils.TextStreamKind.SUBTITLE; } + } else { + if (roles.includes('public.accessibility.describes-video')) { + accessibilityPurpose = + shaka.media.ManifestParser.AccessibilityPurpose.VISUALLY_IMPAIRED; + } } // If there are no roles, and we have defaulted to the subtitle "kind" for @@ -2412,7 +2418,7 @@ shaka.hls.HlsParser = class { hdr: undefined, videoLayout: undefined, tilesLayout: undefined, - accessibilityPurpose: null, + accessibilityPurpose: accessibilityPurpose, external: false, }; }