shaka-player 4.6.4 → 4.7.0

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 (598) hide show
  1. package/README.md +1 -0
  2. package/dist/controls.css +1 -1
  3. package/dist/controls.css.map +1 -1
  4. package/dist/deps.js +9 -5
  5. package/dist/locales.js +29 -29
  6. package/dist/shaka-player.compiled.d.ts +46 -3
  7. package/dist/shaka-player.compiled.debug.d.ts +46 -3
  8. package/dist/shaka-player.compiled.debug.externs.js +45 -0
  9. package/dist/shaka-player.compiled.debug.js +382 -351
  10. package/dist/shaka-player.compiled.debug.map +4 -4
  11. package/dist/shaka-player.compiled.externs.js +45 -0
  12. package/dist/shaka-player.compiled.js +1135 -1121
  13. package/dist/shaka-player.compiled.map +4 -4
  14. package/dist/shaka-player.ui.d.ts +68 -4
  15. package/dist/shaka-player.ui.debug.d.ts +68 -4
  16. package/dist/shaka-player.ui.debug.externs.js +77 -0
  17. package/dist/shaka-player.ui.debug.js +428 -392
  18. package/dist/shaka-player.ui.debug.map +4 -4
  19. package/dist/shaka-player.ui.externs.js +77 -0
  20. package/dist/shaka-player.ui.js +1304 -1290
  21. package/dist/shaka-player.ui.map +4 -4
  22. package/externs/mediasession.js +7 -0
  23. package/externs/shaka/abr_manager.js +8 -0
  24. package/externs/shaka/manifest.js +3 -3
  25. package/externs/shaka/player.js +59 -4
  26. package/lib/abr/simple_abr_manager.js +41 -15
  27. package/lib/cea/cea708_service.js +1 -1
  28. package/lib/cea/cea708_window.js +95 -7
  29. package/lib/dash/dash_parser.js +55 -11
  30. package/lib/media/adaptation_set_criteria.js +76 -10
  31. package/lib/media/media_source_engine.js +42 -18
  32. package/lib/media/segment_reference.js +12 -0
  33. package/lib/media/streaming_engine.js +55 -3
  34. package/lib/player.js +92 -6
  35. package/lib/util/cmsd_manager.js +269 -0
  36. package/lib/util/content_steering_manager.js +5 -1
  37. package/lib/util/mime_utils.js +6 -2
  38. package/lib/util/periods.js +108 -39
  39. package/lib/util/player_configuration.js +19 -5
  40. package/lib/util/stream_utils.js +82 -13
  41. package/package.json +1 -1
  42. package/ui/audio_language_selection.js +3 -0
  43. package/ui/controls.js +60 -0
  44. package/ui/externs/ui.js +12 -1
  45. package/ui/hidden_fast_forward_button.js +32 -0
  46. package/ui/hidden_rewind_button.js +32 -0
  47. package/ui/hidden_seek_button.js +121 -0
  48. package/ui/less/buttons.less +50 -0
  49. package/ui/less/containers.less +18 -0
  50. package/ui/resolution_selection.js +2 -0
  51. package/ui/ui.js +2 -0
  52. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -75
  53. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -26
  54. package/.github/ISSUE_TEMPLATE/question.md +0 -26
  55. package/.github/config.yml +0 -1
  56. package/.github/workflows/appspot.yaml +0 -39
  57. package/.github/workflows/build-and-test.yaml +0 -222
  58. package/.github/workflows/compute-incremental-coverage.py +0 -265
  59. package/.github/workflows/custom-actions/prep-for-appspot/action.yaml +0 -56
  60. package/.github/workflows/custom-actions/set-commit-status/action.yaml +0 -37
  61. package/.github/workflows/deflake.yaml +0 -31
  62. package/.github/workflows/demo-version-index.yaml +0 -43
  63. package/.github/workflows/nightly-demo.yaml +0 -42
  64. package/.github/workflows/release-please.yaml +0 -193
  65. package/.github/workflows/report-incremental-coverage.yaml +0 -39
  66. package/.github/workflows/safari-homedir-launcher.sh +0 -18
  67. package/.github/workflows/selenium-lab-tests.yaml +0 -370
  68. package/.github/workflows/shaka-bot-commands/command-help.sh +0 -27
  69. package/.github/workflows/shaka-bot-commands/command-test.sh +0 -56
  70. package/.github/workflows/shaka-bot-commands/lib.sh +0 -83
  71. package/.github/workflows/shaka-bot-commands/main.sh +0 -51
  72. package/.github/workflows/sync-labels.yaml +0 -33
  73. package/.github/workflows/talk-to-shaka-bot.yaml +0 -29
  74. package/.github/workflows/update-issues.yaml +0 -31
  75. package/.github/workflows/update-screenshots.yaml +0 -142
  76. package/.github/workflows/validate-pr-title.yaml +0 -27
  77. package/CHANGELOG.md +0 -5774
  78. package/CODE_OF_CONDUCT.md +0 -93
  79. package/CONTRIBUTING.md +0 -76
  80. package/demo/TengwarTelcontar.woff2 +0 -0
  81. package/demo/app_logo_144.png +0 -0
  82. package/demo/app_logo_192.png +0 -0
  83. package/demo/app_logo_256.png +0 -0
  84. package/demo/app_logo_384.png +0 -0
  85. package/demo/app_logo_512.png +0 -0
  86. package/demo/app_manifest.json +0 -29
  87. package/demo/asset_card.js +0 -410
  88. package/demo/autoTemplate.txt +0 -61
  89. package/demo/cast_receiver/idle1.jpg +0 -0
  90. package/demo/cast_receiver/idle2.jpg +0 -0
  91. package/demo/cast_receiver/idle3.jpg +0 -0
  92. package/demo/cast_receiver/index.html +0 -75
  93. package/demo/cast_receiver/receiver_app.css +0 -111
  94. package/demo/cast_receiver/receiver_app.js +0 -158
  95. package/demo/close_button.js +0 -60
  96. package/demo/common/asset.js +0 -510
  97. package/demo/common/assets.js +0 -1634
  98. package/demo/config.js +0 -859
  99. package/demo/custom.js +0 -907
  100. package/demo/customWarning.txt +0 -8
  101. package/demo/demo.less +0 -591
  102. package/demo/demo_uncompiled.js +0 -11
  103. package/demo/demo_utils.js +0 -113
  104. package/demo/favicon.ico +0 -0
  105. package/demo/front.js +0 -156
  106. package/demo/icons/README.md +0 -4
  107. package/demo/icons/baseline-audiotrack-24px.svg +0 -1
  108. package/demo/icons/baseline-closed_caption-24px.svg +0 -1
  109. package/demo/icons/baseline-fast_forward-24px.svg +0 -1
  110. package/demo/icons/baseline-language-24px.svg +0 -1
  111. package/demo/icons/baseline-live_tv-24px.svg +0 -1
  112. package/demo/icons/baseline-subtitles-24px.svg +0 -1
  113. package/demo/icons/baseline-surround_sound-24px.svg +0 -1
  114. package/demo/icons/custom_ad.svg +0 -1
  115. package/demo/icons/custom_box_with_text.svg +0 -1
  116. package/demo/icons/custom_clear_key.svg +0 -1
  117. package/demo/icons/custom_high_definition.svg +0 -1
  118. package/demo/icons/custom_playready.svg +0 -1
  119. package/demo/icons/custom_ultra_high_definition.svg +0 -1
  120. package/demo/icons/custom_widevine.svg +0 -1
  121. package/demo/index.html +0 -173
  122. package/demo/input.js +0 -270
  123. package/demo/input_container.js +0 -218
  124. package/demo/load.js +0 -156
  125. package/demo/main.js +0 -1854
  126. package/demo/search.js +0 -452
  127. package/demo/service_worker.js +0 -355
  128. package/demo/shaka_logo_trans.png +0 -0
  129. package/demo/tooltip.js +0 -29
  130. package/demo/visualizer.js +0 -335
  131. package/demo/visualizer_button.js +0 -84
  132. package/dist/demo.compiled.debug.js +0 -340
  133. package/dist/demo.compiled.debug.map +0 -8
  134. package/dist/demo.compiled.js +0 -340
  135. package/dist/demo.compiled.map +0 -8
  136. package/dist/demo.css +0 -6
  137. package/dist/demo.css.map +0 -1
  138. package/dist/receiver.compiled.debug.js +0 -187
  139. package/dist/receiver.compiled.debug.map +0 -8
  140. package/dist/receiver.compiled.js +0 -187
  141. package/dist/receiver.compiled.map +0 -8
  142. package/docs/announcement-list-join-group.png +0 -0
  143. package/docs/api-mainpage.md +0 -28
  144. package/docs/design/REDESIGN.md +0 -283
  145. package/docs/design/architecture.md +0 -13
  146. package/docs/design/bg-fetch-after.gv +0 -29
  147. package/docs/design/bg-fetch-after.gv.png +0 -0
  148. package/docs/design/bg-fetch-before.gv +0 -18
  149. package/docs/design/bg-fetch-before.gv.png +0 -0
  150. package/docs/design/bg-fetch.md +0 -134
  151. package/docs/design/cast.gv +0 -35
  152. package/docs/design/cast.gv.png +0 -0
  153. package/docs/design/chromecast.md +0 -151
  154. package/docs/design/codec_preferences.md +0 -158
  155. package/docs/design/dash-audio-channels.md +0 -123
  156. package/docs/design/dash-manifests.md +0 -248
  157. package/docs/design/dash-timeline.svg +0 -4
  158. package/docs/design/dataflow.gv +0 -66
  159. package/docs/design/dataflow.gv.png +0 -0
  160. package/docs/design/export.md +0 -70
  161. package/docs/design/fuzzy-locale-matching.md +0 -40
  162. package/docs/design/gap-jumping.md +0 -151
  163. package/docs/design/lcevc-architecture.png +0 -0
  164. package/docs/design/lcevc-demo.png +0 -0
  165. package/docs/design/lcevc-integration.md +0 -72
  166. package/docs/design/locale_compatibility.svg +0 -1
  167. package/docs/design/locales_tree.svg +0 -1
  168. package/docs/design/localization-design-principles.md +0 -158
  169. package/docs/design/newdemo.gv +0 -83
  170. package/docs/design/newdemo.gv.png +0 -0
  171. package/docs/design/offline.gv +0 -43
  172. package/docs/design/offline.gv.png +0 -0
  173. package/docs/design/offline.md +0 -153
  174. package/docs/design/ownership.gv +0 -76
  175. package/docs/design/ownership.gv.png +0 -0
  176. package/docs/design/preload.md +0 -299
  177. package/docs/design/preload.png +0 -0
  178. package/docs/design/talking-about-languages.md +0 -46
  179. package/docs/design/timeline.svg +0 -152
  180. package/docs/design/ui.md +0 -31
  181. package/docs/design/ui_player_relationships.svg +0 -1
  182. package/docs/jsdoc-plugin.js +0 -74
  183. package/docs/jsdoc-template/README.md +0 -1
  184. package/docs/jsdoc-template/publish.js +0 -879
  185. package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.eot +0 -0
  186. package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
  187. package/docs/jsdoc-template/static/fonts/OpenSans-Bold-webfont.woff +0 -0
  188. package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
  189. package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
  190. package/docs/jsdoc-template/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
  191. package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.eot +0 -0
  192. package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
  193. package/docs/jsdoc-template/static/fonts/OpenSans-Italic-webfont.woff +0 -0
  194. package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.eot +0 -0
  195. package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.svg +0 -1831
  196. package/docs/jsdoc-template/static/fonts/OpenSans-Light-webfont.woff +0 -0
  197. package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
  198. package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
  199. package/docs/jsdoc-template/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
  200. package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.eot +0 -0
  201. package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
  202. package/docs/jsdoc-template/static/fonts/OpenSans-Regular-webfont.woff +0 -0
  203. package/docs/jsdoc-template/static/scripts/linenumber.js +0 -44
  204. package/docs/jsdoc-template/static/scripts/show-widget.js +0 -55
  205. package/docs/jsdoc-template/static/styles/jsdoc-default.css +0 -438
  206. package/docs/jsdoc-template/tmpl/augments.tmpl +0 -10
  207. package/docs/jsdoc-template/tmpl/container.tmpl +0 -205
  208. package/docs/jsdoc-template/tmpl/details.tmpl +0 -152
  209. package/docs/jsdoc-template/tmpl/example.tmpl +0 -2
  210. package/docs/jsdoc-template/tmpl/examples.tmpl +0 -13
  211. package/docs/jsdoc-template/tmpl/exceptions.tmpl +0 -32
  212. package/docs/jsdoc-template/tmpl/layout.tmpl +0 -50
  213. package/docs/jsdoc-template/tmpl/mainpage.tmpl +0 -14
  214. package/docs/jsdoc-template/tmpl/members.tmpl +0 -47
  215. package/docs/jsdoc-template/tmpl/method.tmpl +0 -140
  216. package/docs/jsdoc-template/tmpl/modifies.tmpl +0 -14
  217. package/docs/jsdoc-template/tmpl/params.tmpl +0 -131
  218. package/docs/jsdoc-template/tmpl/properties.tmpl +0 -125
  219. package/docs/jsdoc-template/tmpl/returns.tmpl +0 -19
  220. package/docs/jsdoc-template/tmpl/source.tmpl +0 -8
  221. package/docs/jsdoc-template/tmpl/tutorial.tmpl +0 -21
  222. package/docs/jsdoc-template/tmpl/type.tmpl +0 -7
  223. package/docs/jsdoc.conf.json +0 -38
  224. package/docs/shaka-player-logo.png +0 -0
  225. package/docs/style.md +0 -174
  226. package/docs/tutorials/a11y.md +0 -64
  227. package/docs/tutorials/ad_monetization.md +0 -292
  228. package/docs/tutorials/application-level-redirects.md +0 -94
  229. package/docs/tutorials/architecture.md +0 -32
  230. package/docs/tutorials/basic-usage.md +0 -89
  231. package/docs/tutorials/blob-url.md +0 -15
  232. package/docs/tutorials/config.md +0 -148
  233. package/docs/tutorials/debugging.md +0 -189
  234. package/docs/tutorials/drm-config.md +0 -274
  235. package/docs/tutorials/errors.md +0 -95
  236. package/docs/tutorials/fairplay.md +0 -242
  237. package/docs/tutorials/faq.md +0 -252
  238. package/docs/tutorials/index.json +0 -29
  239. package/docs/tutorials/lcevc.md +0 -118
  240. package/docs/tutorials/license-server-auth.md +0 -248
  241. package/docs/tutorials/license-wrapping.md +0 -168
  242. package/docs/tutorials/manifest-parser.md +0 -365
  243. package/docs/tutorials/network-and-buffering-config.md +0 -119
  244. package/docs/tutorials/offline.md +0 -683
  245. package/docs/tutorials/plugins.md +0 -184
  246. package/docs/tutorials/selenium-grid-config.md +0 -174
  247. package/docs/tutorials/service-worker.md +0 -106
  248. package/docs/tutorials/ui-customization.md +0 -288
  249. package/docs/tutorials/ui.md +0 -232
  250. package/docs/tutorials/upgrade-manifest.md +0 -281
  251. package/docs/tutorials/upgrade.md +0 -104
  252. package/docs/tutorials/welcome.md +0 -108
  253. package/docs/tutorials/widevine-service-certs.md +0 -45
  254. package/karma.conf.js +0 -879
  255. package/maintained-branches.md +0 -15
  256. package/roadmap.md +0 -186
  257. package/test/abr/simple_abr_manager_unit.js +0 -398
  258. package/test/ads/ad_manager_unit.js +0 -260
  259. package/test/assumptions/uint8_array_unit.js +0 -22
  260. package/test/cast/cast_proxy_unit.js +0 -736
  261. package/test/cast/cast_receiver_integration.js +0 -488
  262. package/test/cast/cast_receiver_unit.js +0 -1183
  263. package/test/cast/cast_sender_unit.js +0 -973
  264. package/test/cast/cast_utils_unit.js +0 -311
  265. package/test/cea/cea608_memory_unit.js +0 -411
  266. package/test/cea/cea708_service_unit.js +0 -674
  267. package/test/cea/cea708_window_unit.js +0 -373
  268. package/test/cea/cea_decoder_unit.js +0 -615
  269. package/test/cea/dtvcc_packet_builder_unit.js +0 -158
  270. package/test/cea/dtvcc_packet_unit.js +0 -60
  271. package/test/cea/mp4_cea_parser_unit.js +0 -127
  272. package/test/codec_switching/codec_switching_integration.js +0 -182
  273. package/test/dash/dash_parser_content_protection_unit.js +0 -998
  274. package/test/dash/dash_parser_integration.js +0 -74
  275. package/test/dash/dash_parser_live_unit.js +0 -1542
  276. package/test/dash/dash_parser_manifest_unit.js +0 -3121
  277. package/test/dash/dash_parser_segment_base_unit.js +0 -421
  278. package/test/dash/dash_parser_segment_list_unit.js +0 -380
  279. package/test/dash/dash_parser_segment_template_unit.js +0 -910
  280. package/test/dash/mpd_utils_unit.js +0 -794
  281. package/test/demo/demo_unit.js +0 -108
  282. package/test/deprecate/enforcer_unit.js +0 -74
  283. package/test/deprecate/version_unit.js +0 -57
  284. package/test/hls/hls_live_unit.js +0 -1330
  285. package/test/hls/hls_parser_unit.js +0 -5276
  286. package/test/hls/manifest_text_parser_unit.js +0 -545
  287. package/test/media/adaptation_set_criteria_unit.js +0 -806
  288. package/test/media/adaptation_set_unit.js +0 -229
  289. package/test/media/buffering_observer_unit.js +0 -143
  290. package/test/media/closed_caption_parser_unit.js +0 -18
  291. package/test/media/content_workarounds_unit.js +0 -43
  292. package/test/media/drm_engine_integration.js +0 -356
  293. package/test/media/drm_engine_unit.js +0 -2805
  294. package/test/media/media_source_engine_integration.js +0 -691
  295. package/test/media/media_source_engine_unit.js +0 -1512
  296. package/test/media/mp4_segment_index_parser_unit.js +0 -80
  297. package/test/media/play_rate_controller_unit.js +0 -69
  298. package/test/media/playhead_unit.js +0 -1394
  299. package/test/media/presentation_timeline_unit.js +0 -477
  300. package/test/media/quality_observer_unit.js +0 -138
  301. package/test/media/region_observer_unit.js +0 -374
  302. package/test/media/region_timeline_unit.js +0 -139
  303. package/test/media/segment_index_unit.js +0 -1080
  304. package/test/media/segment_prefetch_unit.js +0 -243
  305. package/test/media/segment_reference_unit.js +0 -63
  306. package/test/media/stall_detector_unit.js +0 -184
  307. package/test/media/streaming_engine_integration.js +0 -632
  308. package/test/media/streaming_engine_unit.js +0 -4211
  309. package/test/media/time_ranges_utils_unit.js +0 -123
  310. package/test/media/webm_segment_index_parser_unit.js +0 -90
  311. package/test/mss/mss_parser_content_protection_unit.js +0 -49
  312. package/test/mss/mss_parser_unit.js +0 -474
  313. package/test/mss/mss_player_integration.js +0 -124
  314. package/test/net/data_uri_plugin_unit.js +0 -105
  315. package/test/net/http_plugin_unit.js +0 -439
  316. package/test/net/networking_engine_unit.js +0 -1236
  317. package/test/net/networking_utils_unit.js +0 -37
  318. package/test/offline/download_progress_estimator_unit.js +0 -90
  319. package/test/offline/indexeddb_storage_unit.js +0 -192
  320. package/test/offline/manifest_convert_unit.js +0 -622
  321. package/test/offline/offline_integration.js +0 -168
  322. package/test/offline/offline_manifest_parser_unit.js +0 -231
  323. package/test/offline/offline_scheme_unit.js +0 -154
  324. package/test/offline/offline_uri_unit.js +0 -59
  325. package/test/offline/storage_compatibility_unit.js +0 -344
  326. package/test/offline/storage_integration.js +0 -1858
  327. package/test/player_external.js +0 -237
  328. package/test/player_integration.js +0 -1371
  329. package/test/player_load_graph_integration.js +0 -865
  330. package/test/player_src_equals_external.js +0 -154
  331. package/test/player_src_equals_integration.js +0 -527
  332. package/test/player_unit.js +0 -4434
  333. package/test/polyfill/media_capabilities_unit.js +0 -277
  334. package/test/polyfill/patchedmediakeys_apple_unit.js +0 -130
  335. package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
  336. package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
  337. package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
  338. package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
  339. package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
  340. package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
  341. package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
  342. package/test/test/assets/3675/dash_0.mpd +0 -30
  343. package/test/test/assets/3675/dash_1.mpd +0 -30
  344. package/test/test/assets/3675/dash_2.mpd +0 -30
  345. package/test/test/assets/3675/dash_3.mpd +0 -30
  346. package/test/test/assets/3675/dash_4.mpd +0 -30
  347. package/test/test/assets/3675/dash_5.mpd +0 -26
  348. package/test/test/assets/3675/init-stream0.m4s +0 -0
  349. package/test/test/assets/audio-xhe-aac.mp4 +0 -0
  350. package/test/test/assets/audio.ts +0 -0
  351. package/test/test/assets/captions-test.ts +0 -0
  352. package/test/test/assets/cea-init.mp4 +0 -0
  353. package/test/test/assets/cea-segment.mp4 +0 -0
  354. package/test/test/assets/chapters.srt +0 -11
  355. package/test/test/assets/chapters.vtt +0 -10
  356. package/test/test/assets/chapters2.vtt +0 -10
  357. package/test/test/assets/dash-aes-128/Fragments(video=0,format=mpd-time-csf) +0 -0
  358. package/test/test/assets/dash-aes-128/Fragments(video=20000000,format=mpd-time-csf) +0 -0
  359. package/test/test/assets/dash-aes-128/Fragments(video=40000000,format=mpd-time-csf) +0 -0
  360. package/test/test/assets/dash-aes-128/Fragments(video=60000000,format=mpd-time-csf) +0 -0
  361. package/test/test/assets/dash-aes-128/Fragments(video=i,format=mpd-time-csf) +0 -0
  362. package/test/test/assets/dash-aes-128/dash.mpd +0 -18
  363. package/test/test/assets/dash-aes-128/license +0 -1
  364. package/test/test/assets/dash-multi-codec/audio_en_2c_128k_aac.mp4 +0 -0
  365. package/test/test/assets/dash-multi-codec/audio_es_2c_64k_opus.webm +0 -0
  366. package/test/test/assets/dash-multi-codec/dash.mpd +0 -32
  367. package/test/test/assets/dash-multi-codec/video_144p_108k_h264.mp4 +0 -0
  368. package/test/test/assets/db-dump-v1.json +0 -1
  369. package/test/test/assets/db-dump-v2-broken.json +0 -1
  370. package/test/test/assets/db-dump-v2-clean.json +0 -1
  371. package/test/test/assets/db-dump-v3.json +0 -1
  372. package/test/test/assets/db-dump-v4-broken.json +0 -1
  373. package/test/test/assets/db-dump-v5.json +0 -1
  374. package/test/test/assets/empty_caption_video_init.mp4 +0 -0
  375. package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
  376. package/test/test/assets/encrypted-sintel-audio-init.mp4 +0 -0
  377. package/test/test/assets/encrypted-sintel-audio-segment.mp4 +0 -0
  378. package/test/test/assets/encrypted-sintel-video-init.mp4 +0 -0
  379. package/test/test/assets/encrypted-sintel-video-segment.mp4 +0 -0
  380. package/test/test/assets/green-pixel.mp4 +0 -0
  381. package/test/test/assets/green-pixel.txt +0 -15
  382. package/test/test/assets/h265-cea-init.mp4 +0 -0
  383. package/test/test/assets/h265-cea-segment.mp4 +0 -0
  384. package/test/test/assets/hls-raw-aac/fileSequence0.aac +0 -0
  385. package/test/test/assets/hls-raw-aac/fileSequence1.aac +0 -0
  386. package/test/test/assets/hls-raw-aac/fileSequence2.aac +0 -0
  387. package/test/test/assets/hls-raw-aac/fileSequence3.aac +0 -0
  388. package/test/test/assets/hls-raw-aac/manifest.m3u8 +0 -4
  389. package/test/test/assets/hls-raw-aac/stream.m4a.m3u8 +0 -14
  390. package/test/test/assets/hls-raw-ac3/fileSequence0.ac3 +0 -0
  391. package/test/test/assets/hls-raw-ac3/fileSequence1.ac3 +0 -0
  392. package/test/test/assets/hls-raw-ac3/fileSequence2.ac3 +0 -0
  393. package/test/test/assets/hls-raw-ac3/fileSequence3.ac3 +0 -0
  394. package/test/test/assets/hls-raw-ac3/fileSequence4.ac3 +0 -0
  395. package/test/test/assets/hls-raw-ac3/fileSequence5.ac3 +0 -0
  396. package/test/test/assets/hls-raw-ac3/fileSequence6.ac3 +0 -0
  397. package/test/test/assets/hls-raw-ac3/fileSequence7.ac3 +0 -0
  398. package/test/test/assets/hls-raw-ac3/prog_index.m3u8 +0 -31
  399. package/test/test/assets/hls-raw-ec3/fileSequence0.ec3 +0 -0
  400. package/test/test/assets/hls-raw-ec3/fileSequence1.ec3 +0 -0
  401. package/test/test/assets/hls-raw-ec3/fileSequence2.ec3 +0 -0
  402. package/test/test/assets/hls-raw-ec3/fileSequence3.ec3 +0 -0
  403. package/test/test/assets/hls-raw-ec3/fileSequence4.ec3 +0 -0
  404. package/test/test/assets/hls-raw-ec3/fileSequence5.ec3 +0 -0
  405. package/test/test/assets/hls-raw-ec3/fileSequence6.ec3 +0 -0
  406. package/test/test/assets/hls-raw-ec3/fileSequence7.ec3 +0 -0
  407. package/test/test/assets/hls-raw-ec3/prog_index.m3u8 +0 -31
  408. package/test/test/assets/hls-raw-mp3/chunklist_w905519204.m3u8 +0 -13
  409. package/test/test/assets/hls-raw-mp3/media_w905519204_0.mp3 +0 -0
  410. package/test/test/assets/hls-raw-mp3/media_w905519204_1.mp3 +0 -0
  411. package/test/test/assets/hls-raw-mp3/media_w905519204_2.mp3 +0 -0
  412. package/test/test/assets/hls-raw-mp3/media_w905519204_3.mp3 +0 -0
  413. package/test/test/assets/hls-raw-mp3/playlist.m3u8 +0 -4
  414. package/test/test/assets/hls-ts-aac/playlist.m3u8 +0 -23
  415. package/test/test/assets/hls-ts-aac/segment_0.ts +0 -0
  416. package/test/test/assets/hls-ts-aac/segment_1.ts +0 -0
  417. package/test/test/assets/hls-ts-aac/segment_2.ts +0 -0
  418. package/test/test/assets/hls-ts-aac/segment_3.ts +0 -0
  419. package/test/test/assets/hls-ts-aac/segment_4.ts +0 -0
  420. package/test/test/assets/hls-ts-aac/segment_5.ts +0 -0
  421. package/test/test/assets/hls-ts-aac/segment_6.ts +0 -0
  422. package/test/test/assets/hls-ts-aac/segment_7.ts +0 -0
  423. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0000.ts +0 -0
  424. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0001.ts +0 -0
  425. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0002.ts +0 -0
  426. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0003.ts +0 -0
  427. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0004.ts +0 -0
  428. package/test/test/assets/hls-ts-ac3/ChID_voices_6ch_640kbps_dd_sub_0005.ts +0 -0
  429. package/test/test/assets/hls-ts-ac3/prog_index.m3u8 +0 -19
  430. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0000.ts +0 -0
  431. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0001.ts +0 -0
  432. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0002.ts +0 -0
  433. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0003.ts +0 -0
  434. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0004.ts +0 -0
  435. package/test/test/assets/hls-ts-ec3/ChID_voices_6ch_256kbps_ddp_sub_0005.ts +0 -0
  436. package/test/test/assets/hls-ts-ec3/prog_index.m3u8 +0 -19
  437. package/test/test/assets/hls-ts-h264/fileSequence0.ts +0 -0
  438. package/test/test/assets/hls-ts-h264/fileSequence1.ts +0 -0
  439. package/test/test/assets/hls-ts-h264/fileSequence2.ts +0 -0
  440. package/test/test/assets/hls-ts-h264/fileSequence3.ts +0 -0
  441. package/test/test/assets/hls-ts-h264/fileSequence4.ts +0 -0
  442. package/test/test/assets/hls-ts-h264/fileSequence5.ts +0 -0
  443. package/test/test/assets/hls-ts-h264/prog_index.m3u8 +0 -25
  444. package/test/test/assets/hls-ts-h265/0.ts +0 -0
  445. package/test/test/assets/hls-ts-h265/hevc.m3u8 +0 -6
  446. package/test/test/assets/hls-ts-h265/index.m3u8 +0 -7
  447. package/test/test/assets/hls-ts-mp3/manifest.m3u8 +0 -13
  448. package/test/test/assets/hls-ts-mp3/media_w239891843_0.ts +0 -0
  449. package/test/test/assets/hls-ts-mp3/media_w239891843_1.ts +0 -0
  450. package/test/test/assets/hls-ts-mp3/media_w239891843_2.ts +0 -0
  451. package/test/test/assets/hls-ts-mp3/media_w239891843_3.ts +0 -0
  452. package/test/test/assets/hls-ts-muxed-aac-h264/chunk.m3u8 +0 -17
  453. package/test/test/assets/hls-ts-muxed-aac-h264/n_0_0_0.ts +0 -0
  454. package/test/test/assets/hls-ts-muxed-aac-h264/n_1_0_0.ts +0 -0
  455. package/test/test/assets/hls-ts-muxed-aac-h264/n_2_0_0.ts +0 -0
  456. package/test/test/assets/hls-ts-muxed-aac-h264/n_3_0_0.ts +0 -0
  457. package/test/test/assets/hls-ts-muxed-aac-h264/n_4_0_0.ts +0 -0
  458. package/test/test/assets/hls-ts-muxed-aac-h264/n_5_0_0.ts +0 -0
  459. package/test/test/assets/hls-ts-muxed-aac-h264/playlist.m3u8 +0 -4
  460. package/test/test/assets/hls-ts-muxed-aac-h265/0.ts +0 -0
  461. package/test/test/assets/hls-ts-muxed-aac-h265/1.ts +0 -0
  462. package/test/test/assets/hls-ts-muxed-aac-h265/media.m3u8 +0 -9
  463. package/test/test/assets/hls-ts-muxed-ac3-h264/media.m3u8 +0 -24
  464. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00000.ts +0 -0
  465. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00001.ts +0 -0
  466. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00002.ts +0 -0
  467. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00003.ts +0 -0
  468. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00004.ts +0 -0
  469. package/test/test/assets/hls-ts-muxed-ac3-h264/s_00005.ts +0 -0
  470. package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0000.ts +0 -0
  471. package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0001.ts +0 -0
  472. package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0002.ts +0 -0
  473. package/test/test/assets/hls-ts-muxed-ec3-h264/ChID_voices_1280x720p_25fps_h264_6ch_256kbps_ddp_sub_0003.ts +0 -0
  474. package/test/test/assets/hls-ts-muxed-ec3-h264/prog_index.m3u8 +0 -14
  475. package/test/test/assets/hls-ts-muxed-mp3-h264/index.m3u8 +0 -23
  476. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-1-v1-a1.ts +0 -0
  477. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-2-v1-a1.ts +0 -0
  478. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-3-v1-a1.ts +0 -0
  479. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-4-v1-a1.ts +0 -0
  480. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-5-v1-a1.ts +0 -0
  481. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-6-v1-a1.ts +0 -0
  482. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-7-v1-a1.ts +0 -0
  483. package/test/test/assets/hls-ts-muxed-mp3-h264/seg-8-v1-a1.ts +0 -0
  484. package/test/test/assets/id3-metadata.aac +0 -0
  485. package/test/test/assets/id3-metadata.ts +0 -0
  486. package/test/test/assets/index-segment.mp4 +0 -0
  487. package/test/test/assets/index-segment.webm +0 -0
  488. package/test/test/assets/init-segment.webm +0 -0
  489. package/test/test/assets/large_file.mpd +0 -4930
  490. package/test/test/assets/multidrm-audio-init.mp4 +0 -0
  491. package/test/test/assets/multidrm-audio-segment.mp4 +0 -0
  492. package/test/test/assets/multidrm-video-init.mp4 +0 -0
  493. package/test/test/assets/multidrm-video-segment.mp4 +0 -0
  494. package/test/test/assets/multiple-trun-init.mp4 +0 -0
  495. package/test/test/assets/multiple-trun-segment.mp4 +0 -0
  496. package/test/test/assets/sintel-audio-init.mp4 +0 -0
  497. package/test/test/assets/sintel-audio-segment.mp4 +0 -0
  498. package/test/test/assets/sintel-video-init.mp4 +0 -0
  499. package/test/test/assets/sintel-video-segment.mp4 +0 -0
  500. package/test/test/assets/small.mp4 +0 -0
  501. package/test/test/assets/text-clip-alt.vtt +0 -63
  502. package/test/test/assets/text-clip.vtt +0 -63
  503. package/test/test/assets/thumbnails-sprites.vtt +0 -10
  504. package/test/test/assets/thumbnails.vtt +0 -10
  505. package/test/test/assets/ttml-init.mp4 +0 -0
  506. package/test/test/assets/ttml-segment-multiplemdat.mp4 +0 -0
  507. package/test/test/assets/ttml-segment.mp4 +0 -0
  508. package/test/test/assets/video.ts +0 -0
  509. package/test/test/assets/vtt-init.mp4 +0 -0
  510. package/test/test/assets/vtt-segment-multi-payload.mp4 +0 -0
  511. package/test/test/assets/vtt-segment-no-duration.mp4 +0 -0
  512. package/test/test/assets/vtt-segment-settings.mp4 +0 -0
  513. package/test/test/assets/vtt-segment.mp4 +0 -0
  514. package/test/test/boot.js +0 -495
  515. package/test/test/externs/filters.js +0 -44
  516. package/test/test/externs/fontfaceonload.js +0 -29
  517. package/test/test/externs/jasmine.js +0 -670
  518. package/test/test/externs/karma.js +0 -26
  519. package/test/test/externs/require.js +0 -21
  520. package/test/test/externs/sprintf.js +0 -18
  521. package/test/test/namespace.js +0 -10
  522. package/test/test/util/canned_idb.js +0 -379
  523. package/test/test/util/cea_utils.js +0 -60
  524. package/test/test/util/dash_parser_util.js +0 -329
  525. package/test/test/util/fake_ad.js +0 -321
  526. package/test/test/util/fake_ad_manager.js +0 -122
  527. package/test/test/util/fake_demo_main.js +0 -144
  528. package/test/test/util/fake_drm_engine.js +0 -103
  529. package/test/test/util/fake_media_source_engine.js +0 -464
  530. package/test/test/util/fake_networking_engine.js +0 -381
  531. package/test/test/util/fake_segment_prefetch.js +0 -84
  532. package/test/test/util/fake_text_displayer.js +0 -60
  533. package/test/test/util/id3_generator.js +0 -100
  534. package/test/test/util/indexeddb_utils.js +0 -124
  535. package/test/test/util/jasmine_fetch.js +0 -382
  536. package/test/test/util/layout_tests.js +0 -435
  537. package/test/test/util/loader.js +0 -88
  538. package/test/test/util/manifest_generator.js +0 -705
  539. package/test/test/util/manifest_parser_util.js +0 -101
  540. package/test/test/util/mss_parser_util.js +0 -119
  541. package/test/test/util/offline_utils.js +0 -105
  542. package/test/test/util/simple_fakes.js +0 -535
  543. package/test/test/util/stream_generator.js +0 -676
  544. package/test/test/util/streaming_engine_util.js +0 -506
  545. package/test/test/util/test_scheme.js +0 -778
  546. package/test/test/util/ttml_utils.js +0 -77
  547. package/test/test/util/ui_utils.js +0 -183
  548. package/test/test/util/util.js +0 -374
  549. package/test/test/util/waiter.js +0 -406
  550. package/test/text/cue_integration.js +0 -51
  551. package/test/text/lrc_text_parser_unit.js +0 -98
  552. package/test/text/mp4_ttml_parser_unit.js +0 -171
  553. package/test/text/mp4_vtt_parser_unit.js +0 -195
  554. package/test/text/sbv_text_parser_unit.js +0 -81
  555. package/test/text/simple_text_displayer_unit.js +0 -468
  556. package/test/text/srt_text_parser_unit.js +0 -163
  557. package/test/text/ssa_text_parser_unit.js +0 -382
  558. package/test/text/text_displayer_layout_unit.js +0 -323
  559. package/test/text/text_engine_unit.js +0 -500
  560. package/test/text/text_track_integration.js +0 -186
  561. package/test/text/ttml_text_parser_unit.js +0 -2176
  562. package/test/text/ui_text_displayer_unit.js +0 -608
  563. package/test/text/vtt_text_parser_unit.js +0 -1363
  564. package/test/text/web_vtt_generator_unit.js +0 -144
  565. package/test/text/web_vtt_layout_integration.js +0 -524
  566. package/test/transmuxer/transmuxer_engine_integration.js +0 -69
  567. package/test/transmuxer/transmuxer_integration.js +0 -443
  568. package/test/ui/ad_ui_unit.js +0 -369
  569. package/test/ui/localization_unit.js +0 -508
  570. package/test/ui/ui_customization_unit.js +0 -208
  571. package/test/ui/ui_integration.js +0 -669
  572. package/test/ui/ui_unit.js +0 -902
  573. package/test/util/abortable_operation_unit.js +0 -624
  574. package/test/util/array_utils_unit.js +0 -58
  575. package/test/util/buffer_utils_unit.js +0 -185
  576. package/test/util/cmcd_manager_unit.js +0 -440
  577. package/test/util/content_steering_manager_unit.js +0 -427
  578. package/test/util/data_view_reader_unit.js +0 -254
  579. package/test/util/ebml_parser_unit.js +0 -297
  580. package/test/util/event_manager_unit.js +0 -185
  581. package/test/util/fake_event_target_unit.js +0 -123
  582. package/test/util/id3_utils_unit.js +0 -168
  583. package/test/util/iterables_unit.js +0 -68
  584. package/test/util/language_utils_unit.js +0 -240
  585. package/test/util/manifest_parser_utils_unit.js +0 -55
  586. package/test/util/mime_utils_unit.js +0 -64
  587. package/test/util/mp4_box_parsers_unit.js +0 -246
  588. package/test/util/mp4_parser_unit.js +0 -373
  589. package/test/util/multi_map_unit.js +0 -94
  590. package/test/util/object_utils_unit.js +0 -79
  591. package/test/util/periods_unit.js +0 -1623
  592. package/test/util/pssh_unit.js +0 -226
  593. package/test/util/state_history_unit.js +0 -101
  594. package/test/util/stream_utils_unit.js +0 -1068
  595. package/test/util/string_utils_unit.js +0 -166
  596. package/test/util/text_parser_unit.js +0 -165
  597. package/test/util/ts_parser_unit.js +0 -77
  598. package/test/util/xml_utils_unit.js +0 -444
@@ -1,42 +0,0 @@
1
- name: Deploy Nightly Demo
2
-
3
- on:
4
- workflow_dispatch:
5
- # Allows for manual triggering.
6
- schedule:
7
- # Run every night at midnight PST / 8am UTC.
8
- - cron: '0 8 * * *'
9
-
10
- jobs:
11
- appspot:
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v3
15
- with:
16
- fetch-depth: 0
17
- persist-credentials: false
18
-
19
- - uses: actions/setup-node@v1
20
- with:
21
- node-version: 16
22
- registry-url: 'https://registry.npmjs.org'
23
-
24
- # The nightly demo has its own receiver app ID that points to the nightly
25
- # demo itself for the receiver side.
26
- - name: Override Cast Receiver App ID
27
- run: |
28
- sed \
29
- -i demo/index.html \
30
- -e 's/\(data-shaka-player-cast-receiver-id\)="[^"]*"/\1="07AEE832"/'
31
-
32
- - uses: ./.github/workflows/custom-actions/prep-for-appspot
33
-
34
- - uses: google-github-actions/auth@v0
35
- with:
36
- credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
37
-
38
- - uses: google-github-actions/deploy-appengine@v0
39
- with:
40
- project_id: shaka-player-demo
41
- version: nightly
42
- promote: false
@@ -1,193 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
- - v[0-9]*
8
-
9
- jobs:
10
- release:
11
- runs-on: ubuntu-latest
12
- outputs:
13
- release_created: ${{ steps.release.outputs.release_created }}
14
- tag_name: ${{ steps.release.outputs.tag_name }}
15
- steps:
16
- # Create/update release PR
17
- - uses: google-github-actions/release-please-action@v3
18
- id: release
19
- with:
20
- # Required input to specify the release type (node package).
21
- release-type: node
22
- # Make sure we create the PR against the correct branch.
23
- default-branch: ${{ github.ref_name }}
24
- # Use a special shaka-bot access token for releases.
25
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
26
- # Update these additional files containing version numbers.
27
- extra-files: lib/player.js
28
-
29
- # The jobs below are all conditional on a release having been created by
30
- # someone merging the release PR. They all run in parallel.
31
-
32
- tag-main:
33
- runs-on: ubuntu-latest
34
- needs: release
35
- if: needs.release.outputs.release_created && endsWith(needs.release.outputs.tag_name, '.0') == false
36
- steps:
37
- - uses: actions/checkout@v3
38
- with:
39
- # Check out the origin repo, and do it at main, not the PR branch.
40
- ref: main
41
- # Use a special shaka-bot access token for releases.
42
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
43
- - name: Tag the main branch
44
- run: |
45
- # Set missing git config for the tag.
46
- git config user.name "shaka-bot"
47
- git config user.email "shaka-bot@users.noreply.github.com"
48
- # Tag the main branch.
49
- VERSION=${{ needs.release.outputs.tag_name }}
50
- git tag -m "$VERSION-main" "$VERSION-main"
51
- git push origin "$VERSION-main"
52
-
53
- npm:
54
- runs-on: ubuntu-latest
55
- needs: release
56
- if: needs.release.outputs.release_created
57
- steps:
58
- - uses: actions/checkout@v3
59
- with:
60
- fetch-depth: 0
61
- persist-credentials: false
62
-
63
- - uses: actions/setup-node@v1
64
- with:
65
- node-version: 16
66
- registry-url: 'https://registry.npmjs.org'
67
-
68
- - name: Compute NPM tags
69
- run: |
70
- # NPM publish always sets a tag. If you don't provide an explicit
71
- # tag, you get the "latest" tag by default, but we want "latest" to
72
- # always point to the highest version number. So we set an explicit
73
- # tag on every "publish" command, then follow up with a command to
74
- # set "latest" only if this release was the highest version yet.
75
-
76
- # The explicit tag is based on the branch. If the git tag is v4.4.1,
77
- # the branch was v4.4.x, and the explicit NPM tag should be
78
- # v4.4-latest.
79
- GIT_TAG_NAME=${{ needs.release.outputs.tag_name }}
80
- NPM_TAG=$(echo "$GIT_TAG_NAME" | cut -f 1-2 -d .)-latest
81
- echo "NPM_TAG=$NPM_TAG" >> $GITHUB_ENV
82
-
83
- # We only tag the NPM package as "latest" if this release is the
84
- # highest version to date.
85
- RELEASE_TAGS=$(git tag | grep ^v[0-9] | grep -Ev -- '-(master|main)')
86
- LATEST_RELEASE=$(echo "$RELEASE_TAGS" | sort --version-sort | tail -1)
87
-
88
- if [[ "$GIT_TAG_NAME" == "$LATEST_RELEASE" ]]; then
89
- NPM_LATEST=true
90
- else
91
- NPM_LATEST=false
92
- fi
93
- echo NPM_LATEST=$NPM_LATEST >> $GITHUB_ENV
94
-
95
- # Debug the decisions made here.
96
- echo "Latest release: $LATEST_RELEASE"
97
- echo "This release: $GIT_TAG_NAME"
98
- echo "NPM tag: $NPM_TAG"
99
- echo "NPM latest: $NPM_LATEST"
100
-
101
- - run: npm ci
102
- - name: Publish
103
- env:
104
- NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
105
- run: |
106
- # Publish with an explicit tag.
107
- npm publish --tag "$NPM_TAG"
108
-
109
- # Add the "latest" tag if needed.
110
- if [[ "$NPM_LATEST" == "true" ]]; then
111
- NPM_VERSION=$(npm version --json | jq -r '."shaka-player"')
112
- npm dist-tag add "shaka-player@$NPM_VERSION" latest
113
- fi
114
-
115
- - run: npm pack
116
- - uses: svenstaro/upload-release-action@483c1e56f95e88835747b1c7c60581215016cbf2
117
- with:
118
- repo_token: ${{ secrets.GITHUB_TOKEN }}
119
- tag: ${{ needs.release.outputs.tag_name }}
120
- file: shaka-player-*.tgz
121
- file_glob: true
122
- overwrite: true
123
-
124
- appspot:
125
- runs-on: ubuntu-latest
126
- needs: release
127
- if: needs.release.outputs.release_created
128
- steps:
129
- - uses: actions/checkout@v3
130
- with:
131
- fetch-depth: 0
132
- persist-credentials: false
133
-
134
- - uses: actions/setup-node@v1
135
- with:
136
- node-version: 16
137
- registry-url: 'https://registry.npmjs.org'
138
-
139
- - name: Compute appspot subdomain and promotion
140
- run: |
141
- # This is the same as the version tag, but with dots replaced by
142
- # dashes. For example, v3.2.2 would have the subdomain v3-2-2.
143
- APPSPOT_SUBDOMAIN=$( echo ${{ needs.release.outputs.tag_name }} | sed -e 's/\./-/g' )
144
- echo APPSPOT_SUBDOMAIN=$APPSPOT_SUBDOMAIN >> $GITHUB_ENV
145
-
146
- # "Promoting" an appspot deployment makes it the default which shows
147
- # up on shaka-player-demo.appspot.com (no subdomain). This should be
148
- # done for the latest release version from the latest release branch.
149
- RELEASE_TAGS=$(git tag | grep ^v[0-9] | grep -Ev -- '-(master|main)')
150
- LATEST_RELEASE=$(echo "$RELEASE_TAGS" | sort --version-sort | tail -1)
151
- TAG_NAME=${{ needs.release.outputs.tag_name }}
152
-
153
- if [[ "$TAG_NAME" == "$LATEST_RELEASE" ]]; then
154
- APPSPOT_PROMOTE=true
155
- else
156
- APPSPOT_PROMOTE=false
157
- fi
158
- APPSPOT_PROMOTE=$APPSPOT_PROMOTE >> $GITHUB_ENV
159
-
160
- # Debug the decisions made here.
161
- echo "Subdomain: $APPSPOT_SUBDOMAIN"
162
- echo "Latest release: $LATEST_RELEASE"
163
- echo "This release: $TAG_NAME"
164
- echo "Promote: $APPSPOT_PROMOTE"
165
-
166
- - uses: ./.github/workflows/custom-actions/prep-for-appspot
167
-
168
- - uses: google-github-actions/auth@v0
169
- with:
170
- credentials_json: '${{ secrets.APPENGINE_DEPLOY_KEY }}'
171
-
172
- - uses: google-github-actions/deploy-appengine@v0
173
- with:
174
- project_id: shaka-player-demo
175
- version: ${{ env.APPSPOT_SUBDOMAIN }}
176
- promote: ${{ env.APPSPOT_PROMOTE }}
177
-
178
- auto-branch:
179
- runs-on: ubuntu-latest
180
- needs: release
181
- if: needs.release.outputs.release_created && endsWith(needs.release.outputs.tag_name, '.0')
182
- steps:
183
- - uses: actions/checkout@v3
184
- with:
185
- fetch-depth: 0
186
- # Use a special shaka-bot access token for releases.
187
- token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
188
-
189
- - name: Create release branch
190
- run: |
191
- TAG=${{ needs.release.outputs.tag_name }}
192
- BRANCH=$(echo "$TAG" | sed -e 's/\.0$/.x/')
193
- git push origin HEAD:"$BRANCH"
@@ -1,39 +0,0 @@
1
- name: Report Incremental Coverage
2
-
3
- # Runs when the build and test workflow completes. This will run with full
4
- # privileges, even if the other workflow doesn't. That allows us to leave PR
5
- # comments, when we would not be able to do so otherwise.
6
- on:
7
- workflow_run:
8
- workflows: [Build and Test PR]
9
- types: [completed]
10
-
11
- jobs:
12
- report:
13
- if: ${{ github.event.workflow_run.event == 'pull_request' }}
14
- runs-on: ubuntu-latest
15
-
16
- steps:
17
- - name: Checkout code
18
- uses: actions/checkout@v3
19
-
20
- - name: Compute incremental code coverage
21
- id: compute
22
- shell: bash
23
- env:
24
- GITHUB_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN }}
25
- # Fetches the coverage data from the run that triggered the report,
26
- # parses it, compares it to the changed lines in the PR, and computes
27
- # the incremental code coverage.
28
- run: |
29
- python .github/workflows/compute-incremental-coverage.py \
30
- --repo ${{ github.repository }} \
31
- --run-id ${{ github.event.workflow_run.id }}
32
-
33
- - name: Report incremental code coverage
34
- uses: thollander/actions-comment-pull-request@686ab1cab89e0f715a44a0d04b9fdfdd4f33d751
35
- with:
36
- message: "Incremental code coverage: ${{ steps.compute.outputs.coverage }}"
37
- comment_includes: "Incremental code coverage: "
38
- pr_number: ${{ steps.compute.outputs.pr_number }}
39
- GITHUB_TOKEN: ${{ secrets.SHAKA_BOT_TOKEN }}
@@ -1,18 +0,0 @@
1
- #!/bin/bash
2
-
3
- # A script to launch a homedir-installed copy of Safari in Karma. Used with
4
- # karma-script-launcher and --browsers path/to/script.
5
-
6
- # There is an issue where opening a URL in a browser that is not already open
7
- # will also open it in the default browser. See
8
- # https://apple.stackexchange.com/a/122000/454832 and the comments below it for
9
- # details.
10
-
11
- # The workaround is to open the browser explicitly first, without a URL.
12
- open -a ~/Applications/Safari.app --fresh
13
- sleep 5
14
-
15
- # Then open the browser with the URL, and wait for it to quite. In fact, the
16
- # browser won't be closed automatically at all, and Karma will kill this script
17
- # when the tests complete. But if we don't wait, Karma will error instead.
18
- open -a ~/Applications/Safari.app --wait-apps "$1"
@@ -1,370 +0,0 @@
1
- name: Selenium Lab Tests
2
-
3
- on:
4
- workflow_dispatch:
5
- # Allows for manual triggering on PRs. They should be reviewed first, to
6
- # avoid malicious code executing in the lab.
7
- inputs:
8
- pr:
9
- description: "A PR number to build and test in the lab. If empty, will build and test from main."
10
- required: false
11
- test_filter:
12
- description: "A regex filter to run a subset of the tests. If empty, all tests will run."
13
- required: false
14
- browser_filter:
15
- description: "A list of browsers to run the tests. If empty, all browsers will run."
16
- required: false
17
- workflow_call:
18
- # Allows for reuse from other workflows, such as "Update All Screenshots"
19
- # workflow.
20
- inputs:
21
- pr:
22
- description: "A PR number to build and test in the lab. If empty, will build and test from main."
23
- required: false
24
- type: string
25
- test_filter:
26
- description: "A regex filter to run a subset of the tests. If empty, all tests will run."
27
- required: false
28
- type: string
29
- browser_filter:
30
- description: "A list of browsers to run the tests. If empty, all browsers will run."
31
- required: false
32
- type: string
33
- ignore_test_status:
34
- description: "If true, ignore test success or failure, never set the commit status, and always upload screenshots."
35
- required: false
36
- type: boolean
37
- schedule:
38
- # Runs every night at 2am PST / 10am UTC, testing against the main branch.
39
- - cron: '0 10 * * *'
40
-
41
- # Only one run of this workflow is allowed at a time, since it uses physical
42
- # resources in our lab.
43
- concurrency: selenium-lab
44
-
45
- jobs:
46
- compute-ref:
47
- name: Compute ref
48
- runs-on: ubuntu-latest
49
- outputs:
50
- REF: ${{ steps.compute.outputs.REF }}
51
-
52
- steps:
53
- - name: Compute ref
54
- id: compute
55
- run: |
56
- if [[ "${{ inputs.pr }}" != "" ]]; then
57
- LAB_TEST_REF="refs/pull/${{ inputs.pr }}/head"
58
- else
59
- LAB_TEST_REF="main"
60
- fi
61
- echo "REF=$LAB_TEST_REF" | tee -a $GITHUB_OUTPUT
62
-
63
- # Configure the build matrix based on our grid's YAML config.
64
- # The matrix contents will be computed by this first job and deserialized
65
- # into the second job's config.
66
- matrix-config:
67
- name: Matrix config
68
- needs: compute-ref
69
- runs-on: ubuntu-latest
70
- outputs:
71
- INCLUDE: ${{ steps.configure.outputs.INCLUDE }}
72
-
73
- steps:
74
- - uses: actions/checkout@v3
75
- with:
76
- ref: ${{ needs.compute-ref.outputs.REF }}
77
-
78
- - name: Install dependencies
79
- run: npm ci
80
-
81
- - name: Configure build matrix
82
- id: configure
83
- shell: node {0}
84
- run: |
85
- const fs = require('fs');
86
- const yaml = require(
87
- '${{ github.workspace }}/node_modules/js-yaml/index.js');
88
-
89
- // Convert the input "browser_filter" into a set of strings. Take
90
- // care to filter so that the empty string turns into an empty set.
91
- const browserFilter = new Set( "${{ inputs.browser_filter }}"
92
- .split(/\s+/)
93
- .map(x => x.toLowerCase())
94
- .filter(x => !!x)
95
- );
96
-
97
- const gridBrowserYaml =
98
- fs.readFileSync('build/shaka-lab.yaml', 'utf8');
99
- const gridBrowserMetadata = yaml.load(gridBrowserYaml);
100
-
101
- const include = [];
102
-
103
- for (const name in gridBrowserMetadata) {
104
- if (name == 'vars') {
105
- // Skip variable defs in the YAML file
106
- continue;
107
- }
108
-
109
- // A browser is enabled if it's not disabled and (either the browser
110
- // filter is empty or it contains the browser name).
111
- const enabled = !gridBrowserMetadata[name].disabled &&
112
- (browserFilter.size == 0 ||
113
- browserFilter.has(name.toLowerCase()));
114
-
115
- if (enabled) {
116
- include.push({browser: name});
117
- }
118
- }
119
-
120
- // Output JSON object consumed by the build matrix below.
121
- fs.appendFileSync(
122
- process.env['GITHUB_OUTPUT'],
123
- `INCLUDE=${ JSON.stringify(include) }\n`);
124
-
125
- // Log the output, for the sake of debugging this script.
126
- console.log({include});
127
-
128
- # Build Shaka Player once, then distribute that build to the runners in the
129
- # build matrix. For N runners, runs N times faster (since all the
130
- # self-hosted Selenium jobs are run in containers on one machine).
131
- build-shaka:
132
- name: Pre-build Player
133
- needs: compute-ref
134
- runs-on: ubuntu-latest
135
- steps:
136
- - uses: actions/checkout@v3
137
- with:
138
- ref: ${{ needs.compute-ref.outputs.REF }}
139
-
140
- - name: Set commit status to pending
141
- if: ${{ inputs.ignore_test_status == false }}
142
- uses: ./.github/workflows/custom-actions/set-commit-status
143
- with:
144
- context: Selenium / Build
145
- state: pending
146
- token: ${{ secrets.GITHUB_TOKEN }}
147
-
148
- - name: Build Player
149
- run: python3 build/all.py
150
-
151
- - name: Preprocess with Babel
152
- run: |
153
- # Run the test preprocessor without running the actual tests.
154
- # This lets us cache Babel's output and run it only once.
155
- # Ignore the exit code, since you get an error code if the filter
156
- # excludes all tests.
157
- ./build/test.py \
158
- --use-xvfb --browsers Chrome \
159
- --filter ThisFilterMatchesNoTests || true
160
-
161
- - name: Cache dependencies
162
- uses: actions/cache@v3
163
- id: npm-cache
164
- with:
165
- path: node_modules/
166
- key: node-${{ hashFiles('package-lock.json') }}
167
-
168
- - name: Cache Babel output
169
- uses: actions/cache@v3
170
- id: babel-cache
171
- with:
172
- path: .babel-cache
173
- key: babel-${{ hashFiles('*.js', 'demo/**.js', 'lib/**.js', 'ui/**.js', 'test/**.js', 'third_party/**.js') }}
174
-
175
- - name: Store Player build
176
- uses: actions/upload-artifact@v3
177
- with:
178
- name: shaka-player
179
- path: dist/
180
- retention-days: 1
181
-
182
- - name: Report final commit status
183
- # Will run on success or failure, but not if the workflow is cancelled
184
- # or if we were asked to ignore the test status.
185
- if: ${{ (success() || failure()) && inputs.ignore_test_status == false }}
186
- uses: ./.github/workflows/custom-actions/set-commit-status
187
- with:
188
- context: Selenium / Build
189
- state: ${{ job.status }}
190
- token: ${{ secrets.GITHUB_TOKEN }}
191
-
192
- lab-tests:
193
- # This is a self-hosted runner in a Docker container, with access to our
194
- # lab's Selenium grid on port 4444.
195
- runs-on: self-hosted-selenium
196
- needs: [compute-ref, build-shaka, matrix-config]
197
- strategy:
198
- fail-fast: false
199
- matrix:
200
- include: ${{ fromJSON(needs.matrix-config.outputs.INCLUDE) }}
201
- name: ${{ matrix.browser }}
202
-
203
- steps:
204
- - uses: actions/checkout@v3
205
- with:
206
- ref: ${{ needs.compute-ref.outputs.REF }}
207
-
208
- - name: Set commit status to pending
209
- if: ${{ inputs.ignore_test_status == false }}
210
- uses: ./.github/workflows/custom-actions/set-commit-status
211
- with:
212
- context: Selenium / ${{ matrix.browser }}
213
- state: pending
214
- token: ${{ secrets.GITHUB_TOKEN }}
215
-
216
- - uses: actions/setup-node@v3
217
- with:
218
- node-version: 16
219
- registry-url: 'https://registry.npmjs.org'
220
-
221
- # The Docker image for this self-hosted runner doesn't contain java.
222
- - uses: actions/setup-java@v3
223
- with:
224
- distribution: zulu
225
- java-version: 11
226
-
227
- - name: Cache dependencies
228
- uses: actions/cache@v3
229
- id: npm-cache
230
- with:
231
- path: node_modules/
232
- key: node-${{ hashFiles('package-lock.json') }}
233
- fail-on-cache-miss: true # Cached by the build-shaka job above
234
- enableCrossOsArchive: true # Share archives from Linux to Windows
235
-
236
- - name: Cache Babel output
237
- uses: actions/cache@v3
238
- id: babel-cache
239
- with:
240
- path: .babel-cache
241
- key: babel-${{ hashFiles('*.js', 'demo/**.js', 'lib/**.js', 'ui/**.js', 'test/**.js', 'third_party/**.js') }}
242
- fail-on-cache-miss: true # Cached by the build-shaka job above
243
- enableCrossOsArchive: true # Share archives from Linux to Windows
244
-
245
- - name: Install dependencies
246
- if: steps.npm-cache.outputs.cache-hit != 'true'
247
- run: npm ci
248
-
249
- # Instead of building Shaka N times, build it once and fetch the build to
250
- # each Selenium runner in the matrix.
251
- - name: Fetch Player build
252
- uses: actions/download-artifact@v3
253
- with:
254
- name: shaka-player
255
- path: dist/
256
-
257
- # Run tests on the Selenium grid in our lab. This uses a private
258
- # hostname and TLS cert to get EME tests working on all platforms
259
- # (since EME only works on https or localhost). The variable
260
- # ALLOCATED_PORT must be defined by the self-hosted runner, and mapped
261
- # from the host to the container.
262
- - name: Test Player
263
- run: |
264
- # Use of an array keeps elements intact, and allows an element to
265
- # contain spaces without being expanded into multiple arguments in a
266
- # shell command.
267
- extra_flags=()
268
-
269
- # Generate a coverage report from uncompiled code on ChromeLinux.
270
- # It should be the uncompiled build, or else we won't execute any
271
- # coverage instrumentation on full-stack player integration tests.
272
- if [[ "${{ matrix.browser }}" == "Edge" ]]; then
273
- extra_flags+=(--html-coverage-report --uncompiled)
274
- fi
275
-
276
- if [[ "${{ inputs.test_filter }}" != "" ]]; then
277
- echo "Adding filter: ${{ inputs.test_filter }}"
278
- extra_flags+=(--filter "${{ inputs.test_filter }}")
279
- fi
280
-
281
- # Do not automatically fail when a command fails. This allows us to
282
- # implement the ignore_test_status input by capturing the exit code
283
- # and examining it.
284
- set +e
285
- # Run the tests with any extra flags.
286
- python3 build/test.py \
287
- --no-build \
288
- --reporters spec --spec-hide-passed \
289
- --tls-key /etc/letsencrypt/live/karma.shakalab.rocks/privkey.pem \
290
- --tls-cert /etc/letsencrypt/live/karma.shakalab.rocks/fullchain.pem \
291
- --hostname karma.shakalab.rocks \
292
- --port $ALLOCATED_PORT \
293
- --grid-config build/shaka-lab.yaml \
294
- --grid-address selenium-grid.lab.shaka:4444 \
295
- --browsers ${{ matrix.browser }} \
296
- "${extra_flags[@]}"
297
- # Capture the test exit code immediately after running the tests.
298
- # There cannot be any other command between test.py and here.
299
- exit_code=$?
300
-
301
- # If ignoring test status, treat this as an exit code of 0 (success).
302
- if [[ "${{ inputs.ignore_test_status }}" == "true" ]]; then
303
- exit_code=0
304
- fi
305
-
306
- # Report the captured (and possibly overridden) exit status.
307
- exit $exit_code
308
-
309
- - name: Find coverage report (Edge only)
310
- id: coverage
311
- # Run even if an earlier step fails, but only on Edge.
312
- if: ${{ always() && matrix.browser == 'Edge' }}
313
- shell: bash
314
- run: |
315
- # Find the path to the coverage report specifically for Chrome on
316
- # Linux. It includes the exact browser version in the path, so it
317
- # will vary. Having a single path will make the artifact zip
318
- # simpler, whereas using a wildcard in the upload step will result
319
- # in a zip file with internal directories.
320
- coverage_report="$( (ls coverage/Edge*/coverage.json || true) | head -1 )"
321
-
322
- # Show what's there, for debugging purposes.
323
- ls -l coverage/
324
-
325
- if [ -f "$coverage_report" ]; then
326
- echo "Found coverage report: $coverage_report"
327
- echo "coverage_report=$coverage_report" >> $GITHUB_OUTPUT
328
- else
329
- echo "Could not locate coverage report!"
330
- exit 1
331
- fi
332
-
333
- - name: Upload coverage report (Edge only)
334
- uses: actions/upload-artifact@v3
335
- # If there's a coverage report, upload it, even if a previous step
336
- # failed.
337
- if: ${{ always() && steps.coverage.outputs.coverage_report }}
338
- with:
339
- # This will create a download called coverage.zip containing only
340
- # coverage.json.
341
- path: ${{ steps.coverage.outputs.coverage_report }}
342
- name: coverage
343
- # Since we've already filtered this step for instances where there is
344
- # an environment variable set for this, the file should definitely be
345
- # there.
346
- if-no-files-found: error
347
-
348
- # Upload new screenshots and diffs on failure; ignore if missing
349
- - name: Upload screenshots
350
- uses: actions/upload-artifact@v3
351
- if: ${{ failure() || inputs.ignore_test_status }}
352
- with:
353
- # In this workflow, "browser" is the selenium node name, which can
354
- # contain both browser and OS, such as "ChromeLinux".
355
- name: screenshots-${{ matrix.browser }}
356
- path: |
357
- test/test/assets/screenshots/*/*.png-new
358
- test/test/assets/screenshots/*/*.png-diff
359
- if-no-files-found: ignore
360
- retention-days: 5
361
-
362
- - name: Report final commit status
363
- # Will run on success or failure, but not if the workflow is cancelled
364
- # or if we were asked to ignore the test status.
365
- if: ${{ (success() || failure()) && inputs.ignore_test_status == false }}
366
- uses: ./.github/workflows/custom-actions/set-commit-status
367
- with:
368
- context: Selenium / ${{ matrix.browser }}
369
- state: ${{ job.status }}
370
- token: ${{ secrets.GITHUB_TOKEN }}
@@ -1,27 +0,0 @@
1
- # Copyright 2022 Google LLC
2
- #
3
- # Licensed under the Apache License, Version 2.0 (the "License");
4
- # you may not use this file except in compliance with the License.
5
- # You may obtain a copy of the License at
6
- #
7
- # http://www.apache.org/licenses/LICENSE-2.0
8
- #
9
- # Unless required by applicable law or agreed to in writing, software
10
- # distributed under the License is distributed on an "AS IS" BASIS,
11
- # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
- # See the License for the specific language governing permissions and
13
- # limitations under the License.
14
-
15
- # The help command implementation.
16
- # Assumes that lib.sh has been loaded and all required variables are set.
17
-
18
- # Using single quotes to avoid executing the things in backticks, which are
19
- # really markdown.
20
- (
21
- echo 'I honor the following commands from anyone:'
22
- echo ' - `@shaka-bot help`: Show this help message'
23
- echo ''
24
- echo 'I honor the following commands from maintainers only:'
25
- echo ' - `@shaka-bot test`: Start lab tests on all devices'
26
- echo ' - `@shaka-bot test ce`: Start lab tests on CE devices only (no desktop browsers)'
27
- ) | reply_from_pipe