shaka-player 3.3.2 → 3.3.5

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.
Files changed (339) hide show
  1. package/.csslintrc +11 -1
  2. package/.github/ISSUE_TEMPLATE/bug_report.md +1 -1
  3. package/.github/pull_request_template.md +6 -34
  4. package/.github/workflows/build-and-test.yaml +129 -0
  5. package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +56 -0
  6. package/.github/workflows/custom-actions/set-commit-status/action.yaml +41 -0
  7. package/.github/workflows/demo-version-index.yaml +29 -0
  8. package/.github/workflows/nightly-demo.yaml +42 -0
  9. package/.github/workflows/release-please.yaml +147 -0
  10. package/.github/workflows/safari-homedir-launcher.sh +18 -0
  11. package/.github/workflows/selenium-lab-tests.yaml +92 -0
  12. package/AUTHORS +2 -0
  13. package/CHANGELOG.md +1718 -1675
  14. package/CONTRIBUTING.md +2 -2
  15. package/CONTRIBUTORS +2 -0
  16. package/README.md +7 -7
  17. package/app-engine/README.md +9 -0
  18. package/app-engine/demo-version-index/README.md +14 -0
  19. package/app-engine/demo-version-index/app.yaml +2 -0
  20. package/app-engine/demo-version-index/main.py +162 -0
  21. package/app-engine/demo-version-index/requirements.txt +6 -0
  22. package/app-engine/demo-version-index/templates/index.html +114 -0
  23. package/app-engine/shaka-player-demo/README.md +18 -0
  24. package/app-engine/shaka-player-demo/app.yaml +61 -0
  25. package/app-engine/shaka-player-demo/main.py +95 -0
  26. package/app-engine/shaka-player-demo/posters/10yo.png +0 -0
  27. package/app-engine/shaka-player-demo/posters/10yo.xcf +0 -0
  28. package/app-engine/shaka-player-demo/posters/1yo.jpg +0 -0
  29. package/app-engine/shaka-player-demo/posters/2yo.png +0 -0
  30. package/app-engine/shaka-player-demo/posters/2yo.xcf +0 -0
  31. package/app-engine/shaka-player-demo/posters/3yo.png +0 -0
  32. package/app-engine/shaka-player-demo/posters/3yo.xcf +0 -0
  33. package/app-engine/shaka-player-demo/posters/4yo.png +0 -0
  34. package/app-engine/shaka-player-demo/posters/4yo.xcf +0 -0
  35. package/app-engine/shaka-player-demo/posters/5yo.png +0 -0
  36. package/app-engine/shaka-player-demo/posters/5yo.xcf +0 -0
  37. package/app-engine/shaka-player-demo/posters/6yo.png +0 -0
  38. package/app-engine/shaka-player-demo/posters/6yo.xcf +0 -0
  39. package/app-engine/shaka-player-demo/posters/7yo.png +0 -0
  40. package/app-engine/shaka-player-demo/posters/7yo.xcf +0 -0
  41. package/app-engine/shaka-player-demo/posters/8yo.png +0 -0
  42. package/app-engine/shaka-player-demo/posters/8yo.xcf +0 -0
  43. package/app-engine/shaka-player-demo/posters/9yo.png +0 -0
  44. package/app-engine/shaka-player-demo/posters/9yo.xcf +0 -0
  45. package/app-engine/shaka-player-demo/posters/audioOnly.gif +0 -0
  46. package/app-engine/shaka-player-demo/posters/audioRickRoll.gif +0 -0
  47. package/app-engine/shaka-player-demo/posters/colorbars.gif +0 -0
  48. package/app-engine/shaka-player-demo/posters/fireworks.jpg +0 -0
  49. package/app-engine/shaka-player-demo/posters/party-hat.png +0 -0
  50. package/app-engine/shaka-player-demo/posters/sources.txt +46 -0
  51. package/app-engine/shaka-player-demo/posters/standard.png +0 -0
  52. package/app-engine/shaka-player-demo/posters/trek.jpg +0 -0
  53. package/app-engine/shaka-player-demo/posters/valentines.png +0 -0
  54. package/app-engine/shaka-player-demo/posters/zombie.jpg +0 -0
  55. package/app-engine/shaka-player-demo/posters.py +110 -0
  56. package/app-engine/shaka-player-demo/requirements.txt +5 -0
  57. package/app-engine/shaka-player-demo/time.txt +1 -0
  58. package/build/README.md +3 -3
  59. package/build/checkversion.py +2 -2
  60. package/build/conformance.textproto +13 -0
  61. package/build/docker/Dockerfile +20 -0
  62. package/build/docker/docker-compose.yml +10 -0
  63. package/build/gendeps.py +18 -15
  64. package/build/shaka-lab.yaml +163 -0
  65. package/build/shakaBuildHelpers.py +4 -29
  66. package/build/test.py +94 -29
  67. package/build/types/core +0 -1
  68. package/build/types/polyfill +1 -0
  69. package/build/wrapper.template.js +2 -2
  70. package/demo/TengwarTelcontar.woff2 +0 -0
  71. package/demo/asset_card.js +1 -2
  72. package/demo/cast_receiver/index.html +1 -1
  73. package/demo/cast_receiver/receiver_app.css +14 -14
  74. package/demo/common/assets.js +2 -0
  75. package/demo/config.js +0 -1
  76. package/demo/custom.js +0 -1
  77. package/demo/customWarning.txt +2 -2
  78. package/demo/demo.less +29 -18
  79. package/demo/demo_uncompiled.js +1 -13
  80. package/demo/index.html +1 -1
  81. package/demo/main.js +3 -3
  82. package/dist/controls.css +3 -3
  83. package/dist/controls.css.map +1 -1
  84. package/dist/demo.compiled.debug.js +191 -194
  85. package/dist/demo.compiled.debug.map +4 -4
  86. package/dist/demo.compiled.js +191 -194
  87. package/dist/demo.compiled.map +4 -4
  88. package/dist/demo.css +1 -1
  89. package/dist/demo.css.map +1 -1
  90. package/dist/deps.js +232 -226
  91. package/dist/locales.js +30 -30
  92. package/dist/receiver.compiled.debug.js +43 -45
  93. package/dist/receiver.compiled.debug.map +4 -4
  94. package/dist/receiver.compiled.js +43 -45
  95. package/dist/receiver.compiled.map +4 -4
  96. package/dist/shaka-player.compiled.d.ts +247 -236
  97. package/dist/shaka-player.compiled.debug.d.ts +247 -236
  98. package/dist/shaka-player.compiled.debug.externs.js +15 -3
  99. package/dist/shaka-player.compiled.debug.js +284 -290
  100. package/dist/shaka-player.compiled.debug.map +4 -4
  101. package/dist/shaka-player.compiled.externs.js +15 -3
  102. package/dist/shaka-player.compiled.js +855 -859
  103. package/dist/shaka-player.compiled.map +4 -4
  104. package/dist/shaka-player.ui.d.ts +291 -280
  105. package/dist/shaka-player.ui.debug.d.ts +291 -280
  106. package/dist/shaka-player.ui.debug.externs.js +15 -3
  107. package/dist/shaka-player.ui.debug.js +296 -302
  108. package/dist/shaka-player.ui.debug.map +4 -4
  109. package/dist/shaka-player.ui.externs.js +15 -3
  110. package/dist/shaka-player.ui.js +1005 -1009
  111. package/dist/shaka-player.ui.map +4 -4
  112. package/docs/design/REDESIGN.md +33 -33
  113. package/docs/design/bg-fetch.md +2 -2
  114. package/docs/design/codec_preferences.md +1 -1
  115. package/docs/design/dash-audio-channels.md +3 -3
  116. package/docs/design/dash-manifests.md +1 -1
  117. package/docs/design/gap-jumping.md +3 -3
  118. package/docs/design/preload.md +2 -2
  119. package/docs/tutorials/faq.md +8 -8
  120. package/docs/tutorials/index.json +1 -0
  121. package/docs/tutorials/plugins.md +3 -3
  122. package/docs/tutorials/selenium-grid-config.md +122 -0
  123. package/docs/tutorials/welcome.md +10 -2
  124. package/externs/cmcd.js +1 -1
  125. package/karma.conf.js +141 -30
  126. package/lib/abr/simple_abr_manager.js +12 -6
  127. package/lib/cast/cast_proxy.js +3 -4
  128. package/lib/cea/cea608_data_channel.js +2 -2
  129. package/lib/cea/cea708_service.js +5 -4
  130. package/lib/cea/mp4_cea_parser.js +11 -5
  131. package/lib/cea/sei_processor.js +6 -3
  132. package/lib/dash/dash_parser.js +11 -14
  133. package/lib/dash/mpd_utils.js +4 -5
  134. package/lib/dash/segment_list.js +1 -2
  135. package/lib/dash/segment_template.js +3 -3
  136. package/lib/hls/hls_parser.js +34 -20
  137. package/lib/hls/manifest_text_parser.js +3 -3
  138. package/lib/media/adaptation_set.js +1 -2
  139. package/lib/media/content_workarounds.js +2 -2
  140. package/lib/media/drm_engine.js +3 -2
  141. package/lib/media/media_source_engine.js +10 -3
  142. package/lib/media/mp4_segment_index_parser.js +1 -4
  143. package/lib/media/playhead.js +2 -2
  144. package/lib/media/presentation_timeline.js +18 -8
  145. package/lib/media/streaming_engine.js +6 -6
  146. package/lib/media/time_ranges_utils.js +1 -3
  147. package/lib/media/video_wrapper.js +1 -1
  148. package/lib/net/networking_engine.js +1 -1
  149. package/lib/offline/indexeddb/storage_mechanism.js +4 -2
  150. package/lib/offline/storage.js +96 -95
  151. package/lib/player.js +190 -114
  152. package/lib/polyfill/all.js +2 -3
  153. package/lib/polyfill/encryption_scheme.js +1 -1
  154. package/lib/polyfill/media_capabilities.js +3 -3
  155. package/lib/polyfill/mediasource.js +1 -1
  156. package/lib/polyfill/symbol.js +46 -0
  157. package/lib/text/cue.js +1 -1
  158. package/lib/text/simple_text_displayer.js +2 -1
  159. package/lib/text/ttml_text_parser.js +8 -5
  160. package/lib/text/ui_text_displayer.js +1 -1
  161. package/lib/util/buffer_utils.js +1 -3
  162. package/lib/util/config_utils.js +25 -0
  163. package/lib/util/ebml_parser.js +3 -3
  164. package/lib/util/error.js +8 -1
  165. package/lib/util/iterables.js +0 -46
  166. package/lib/util/manifest_parser_utils.js +1 -1
  167. package/lib/util/mime_utils.js +48 -1
  168. package/lib/util/mp4_box_parsers.js +1 -4
  169. package/lib/util/mp4_parser.js +5 -7
  170. package/lib/util/periods.js +15 -15
  171. package/lib/util/platform.js +3 -3
  172. package/lib/util/player_configuration.js +9 -14
  173. package/lib/util/pssh.js +1 -4
  174. package/lib/util/stream_utils.js +8 -5
  175. package/lib/util/string_utils.js +3 -5
  176. package/lib/util/uint8array_utils.js +3 -5
  177. package/lib/util/xml_utils.js +15 -7
  178. package/package.json +61 -36
  179. package/roadmap.md +17 -17
  180. package/shaka-player.uncompiled.js +1 -0
  181. package/test/abr/simple_abr_manager_unit.js +3 -8
  182. package/test/ads/ad_manager_unit.js +0 -6
  183. package/test/cast/cast_proxy_unit.js +0 -8
  184. package/test/cast/cast_receiver_integration.js +1 -18
  185. package/test/cast/cast_receiver_unit.js +1 -9
  186. package/test/cast/cast_sender_unit.js +0 -6
  187. package/test/cast/cast_utils_unit.js +1 -13
  188. package/test/cea/cea608_memory_unit.js +0 -5
  189. package/test/cea/cea708_service_unit.js +0 -7
  190. package/test/cea/cea708_window_unit.js +0 -5
  191. package/test/cea/cea_decoder_unit.js +0 -6
  192. package/test/cea/dtvcc_packet_builder_unit.js +0 -3
  193. package/test/cea/dtvcc_packet_unit.js +0 -5
  194. package/test/cea/mp4_cea_parser_unit.js +0 -4
  195. package/test/dash/dash_parser_content_protection_unit.js +1 -10
  196. package/test/dash/dash_parser_live_unit.js +2 -15
  197. package/test/dash/dash_parser_manifest_unit.js +2 -40
  198. package/test/dash/dash_parser_segment_base_unit.js +1 -8
  199. package/test/dash/dash_parser_segment_list_unit.js +1 -7
  200. package/test/dash/dash_parser_segment_template_unit.js +0 -9
  201. package/test/dash/mpd_utils_unit.js +3 -11
  202. package/test/demo/demo_unit.js +0 -5
  203. package/test/deprecate/enforcer_unit.js +0 -4
  204. package/test/deprecate/version_unit.js +0 -2
  205. package/test/hls/hls_live_unit.js +28 -14
  206. package/test/hls/hls_parser_unit.js +2 -15
  207. package/test/hls/manifest_text_parser_unit.js +19 -10
  208. package/test/media/adaptation_set_criteria_unit.js +3 -7
  209. package/test/media/adaptation_set_unit.js +0 -2
  210. package/test/media/buffering_observer_unit.js +1 -4
  211. package/test/media/closed_caption_parser_unit.js +0 -3
  212. package/test/media/drm_engine_integration.js +2 -15
  213. package/test/media/drm_engine_unit.js +4 -24
  214. package/test/media/manifest_parser_unit.js +0 -4
  215. package/test/media/media_source_engine_integration.js +1 -7
  216. package/test/media/media_source_engine_unit.js +5 -18
  217. package/test/media/mp4_segment_index_parser_unit.js +0 -4
  218. package/test/media/play_rate_controller_unit.js +0 -4
  219. package/test/media/playhead_unit.js +8 -16
  220. package/test/media/presentation_timeline_unit.js +4 -7
  221. package/test/media/quality_observer_unit.js +0 -4
  222. package/test/media/region_observer_unit.js +1 -6
  223. package/test/media/region_timeline_unit.js +0 -3
  224. package/test/media/segment_index_unit.js +0 -6
  225. package/test/media/segment_reference_unit.js +0 -3
  226. package/test/media/stall_detector_unit.js +0 -5
  227. package/test/media/streaming_engine_integration.js +11 -36
  228. package/test/media/streaming_engine_unit.js +11 -35
  229. package/test/media/time_ranges_utils_unit.js +0 -2
  230. package/test/media/transmuxer_integration.js +0 -6
  231. package/test/media/webm_segment_index_parser_unit.js +0 -4
  232. package/test/net/data_uri_plugin_unit.js +0 -7
  233. package/test/net/http_plugin_unit.js +0 -9
  234. package/test/net/networking_engine_unit.js +0 -11
  235. package/test/offline/download_progress_estimator_unit.js +0 -2
  236. package/test/offline/indexeddb_storage_unit.js +1 -7
  237. package/test/offline/manifest_convert_unit.js +0 -8
  238. package/test/offline/offline_integration.js +1 -10
  239. package/test/offline/offline_manifest_parser_unit.js +0 -6
  240. package/test/offline/offline_scheme_unit.js +0 -8
  241. package/test/offline/offline_uri_unit.js +0 -2
  242. package/test/offline/storage_compatibility_unit.js +2 -15
  243. package/test/offline/storage_integration.js +1 -27
  244. package/test/player_external.js +9 -11
  245. package/test/player_integration.js +28 -38
  246. package/test/player_load_graph_integration.js +1 -6
  247. package/test/player_src_equals_external.js +3 -9
  248. package/test/player_src_equals_integration.js +81 -90
  249. package/test/player_unit.js +150 -38
  250. package/test/routing/walker_unit.js +0 -8
  251. package/test/test/assets/large_file.mpd +1 -1
  252. package/test/test/boot.js +84 -22
  253. package/test/test/externs/filters.js +4 -0
  254. package/test/test/externs/jasmine.js +2 -2
  255. package/test/test/externs/karma.js +4 -0
  256. package/test/test/namespace.js +10 -0
  257. package/test/test/util/canned_idb.js +0 -8
  258. package/test/test/util/cea_utils.js +0 -6
  259. package/test/test/util/dash_parser_util.js +0 -13
  260. package/test/test/util/fake_ad.js +0 -3
  261. package/test/test/util/fake_ad_manager.js +0 -9
  262. package/test/test/util/fake_demo_main.js +0 -5
  263. package/test/test/util/fake_drm_engine.js +0 -6
  264. package/test/test/util/fake_media_source_engine.js +0 -7
  265. package/test/test/util/fake_networking_engine.js +0 -5
  266. package/test/test/util/fake_text_displayer.js +0 -5
  267. package/test/test/util/indexeddb_utils.js +1 -10
  268. package/test/test/util/jasmine_fetch.js +0 -1
  269. package/test/test/util/loader.js +0 -18
  270. package/test/test/util/manifest_generator.js +9 -14
  271. package/test/test/util/manifest_parser_util.js +0 -6
  272. package/test/test/util/offline_utils.js +0 -5
  273. package/test/test/util/simple_fakes.js +40 -28
  274. package/test/test/util/stream_generator.js +0 -14
  275. package/test/test/util/streaming_engine_util.js +0 -15
  276. package/test/test/util/test_scheme.js +1 -19
  277. package/test/test/util/ttml_utils.js +0 -2
  278. package/test/test/util/ui_utils.js +0 -9
  279. package/test/test/util/util.js +5 -19
  280. package/test/test/util/waiter.js +84 -43
  281. package/test/text/cue_integration.js +0 -4
  282. package/test/text/lrc_text_parser_unit.js +0 -4
  283. package/test/text/mp4_ttml_parser_unit.js +0 -6
  284. package/test/text/mp4_vtt_parser_unit.js +1 -7
  285. package/test/text/sbv_text_parser_unit.js +0 -4
  286. package/test/text/simple_text_displayer_unit.js +1 -8
  287. package/test/text/srt_text_parser_unit.js +0 -4
  288. package/test/text/ssa_text_parser_unit.js +0 -5
  289. package/test/text/text_engine_unit.js +2 -7
  290. package/test/text/text_track_integration.js +0 -2
  291. package/test/text/ttml_text_parser_unit.js +2 -11
  292. package/test/text/ui_text_displayer_unit.js +44 -41
  293. package/test/text/vtt_text_parser_unit.js +0 -9
  294. package/test/text/web_vtt_generator_unit.js +0 -3
  295. package/test/ui/ad_ui_unit.js +0 -11
  296. package/test/ui/localization_unit.js +0 -3
  297. package/test/ui/text_displayer_layout_unit.js +1 -12
  298. package/test/ui/ui_customization_unit.js +0 -6
  299. package/test/ui/ui_integration.js +0 -16
  300. package/test/ui/ui_unit.js +1 -17
  301. package/test/util/abortable_operation_unit.js +4 -9
  302. package/test/util/array_utils_unit.js +0 -2
  303. package/test/util/buffer_utils_unit.js +0 -2
  304. package/test/util/cmcd_manager_unit.js +0 -3
  305. package/test/util/data_view_reader_unit.js +0 -4
  306. package/test/util/ebml_parser_unit.js +0 -4
  307. package/test/util/event_manager_unit.js +0 -3
  308. package/test/util/fake_event_target_unit.js +0 -5
  309. package/test/util/functional_unit.js +1 -1
  310. package/test/util/iterables_unit.js +0 -64
  311. package/test/util/language_utils_unit.js +0 -3
  312. package/test/util/manifest_parser_utils_unit.js +0 -2
  313. package/test/util/mime_utils_unit.js +54 -0
  314. package/test/util/mp4_box_parsers_unit.js +0 -5
  315. package/test/util/mp4_parser_unit.js +0 -4
  316. package/test/util/multi_map_unit.js +0 -3
  317. package/test/util/object_utils_unit.js +0 -2
  318. package/test/util/periods_unit.js +93 -7
  319. package/test/util/pssh_unit.js +0 -5
  320. package/test/util/state_history_unit.js +0 -2
  321. package/test/util/stream_utils_unit.js +3 -8
  322. package/test/util/string_utils_unit.js +0 -6
  323. package/test/util/text_parser_unit.js +0 -2
  324. package/test/util/xml_utils_unit.js +0 -4
  325. package/ui/less/ad_controls.less +6 -6
  326. package/ui/less/buttons.less +6 -6
  327. package/ui/less/containers.less +13 -15
  328. package/ui/less/overflow_menu.less +4 -4
  329. package/ui/less/range_elements.less +7 -2
  330. package/ui/less/tooltip.less +4 -4
  331. package/ui/locales/sjn-translations.yaml +257 -0
  332. package/ui/locales/sjn.json +42 -0
  333. package/ui/seek_bar.js +2 -1
  334. package/.github/workflows/build_and_test.yaml +0 -73
  335. package/.github/workflows/release.yaml +0 -53
  336. package/docs/tutorials/gsoc-ideas-list.md +0 -3
  337. package/externs/svgelement.js +0 -18
  338. package/externs/webcrypto.js +0 -18
  339. package/lib/util/mutex.js +0 -52
package/build/test.py CHANGED
@@ -19,13 +19,22 @@
19
19
  import argparse
20
20
  import json
21
21
  import logging
22
+ import os
22
23
  import platform
24
+ import re
23
25
 
24
26
  import build
25
27
  import gendeps
26
28
  import shakaBuildHelpers
27
29
 
28
30
 
31
+ # Set a higher default for capture_timeout in grid mode. If the test gets
32
+ # queued by the grid, this may prevent Karma from killing the session while
33
+ # waiting.
34
+ LOCAL_CAPTURE_TIMEOUT = 1 * 60 * 1000 # 1m in ms
35
+ SELENIUM_CAPTURE_TIMEOUT = 10 * 60 * 1000 # 10m in ms
36
+
37
+
29
38
  class _HandleMixedListsAction(argparse.Action):
30
39
  '''Action to handle comma-separated and space-separated lists.
31
40
 
@@ -59,6 +68,21 @@ class _HandleKeyValuePairs(argparse.Action):
59
68
  merged[key] = value
60
69
  setattr(namespace, self.dest, merged)
61
70
 
71
+ def _KeyValueValidator(argument):
72
+ '''To validate the option has a key value pair format.
73
+
74
+ When you forget to provide the option in key=value format,
75
+ it reminds you by throwing an error before executing any tests.
76
+ '''
77
+
78
+ keyValuePair = [str for str in argument.split('=') if str != ''];
79
+
80
+ if len(keyValuePair) == 2:
81
+ return argument
82
+ else:
83
+ raise argparse.ArgumentTypeError(
84
+ 'Received %s but expecting format of key=value' % argument
85
+ )
62
86
 
63
87
  def _IntGreaterThanZero(x):
64
88
  i = int(x)
@@ -85,6 +109,8 @@ def _GetDefaultBrowsers():
85
109
  raise Error('Unrecognized system: %s' % platform.uname()[0])
86
110
 
87
111
 
112
+ # TODO(joeyparrish): When internal tools using this Launcher system are removed,
113
+ # simplify this whole mess.
88
114
  class Launcher:
89
115
  """A stateful object for parsing arguments and running Karma commands.
90
116
 
@@ -111,7 +137,7 @@ class Launcher:
111
137
 
112
138
  running_commands = self.parser.add_argument_group(
113
139
  'Running',
114
- 'These commands affect how tests are ran.')
140
+ 'These commands affect how tests are run.')
115
141
  logging_commands = self.parser.add_argument_group(
116
142
  'Logging',
117
143
  'These commands affect what gets logged and how the logs will appear.')
@@ -183,8 +209,14 @@ class Launcher:
183
209
  action='store_true')
184
210
  running_commands.add_argument(
185
211
  '--drm',
186
- help='Run tests that require DRM.',
212
+ help='Run tests that require DRM (on by default).',
213
+ default=True,
187
214
  action='store_true')
215
+ running_commands.add_argument(
216
+ '--no-drm', '--nodrm',
217
+ help='Skip tests that require DRM (opposite of --drm).',
218
+ dest='drm',
219
+ action='store_false')
188
220
  running_commands.add_argument(
189
221
  '--quarantined',
190
222
  help='Run tests that have been quarantined.',
@@ -215,9 +247,9 @@ class Launcher:
215
247
  running_commands.add_argument(
216
248
  '--capture-timeout',
217
249
  help='Kill the browser if it does not capture in the given time [ms]. '
218
- '(default %(default)s)',
219
- type=int,
220
- default=60000)
250
+ '(default {} for local, {} for Selenium)'.format(
251
+ LOCAL_CAPTURE_TIMEOUT, SELENIUM_CAPTURE_TIMEOUT),
252
+ type=int)
221
253
  running_commands.add_argument(
222
254
  '--delay-tests',
223
255
  help='Insert an artificial delay between tests, in seconds. '
@@ -244,7 +276,7 @@ class Launcher:
244
276
  help='Configure license servers for the custom asset playback test. '
245
277
  'May be specified multiple times to configure multiple key '
246
278
  'systems.',
247
- type=str,
279
+ type=_KeyValueValidator,
248
280
  metavar='KEY_SYSTEM_ID=LICENSE_SERVER_URI',
249
281
  action=_HandleKeyValuePairs)
250
282
  running_commands.add_argument(
@@ -258,6 +290,13 @@ class Launcher:
258
290
  help="Don't use Babel to convert ES6 to ES5.",
259
291
  dest='babel',
260
292
  action='store_false')
293
+ running_commands.add_argument(
294
+ '--grid-address',
295
+ help='Address (hostname:port) of a Selenium grid to run tests on.')
296
+ running_commands.add_argument(
297
+ '--grid-config',
298
+ help='Path to a yaml config defining Selenium grid browsers. '
299
+ '(See docs/selenium-grid-config.md)')
261
300
 
262
301
 
263
302
  logging_commands.add_argument(
@@ -313,6 +352,17 @@ class Launcher:
313
352
  help='Specify the hostname to be used when capturing browsers. This '
314
353
  'defaults to localhost.',
315
354
  default='localhost')
355
+ networking_commands.add_argument(
356
+ '--tls-key',
357
+ help='Specify a TLS key to serve tests over HTTPs.')
358
+ networking_commands.add_argument(
359
+ '--tls-cert',
360
+ help='Specify a TLS cert to serve tests over HTTPs.')
361
+ networking_commands.add_argument(
362
+ '--lets-encrypt-folder',
363
+ help="Specify a Let's Encrypt folder to search for the latest key and "
364
+ "cert, to serve tests over HTTPs. This overrides --tls-key and "
365
+ "--tls-cert.")
316
366
 
317
367
 
318
368
  pre_launch_commands.add_argument(
@@ -345,28 +395,36 @@ class Launcher:
345
395
  pass_through = [
346
396
  'auto_watch',
347
397
  'babel',
398
+ 'browsers',
348
399
  'capture_timeout',
349
400
  'colors',
401
+ 'delay_tests',
350
402
  'drm',
403
+ 'exclude_browsers',
351
404
  'external',
352
405
  'filter',
406
+ 'grid_address',
407
+ 'grid_config',
353
408
  'hostname',
354
409
  'html_coverage_report',
355
410
  'log_level',
356
411
  'logging',
412
+ 'no_browsers',
357
413
  'port',
358
414
  'quarantined',
359
415
  'quick',
360
416
  'random',
417
+ 'reporters',
361
418
  'report_slower_than',
362
419
  'seed',
363
420
  'single_run',
364
- 'uncompiled',
365
- 'delay_tests',
366
421
  'spec_hide_passed',
367
422
  'test_custom_asset',
368
423
  'test_custom_license_server',
369
424
  'test_timeout',
425
+ 'tls_key',
426
+ 'tls_cert',
427
+ 'uncompiled',
370
428
  ]
371
429
 
372
430
  # Check each value before setting it to avoid passing null values.
@@ -375,8 +433,33 @@ class Launcher:
375
433
  if value is not None:
376
434
  self.karma_config[name] = value
377
435
 
378
- if self.parsed_args.reporters:
379
- self.karma_config['reporters'] = self.parsed_args.reporters
436
+ if not self.parsed_args.capture_timeout:
437
+ # The default for capture_timeout depends on whether or not we are using
438
+ # a Selenium grid.
439
+ if self.parsed_args.grid_config:
440
+ self.karma_config['capture_timeout'] = SELENIUM_CAPTURE_TIMEOUT
441
+ else:
442
+ self.karma_config['capture_timeout'] = LOCAL_CAPTURE_TIMEOUT
443
+
444
+ self._HandleLetsEncryptConfig()
445
+
446
+ def _HandleLetsEncryptConfig(self):
447
+ folder = self.parsed_args.lets_encrypt_folder
448
+ if not folder:
449
+ return
450
+
451
+ max_serial_number = 0
452
+ # Go through the contents of the folder to find the latest key & cert.
453
+ for file_name in os.listdir(folder):
454
+ matches = re.match(r'(?:privkey|fullchain)(\d+).pem', file_name)
455
+ if matches:
456
+ serial_number = int(matches.group(1))
457
+ max_serial_number = max(max_serial_number, serial_number)
458
+
459
+ self.karma_config['tls_key'] = os.path.join(
460
+ folder, 'privkey{}.pem'.format(max_serial_number))
461
+ self.karma_config['tls_cert'] = os.path.join(
462
+ folder, 'fullchain{}.pem'.format(max_serial_number))
380
463
 
381
464
  def ResolveBrowsers(self, default_browsers):
382
465
  """Decide what browsers we should use.
@@ -385,25 +468,7 @@ class Launcher:
385
468
  additional logic to derive a browser list from the parsed arguments.
386
469
  """
387
470
  assert(default_browsers and len(default_browsers))
388
-
389
- if self.parsed_args.no_browsers:
390
- logging.warning('In this mode browsers must manually connect to karma.')
391
- elif self.parsed_args.browsers:
392
- self.karma_config['browsers'] = self.parsed_args.browsers
393
- else:
394
- logging.warning('Using default browsers: %s', default_browsers)
395
- self.karma_config['browsers'] = default_browsers
396
-
397
- # Check if there are any browsers that we should remove
398
- if self.parsed_args.exclude_browsers and 'browsers' in self.karma_config:
399
- all_browsers = set(self.karma_config['browsers'])
400
- bad_browsers = set(self.parsed_args.exclude_browsers)
401
- if bad_browsers - all_browsers:
402
- raise RuntimeError('Attempting to exclude unselected browsers: %s' %
403
- ','.join(bad_browsers - all_browsers))
404
-
405
- good_browsers = all_browsers - bad_browsers
406
- self.karma_config['browsers'] = list(good_browsers)
471
+ self.karma_config['default_browsers'] = default_browsers
407
472
 
408
473
  def RunCommand(self, karma_conf):
409
474
  """Build a command and send it to Karma for execution.
package/build/types/core CHANGED
@@ -84,7 +84,6 @@
84
84
  +../../lib/util/mp4_box_parsers.js
85
85
  +../../lib/util/mp4_parser.js
86
86
  +../../lib/util/multi_map.js
87
- +../../lib/util/mutex.js
88
87
  +../../lib/util/networking.js
89
88
  +../../lib/util/object_utils.js
90
89
  +../../lib/util/operation_manager.js
@@ -15,6 +15,7 @@
15
15
  +../../lib/polyfill/pip_webkit.js
16
16
  +../../lib/polyfill/random_uuid.js
17
17
  +../../lib/polyfill/storage_estimate.js
18
+ +../../lib/polyfill/symbol.js
18
19
  +../../lib/polyfill/video_play_promise.js
19
20
  +../../lib/polyfill/videoplaybackquality.js
20
21
  +../../lib/polyfill/vttcue.js
@@ -6,7 +6,7 @@
6
6
 
7
7
  (function() {
8
8
  // This is "window" in browsers and "global" in nodejs.
9
- // See https://github.com/google/shaka-player/issues/1445
9
+ // See https://github.com/shaka-project/shaka-player/issues/1445
10
10
  var innerGlobal = typeof window != 'undefined' ? window : global;
11
11
 
12
12
  // This is where our library exports things to. It is "this" in the wrapped
@@ -18,7 +18,7 @@
18
18
  // $jscomp.global, which will be "window", or "global", or "this", depending
19
19
  // on circumstances.
20
20
  // See https://github.com/google/closure-compiler/issues/2957 and
21
- // https://github.com/google/shaka-player/issues/1455#issuecomment-393250035
21
+ // https://github.com/shaka-project/shaka-player/issues/1455#issuecomment-393250035
22
22
 
23
23
  // We provide "global" for use by Closure, and "window" for use by the Shaka
24
24
  // library itself. Both point to "innerGlobal" above.
Binary file
@@ -4,11 +4,10 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
-
8
7
  goog.provide('shakaDemo.AssetCard');
9
8
 
10
-
11
9
  goog.require('goog.asserts');
10
+ goog.require('shakaAssets');
12
11
  goog.require('shakaDemo.MessageIds');
13
12
  goog.require('shakaDemo.Tooltips');
14
13
  goog.requireType('ShakaDemoAssetInfo');
@@ -63,7 +63,7 @@ UNCOMPILED_JS = [
63
63
  <script defer src="../load.js"></script>
64
64
  </head>
65
65
  <body>
66
- <div data-shaka-player-container id="videoContainer">
66
+ <div data-shaka-player-container id="video-container">
67
67
  <video autoplay data-shaka-player id="video"></video>
68
68
  </div>
69
69
  <!-- Covers everything else while idle -->
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- /* Experimentation has revealed that unless html, body, and videoContainer are
7
+ /* Experimentation has revealed that unless html, body, and video-container are
8
8
  * width and height 100%, video can force all its parents to grow larger than
9
9
  * window.innerHeight, causing things to be cut off for some content.
10
10
  */
@@ -25,7 +25,7 @@ body {
25
25
  color: white;
26
26
  }
27
27
 
28
- #videoContainer {
28
+ #video-container {
29
29
  width: 100%;
30
30
  height: 100%;
31
31
  }
@@ -83,29 +83,29 @@ body:after {
83
83
  height: 0;
84
84
  overflow: hidden;
85
85
  z-index: -1;
86
- content: url(idle1.jpg) url(idle2.jpg) url(idle3.jpg);
86
+ content: url("idle1.jpg") url("idle2.jpg") url("idle3.jpg");
87
87
  }
88
88
 
89
89
  @keyframes bg-change {
90
- 0% { background-image: url('idle1.jpg'); padding-left: 0; }
90
+ 0% { background-image: url("idle1.jpg"); padding-left: 0; }
91
91
 
92
- 32% { background-image: url('idle1.jpg'); padding-left: 0; }
92
+ 32% { background-image: url("idle1.jpg"); padding-left: 0; }
93
93
 
94
- 34% { background-image: url('idle2.jpg'); padding-left: 0; }
94
+ 34% { background-image: url("idle2.jpg"); padding-left: 0; }
95
95
 
96
- 49% { background-image: url('idle2.jpg'); padding-left: 0; }
96
+ 49% { background-image: url("idle2.jpg"); padding-left: 0; }
97
97
 
98
- 50% { background-image: url('idle2.jpg'); padding-left: 400px; }
98
+ 50% { background-image: url("idle2.jpg"); padding-left: 400px; }
99
99
 
100
- 65% { background-image: url('idle2.jpg'); padding-left: 400px; }
100
+ 65% { background-image: url("idle2.jpg"); padding-left: 400px; }
101
101
 
102
- 67% { background-image: url('idle3.jpg'); padding-left: 400px; }
102
+ 67% { background-image: url("idle3.jpg"); padding-left: 400px; }
103
103
 
104
- 87% { background-image: url('idle3.jpg'); padding-left: 400px; }
104
+ 87% { background-image: url("idle3.jpg"); padding-left: 400px; }
105
105
 
106
- 88% { background-image: url('idle3.jpg'); padding-left: 0; }
106
+ 88% { background-image: url("idle3.jpg"); padding-left: 0; }
107
107
 
108
- 98% { background-image: url('idle3.jpg'); padding-left: 0; }
108
+ 98% { background-image: url("idle3.jpg"); padding-left: 0; }
109
109
 
110
- 100% { background-image: url('idle1.jpg'); padding-left: 0; }
110
+ 100% { background-image: url("idle1.jpg"); padding-left: 0; }
111
111
  }
@@ -13,6 +13,8 @@
13
13
  goog.require('ShakaDemoAssetInfo');
14
14
  goog.require('shakaDemo.MessageIds');
15
15
 
16
+ goog.provide('shakaAssets');
17
+
16
18
 
17
19
  // Types and enums {{{
18
20
  /**
package/demo/config.js CHANGED
@@ -11,7 +11,6 @@ goog.require('goog.asserts');
11
11
  goog.require('shakaDemo.BoolInput');
12
12
  goog.require('shakaDemo.DatalistInput');
13
13
  goog.require('shakaDemo.InputContainer');
14
- goog.require('shakaDemo.Main');
15
14
  goog.require('shakaDemo.MessageIds');
16
15
  goog.require('shakaDemo.NumberInput');
17
16
  goog.require('shakaDemo.SelectInput');
package/demo/custom.js CHANGED
@@ -12,7 +12,6 @@ goog.require('ShakaDemoAssetInfo');
12
12
  goog.require('shakaDemo.AssetCard');
13
13
  goog.require('shakaDemo.Input');
14
14
  goog.require('shakaDemo.InputContainer');
15
- goog.require('shakaDemo.Main');
16
15
  goog.require('shakaDemo.MessageIds');
17
16
  goog.require('shakaDemo.TextInput');
18
17
 
@@ -4,5 +4,5 @@ of the asset you were playing at the time you pressed the bug report button.
4
4
  We have detected that you were playing a custom asset.
5
5
  If this asset's URL is confidential, you might instead want to fill out an issue
6
6
  template manually:
7
- https://github.com/google/shaka-player/issues/new/choose
8
- -->
7
+ https://github.com/shaka-project/shaka-player/issues/new/choose
8
+ -->
package/demo/demo.less CHANGED
@@ -4,6 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
+ /* stylelint-disable selector-class-pattern -- MDL classes can't be changed */
8
+
7
9
  // Import the MDL styles with the desired color scheme.
8
10
  @import (css, inline) "../node_modules/material-design-lite/dist/material.indigo-blue.min.css";
9
11
  @import (css, inline) "../node_modules/dialog-polyfill/dialog-polyfill.css";
@@ -15,7 +17,7 @@
15
17
  @drawer-width: 550px;
16
18
 
17
19
  @mdl-footer-link-color: #9e9e9e; /* copied from MDL stylesheet */
18
- @mdl-button-color: rgb(63,81,181); /* copied from MDL stylesheet */
20
+ @mdl-button-color: rgb(63 81 181); /* copied from MDL stylesheet */
19
21
 
20
22
  @progress-circle-size: 45px;
21
23
  @progress-circle-thickness: 5px;
@@ -24,7 +26,7 @@
24
26
  * here we override the font family for the MDL class. Without this, the menu
25
27
  * on the left side of the screen has no icon. */
26
28
  .material-icons {
27
- font-family: 'Material Icons Round';
29
+ font-family: "Material Icons Round";
28
30
  }
29
31
 
30
32
  /* Conflicting styles between the icons font & the MDL buttons caused some
@@ -73,12 +75,21 @@ main.mdl-layout__content {
73
75
  border-radius: 50%;
74
76
  width: 32px;
75
77
  color: #000;
76
- background: rgba(255, 255, 255, 0.85);
78
+ background: rgba(255 255 255 / 85%);
77
79
  }
78
80
 
79
81
  html, body {
80
82
  /* Ensure everything has a consistent font. */
81
- font-family: "Roboto", "Helvetica", "Arial", sans-serif;
83
+ font-family: Roboto-Regular, Roboto, sans-serif, TengwarTelcontar;
84
+ }
85
+
86
+ // This font supports the Sindarin (sjn) translation.
87
+ @font-face {
88
+ font-family: TengwarTelcontar;
89
+ // This could be served from demo/ (uncompiled) or dist (compiled).
90
+ src: url("../demo/TengwarTelcontar.woff2") format("woff2");
91
+ font-weight: normal;
92
+ font-style: normal;
82
93
  }
83
94
 
84
95
  /* Change the default opacity of the ripple container, to get around an iOS bug.
@@ -171,7 +182,7 @@ html, body {
171
182
  background-color: @error-color;
172
183
  color: white;
173
184
  position: relative;
174
- padding: 0 0;
185
+ padding: 0;
175
186
  top: 0;
176
187
  right: 1em;
177
188
  float: right;
@@ -203,56 +214,56 @@ html, body {
203
214
 
204
215
  /* features */
205
216
  &[icon="high_definition"] {
206
- background-image: data-uri('icons/custom_high_definition.svg');
217
+ background-image: data-uri("icons/custom_high_definition.svg");
207
218
  }
208
219
 
209
220
  &[icon="ultra_high_definition"] {
210
- background-image: data-uri('icons/custom_ultra_high_definition.svg');
221
+ background-image: data-uri("icons/custom_ultra_high_definition.svg");
211
222
  }
212
223
 
213
224
  &[icon="subtitles"] {
214
- background-image: data-uri('icons/baseline-subtitles-24px.svg');
225
+ background-image: data-uri("icons/baseline-subtitles-24px.svg");
215
226
  }
216
227
 
217
228
  &[icon="closed_caption"] {
218
- background-image: data-uri('icons/baseline-closed_caption-24px.svg');
229
+ background-image: data-uri("icons/baseline-closed_caption-24px.svg");
219
230
  }
220
231
 
221
232
  &[icon="live"] {
222
- background-image: data-uri('icons/baseline-live_tv-24px.svg');
233
+ background-image: data-uri("icons/baseline-live_tv-24px.svg");
223
234
  }
224
235
 
225
236
  &[icon="trick_mode"] {
226
- background-image: data-uri('icons/baseline-fast_forward-24px.svg');
237
+ background-image: data-uri("icons/baseline-fast_forward-24px.svg");
227
238
  }
228
239
 
229
240
  &[icon="surround_sound"] {
230
- background-image: data-uri('icons/baseline-surround_sound-24px.svg');
241
+ background-image: data-uri("icons/baseline-surround_sound-24px.svg");
231
242
  }
232
243
 
233
244
  &[icon="multiple_languages"] {
234
- background-image: data-uri('icons/baseline-language-24px.svg');
245
+ background-image: data-uri("icons/baseline-language-24px.svg");
235
246
  }
236
247
 
237
248
  &[icon="ad"] {
238
- background-image: data-uri('icons/custom_ad.svg');
249
+ background-image: data-uri("icons/custom_ad.svg");
239
250
  }
240
251
 
241
252
  &[icon="audio_only"] {
242
- background-image: data-uri('icons/baseline-audiotrack-24px.svg');
253
+ background-image: data-uri("icons/baseline-audiotrack-24px.svg");
243
254
  }
244
255
 
245
256
  /* key systems */
246
257
  &[icon="widevine"] {
247
- background-image: data-uri('icons/custom_widevine.svg');
258
+ background-image: data-uri("icons/custom_widevine.svg");
248
259
  }
249
260
 
250
261
  &[icon="clear_key"] {
251
- background-image: data-uri('icons/custom_clear_key.svg');
262
+ background-image: data-uri("icons/custom_clear_key.svg");
252
263
  }
253
264
 
254
265
  &[icon="playready"] {
255
- background-image: data-uri('icons/custom_playready.svg');
266
+ background-image: data-uri("icons/custom_playready.svg");
256
267
  }
257
268
  }
258
269
 
@@ -4,20 +4,8 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
 
7
- goog.require('shakaDemo.AssetCard');
8
- goog.require('shakaDemo.CloseButton');
9
7
  goog.require('shakaDemo.Config');
10
8
  goog.require('shakaDemo.Custom');
11
- goog.require('shakaDemo.Utils');
12
9
  goog.require('shakaDemo.Front');
13
- goog.require('shakaDemo.BoolInput');
14
- goog.require('shakaDemo.DatalistInput');
15
- goog.require('shakaDemo.Input');
16
- goog.require('shakaDemo.MessageIds');
17
- goog.require('shakaDemo.NumberInput');
18
- goog.require('shakaDemo.SelectInput');
19
- goog.require('shakaDemo.TextInput');
20
- goog.require('shakaDemo.InputContainer');
21
- goog.require('shakaDemo.Main');
22
10
  goog.require('shakaDemo.Search');
23
- goog.require('shakaDemo.Tooltips');
11
+ goog.require('shakaDemo.Main');
package/demo/index.html CHANGED
@@ -141,7 +141,7 @@ UNCOMPILED_JS = [
141
141
  <ul class="mdl-mega-footer__link-list">
142
142
  <li><a rel="noopener" target="_blank" href="../docs/api/index.html" localized-string="DOCUMENTATION"></a></li>
143
143
  <li><a rel="noopener" target="_blank" href="https://www.apache.org/licenses/LICENSE-2.0" localized-string="LICENSE"></a></li>
144
- <li><a rel="noopener" target="_blank" href="https://github.com/google/shaka-player" localized-string="SOURCE"></a></li>
144
+ <li><a rel="noopener" target="_blank" href="https://github.com/shaka-project/shaka-player" localized-string="SOURCE"></a></li>
145
145
  <li><a rel="noopener" target="_blank" href="https://www.npmjs.com/package/shaka-player" localized-string="NPM"></a></li>
146
146
  <li><a rel="noopener" target="_blank" href="../support.html" localized-string="SUPPORT"></a></li>
147
147
  </ul>
package/demo/main.js CHANGED
@@ -164,7 +164,7 @@ shakaDemo.Main = class {
164
164
  case shaka.ui.Overlay.FailReasonCode.NO_BROWSER_SUPPORT:
165
165
  message = this.getLocalizedString(
166
166
  shakaDemo.MessageIds.FAILURE_NO_BROWSER_SUPPORT);
167
- href = 'https://github.com/google/shaka-player#' +
167
+ href = 'https://github.com/shaka-project/shaka-player#' +
168
168
  'platform-and-browser-support-matrix';
169
169
  break;
170
170
  case shaka.ui.Overlay.FailReasonCode.PLAYER_FAILED_TO_LOAD:
@@ -289,7 +289,7 @@ shakaDemo.Main = class {
289
289
 
290
290
  // Navigate to the github issue opening interface, with the
291
291
  // partially-filled template as a preset body.
292
- let url = 'https://github.com/google/shaka-player/issues/new?';
292
+ let url = 'https://github.com/shaka-project/shaka-player/issues/new?';
293
293
  url += 'body=' + encodeURIComponent(text);
294
294
  // Open in another tab.
295
295
  window.open(url, '_blank');
@@ -1608,7 +1608,7 @@ shakaDemo.Main = class {
1608
1608
 
1609
1609
  /**
1610
1610
  * Sets the "version-string" divs to a version string.
1611
- * For example, "v2.5.4-master (uncompiled)".
1611
+ * For example, "v2.5.4-main (uncompiled)".
1612
1612
  * @private
1613
1613
  */
1614
1614
  setUpVersionStrings_() {