shaka-player 4.4.1 → 4.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/deflake.yaml +8 -5
- package/.github/workflows/release-please.yaml +47 -7
- package/.github/workflows/shaka-bot-commands/command-test.sh +1 -1
- package/CHANGELOG.md +20 -0
- package/CONTRIBUTORS +1 -0
- package/demo/custom.js +5 -5
- package/dist/demo.compiled.debug.js +3 -3
- package/dist/demo.compiled.debug.map +1 -1
- package/dist/demo.compiled.js +3 -3
- package/dist/demo.compiled.map +1 -1
- package/dist/deps.js +2 -2
- package/dist/locales.js +31 -31
- package/dist/shaka-player.compiled.d.ts +311 -295
- package/dist/shaka-player.compiled.debug.d.ts +311 -295
- package/dist/shaka-player.compiled.debug.externs.js +37 -0
- package/dist/shaka-player.compiled.debug.js +145 -135
- package/dist/shaka-player.compiled.debug.map +3 -3
- package/dist/shaka-player.compiled.externs.js +37 -0
- package/dist/shaka-player.compiled.js +887 -884
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +355 -339
- package/dist/shaka-player.ui.debug.d.ts +355 -339
- package/dist/shaka-player.ui.debug.externs.js +37 -0
- package/dist/shaka-player.ui.debug.js +161 -151
- package/dist/shaka-player.ui.debug.map +3 -3
- package/dist/shaka-player.ui.externs.js +37 -0
- package/dist/shaka-player.ui.js +968 -967
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/fairplay.md +8 -0
- package/docs/tutorials/faq.md +1 -1
- package/externs/shaka/text.js +7 -0
- package/lib/dash/segment_template.js +3 -0
- package/lib/hls/hls_parser.js +8 -4
- package/lib/media/media_source_engine.js +1 -1
- package/lib/player.js +8 -57
- package/lib/text/lrc_text_parser.js +8 -0
- package/lib/text/mp4_ttml_parser.js +8 -0
- package/lib/text/mp4_vtt_parser.js +8 -0
- package/lib/text/sbv_text_parser.js +8 -0
- package/lib/text/srt_text_parser.js +8 -0
- package/lib/text/ssa_text_parser.js +8 -0
- package/lib/text/text_engine.js +8 -1
- package/lib/text/ttml_text_parser.js +10 -1
- package/lib/text/ui_text_displayer.js +49 -3
- package/lib/text/vtt_text_parser.js +21 -5
- package/lib/transmuxer/ts_transmuxer.js +44 -43
- package/lib/util/error.js +16 -10
- package/lib/util/player_configuration.js +2 -2
- package/lib/util/stream_utils.js +13 -11
- package/lib/util/ts_parser.js +70 -13
- package/package.json +2 -2
- package/test/text/text_engine_unit.js +4 -2
- package/test/text/ttml_text_parser_unit.js +3 -4
- package/test/text/vtt_text_parser_unit.js +17 -2
- package/test/text/web_vtt_layout_integration.js +0 -1
- package/ui/language_utils.js +0 -15
package/ui/language_utils.js
CHANGED
|
@@ -193,21 +193,6 @@ shaka.ui.LanguageUtils = class {
|
|
|
193
193
|
// Extract the base language from the locale as a fallback step.
|
|
194
194
|
const language = shaka.util.LanguageUtils.getBase(locale);
|
|
195
195
|
|
|
196
|
-
// If Intl.DisplayNames is supported we prefer it, because the list of
|
|
197
|
-
// languages is up to date.
|
|
198
|
-
if (window.Intl && 'DisplayNames' in Intl) {
|
|
199
|
-
try {
|
|
200
|
-
if (Intl.DisplayNames.supportedLocalesOf([locale]).length) {
|
|
201
|
-
const languageNames =
|
|
202
|
-
new Intl.DisplayNames([locale], {type: 'language'});
|
|
203
|
-
const language = languageNames.of(locale);
|
|
204
|
-
return language.charAt(0).toUpperCase() + language.slice(1);
|
|
205
|
-
}
|
|
206
|
-
} catch (e) {
|
|
207
|
-
// Ignore errors and try the fallback
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
|
|
211
196
|
// First try to resolve the full language name.
|
|
212
197
|
// If that fails, try the base.
|
|
213
198
|
// Finally, report "unknown".
|