shaka-player 3.1.0 → 3.1.4

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 (181) hide show
  1. package/AUTHORS +8 -2
  2. package/CHANGELOG.md +209 -0
  3. package/CONTRIBUTORS +10 -3
  4. package/README.md +3 -0
  5. package/build/apps.py +2 -2
  6. package/build/check.py +2 -2
  7. package/build/conformance.textproto +0 -9
  8. package/build/generateExterns.js +1 -1
  9. package/build/misspellings.txt +1 -0
  10. package/build/shakaBuildHelpers.py +6 -5
  11. package/build/subprocessWindowsPatch.py +103 -0
  12. package/demo/common/asset.js +11 -0
  13. package/demo/common/assets.js +1 -1
  14. package/demo/common/message_ids.js +5 -0
  15. package/demo/config.js +2 -1
  16. package/demo/custom.js +84 -3
  17. package/demo/demo.less +13 -1
  18. package/demo/demo_utils.js +1 -0
  19. package/demo/input.js +31 -12
  20. package/demo/input_container.js +24 -1
  21. package/demo/locales/en.json +6 -1
  22. package/demo/locales/source.json +20 -0
  23. package/demo/main.js +5 -1
  24. package/dist/controls.css +2 -2
  25. package/dist/controls.css.map +1 -1
  26. package/dist/demo.compiled.debug.js +99 -91
  27. package/dist/demo.compiled.debug.map +3 -3
  28. package/dist/demo.compiled.js +99 -91
  29. package/dist/demo.compiled.map +3 -3
  30. package/dist/demo.css +1 -1
  31. package/dist/demo.css.map +1 -1
  32. package/dist/deps.js +9 -9
  33. package/dist/locales.js +36 -34
  34. package/dist/receiver.compiled.debug.js +74 -70
  35. package/dist/receiver.compiled.debug.map +3 -3
  36. package/dist/receiver.compiled.js +74 -70
  37. package/dist/receiver.compiled.map +3 -3
  38. package/dist/shaka-player.compiled.d.ts +165 -9
  39. package/dist/shaka-player.compiled.debug.d.ts +165 -9
  40. package/dist/shaka-player.compiled.debug.externs.js +179 -11
  41. package/dist/shaka-player.compiled.debug.js +367 -339
  42. package/dist/shaka-player.compiled.debug.map +4 -4
  43. package/dist/shaka-player.compiled.externs.js +179 -11
  44. package/dist/shaka-player.compiled.js +818 -807
  45. package/dist/shaka-player.compiled.map +4 -4
  46. package/dist/shaka-player.ui.d.ts +165 -9
  47. package/dist/shaka-player.ui.debug.d.ts +165 -9
  48. package/dist/shaka-player.ui.debug.externs.js +181 -13
  49. package/dist/shaka-player.ui.debug.js +459 -429
  50. package/dist/shaka-player.ui.debug.map +4 -4
  51. package/dist/shaka-player.ui.externs.js +181 -13
  52. package/dist/shaka-player.ui.js +973 -961
  53. package/dist/shaka-player.ui.map +4 -4
  54. package/docs/tutorials/fairplay.md +1 -1
  55. package/docs/tutorials/faq.md +25 -0
  56. package/docs/tutorials/index.json +2 -2
  57. package/docs/tutorials/upgrade-v3.md +38 -0
  58. package/docs/tutorials/upgrade.md +3 -3
  59. package/externs/ima.js +4 -0
  60. package/externs/media_capabilities.js +16 -0
  61. package/externs/shaka/ads.js +2 -0
  62. package/externs/shaka/net.js +2 -2
  63. package/externs/shaka/player.js +6 -0
  64. package/karma.conf.js +1 -0
  65. package/lib/abr/simple_abr_manager.js +1 -1
  66. package/lib/ads/ad_manager.js +29 -11
  67. package/lib/ads/client_side_ad_manager.js +76 -86
  68. package/lib/ads/server_side_ad_manager.js +26 -11
  69. package/lib/cast/cast_proxy.js +3 -2
  70. package/lib/cast/cast_receiver.js +2 -1
  71. package/lib/cast/cast_sender.js +2 -2
  72. package/lib/cea/sei_processor.js +24 -17
  73. package/lib/dash/dash_parser.js +107 -4
  74. package/lib/dash/segment_list.js +1 -1
  75. package/lib/dash/segment_template.js +45 -15
  76. package/lib/dependencies/all.js +15 -15
  77. package/lib/hls/hls_parser.js +46 -18
  78. package/lib/media/closed_caption_parser.js +3 -1
  79. package/lib/media/content_workarounds.js +18 -0
  80. package/lib/media/drm_engine.js +20 -1
  81. package/lib/media/gap_jumping_controller.js +8 -4
  82. package/lib/media/media_source_engine.js +1 -2
  83. package/lib/media/playhead.js +1 -1
  84. package/lib/media/presentation_timeline.js +3 -1
  85. package/lib/media/segment_index.js +38 -12
  86. package/lib/media/segment_reference.js +8 -0
  87. package/lib/media/streaming_engine.js +30 -21
  88. package/lib/net/http_fetch_plugin.js +2 -2
  89. package/lib/net/networking_engine.js +3 -2
  90. package/lib/offline/storage.js +4 -0
  91. package/lib/player.js +113 -56
  92. package/lib/polyfill/encryption_scheme.js +2 -0
  93. package/lib/polyfill/fullscreen.js +2 -0
  94. package/lib/polyfill/mathround.js +2 -0
  95. package/lib/polyfill/media_capabilities.js +62 -23
  96. package/lib/polyfill/mediasource.js +8 -0
  97. package/lib/polyfill/orientation.js +3 -1
  98. package/lib/polyfill/patchedmediakeys_apple.js +6 -4
  99. package/lib/polyfill/patchedmediakeys_ms.js +6 -4
  100. package/lib/polyfill/patchedmediakeys_nop.js +2 -0
  101. package/lib/polyfill/patchedmediakeys_webkit.js +6 -4
  102. package/lib/polyfill/pip_webkit.js +2 -0
  103. package/lib/polyfill/storage_estimate.js +2 -0
  104. package/lib/polyfill/video_play_promise.js +2 -0
  105. package/lib/polyfill/videoplaybackquality.js +2 -0
  106. package/lib/polyfill/vttcue.js +2 -0
  107. package/lib/text/cue.js +11 -0
  108. package/lib/text/mp4_ttml_parser.js +3 -0
  109. package/lib/text/text_engine.js +14 -2
  110. package/lib/text/ttml_text_parser.js +52 -30
  111. package/lib/text/ui_text_displayer.js +255 -82
  112. package/lib/text/vtt_text_parser.js +4 -2
  113. package/lib/util/error.js +1 -4
  114. package/lib/util/fake_event.js +53 -7
  115. package/lib/util/mime_utils.js +33 -0
  116. package/lib/util/mp4_box_parsers.js +1 -1
  117. package/lib/util/mp4_parser.js +14 -0
  118. package/lib/util/networking.js +1 -1
  119. package/lib/util/periods.js +132 -37
  120. package/lib/util/platform.js +13 -1
  121. package/lib/util/stream_utils.js +46 -7
  122. package/package.json +3 -3
  123. package/test/cast/cast_proxy_unit.js +12 -6
  124. package/test/cast/cast_receiver_integration.js +1 -1
  125. package/test/cast/cast_utils_unit.js +1 -1
  126. package/test/cea/mp4_cea_parser_unit.js +26 -0
  127. package/test/dash/dash_parser_live_unit.js +1 -0
  128. package/test/dash/dash_parser_manifest_unit.js +187 -1
  129. package/test/dash/dash_parser_segment_template_unit.js +3 -3
  130. package/test/demo/demo_unit.js +0 -1
  131. package/test/hls/hls_parser_unit.js +45 -1
  132. package/test/media/closed_caption_parser_unit.js +20 -0
  133. package/test/media/drm_engine_unit.js +59 -3
  134. package/test/media/playhead_unit.js +27 -1
  135. package/test/media/presentation_timeline_unit.js +19 -0
  136. package/test/media/segment_index_unit.js +76 -3
  137. package/test/media/streaming_engine_unit.js +3 -3
  138. package/test/player_integration.js +38 -0
  139. package/test/player_unit.js +125 -6
  140. package/test/test/assets/3675/chunk-stream0-00001.m4s +0 -0
  141. package/test/test/assets/3675/chunk-stream0-00002.m4s +0 -0
  142. package/test/test/assets/3675/chunk-stream0-00003.m4s +0 -0
  143. package/test/test/assets/3675/chunk-stream0-00004.m4s +0 -0
  144. package/test/test/assets/3675/chunk-stream0-00005.m4s +0 -0
  145. package/test/test/assets/3675/chunk-stream0-00006.m4s +0 -0
  146. package/test/test/assets/3675/chunk-stream0-00007.m4s +0 -0
  147. package/test/test/assets/3675/dash_0.mpd +30 -0
  148. package/test/test/assets/3675/dash_1.mpd +30 -0
  149. package/test/test/assets/3675/dash_2.mpd +30 -0
  150. package/test/test/assets/3675/dash_3.mpd +30 -0
  151. package/test/test/assets/3675/dash_4.mpd +30 -0
  152. package/test/test/assets/3675/dash_5.mpd +26 -0
  153. package/test/test/assets/3675/init-stream0.m4s +0 -0
  154. package/test/test/assets/empty_caption_video_init.mp4 +0 -0
  155. package/test/test/assets/empty_caption_video_segment.mp4 +0 -0
  156. package/test/test/util/fake_ad_manager.js +4 -1
  157. package/test/test/util/simple_fakes.js +5 -3
  158. package/test/test/util/waiter.js +36 -2
  159. package/test/text/ttml_text_parser_unit.js +55 -0
  160. package/test/text/ui_text_displayer_unit.js +95 -18
  161. package/test/text/vtt_text_parser_unit.js +17 -1
  162. package/test/ui/localization_unit.js +15 -14
  163. package/test/ui/text_displayer_layout_unit.js +52 -1
  164. package/test/ui/ui_unit.js +4 -0
  165. package/test/util/mp4_box_parsers_unit.js +28 -0
  166. package/test/util/periods_unit.js +190 -2
  167. package/test/util/stream_utils_unit.js +56 -5
  168. package/ui/airplay_button.js +5 -0
  169. package/ui/big_play_button.js +10 -0
  170. package/ui/cast_button.js +2 -3
  171. package/ui/controls.js +9 -7
  172. package/ui/less/containers.less +10 -5
  173. package/ui/locales/en.json +1 -0
  174. package/ui/locales/ru.json +6 -6
  175. package/ui/locales/source.json +4 -0
  176. package/ui/localization.js +28 -51
  177. package/ui/pip_button.js +2 -3
  178. package/ui/play_button.js +10 -10
  179. package/ui/small_play_button.js +12 -0
  180. package/ui/ui.js +1 -1
  181. package/docs/tutorials/upgrade-v2-4.md +0 -481
package/AUTHORS CHANGED
@@ -24,8 +24,11 @@ Benjamin Wallberg <me@bwallberg.com>
24
24
  Bonnier Broadcasting <*@bonnierbroadcasting.com>
25
25
  Bryan Huh <bhh1988@gmail.com>
26
26
  Code It <*@code-it.fr>
27
+ Charter Communications Inc <*@charter.com>
27
28
  Damien Deis <developer.deis@gmail.com>
28
29
  Dany L'Hébreux <danylhebreux@gmail.com>
30
+ Dl Dador <dldador@gmail.com>
31
+ Enson Choy <enson.choy@harmonicinc.com>
29
32
  Esteban Dosztal <edosztal@gmail.com>
30
33
  Fadomire <fadomire@gmail.com>
31
34
  Google Inc. <*@google.com>
@@ -48,16 +51,20 @@ Nick Desaulniers <nick@mozilla.com>
48
51
  Oskar Arvidsson <oskar@irock.se>
49
52
  Patrick Cruikshank <patrick.cruikshank@gmail.com>
50
53
  Patrick Kunka <patrick@kunkalabs.com>
54
+ Paul Jordaan <pdjordaan@gmail.com>
51
55
  Percy Tse <percy.tse@gmail.com>
52
56
  Peter Nycander <peter.nycander@gmail.com>
53
57
  Philo Inc. <*@philo.com>
58
+ Prakash <duggaraju@gmail.com>
54
59
  Robert Colantuoni <rgc@colantuoni.com>
60
+ Robert Galluccio <robertnw5@gmail.com>
55
61
  Roi Lipman <roilipman@gmail.com>
56
62
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
57
63
  Rostislav Hejduk <Ross-cz@users.noreply.github.com>
58
64
  SameGoal Inc. <*@samegoal.com>
59
65
  Sanborn Hilland <sanbornh@rogers.com>
60
66
  Sander Saares <sander@saares.eu>
67
+ Swank Motion Pictures Inc. <*@swankmp.com>
61
68
  TalkTalk Plc <*@talktalkplc.com>
62
69
  Tatsiana Gelahova <tatsiana.gelahova@gmail.com>
63
70
  Tomas Tichy <mr.tichyt@gmail.com>
@@ -66,6 +73,5 @@ Toshihiro Suzuki <t.suzuki326@gmail.com>
66
73
  uStudio Inc. <*@ustudio.com>
67
74
  Verizon Digital Media Services <*@verizondigitalmedia.com>
68
75
  Vincent Valot <valot.vince@gmail.com>
69
- Prakash <duggaraju@gmail.com>
70
-
76
+ Wayne Morgan <wayne.morgan.dev@gmail.com>
71
77
 
package/CHANGELOG.md CHANGED
@@ -1,3 +1,212 @@
1
+ ## 3.1.4 (2022-01-06)
2
+
3
+ Bugfixes:
4
+ - Allow comments in the TTML parser
5
+ - https://github.com/google/shaka-player/issues/3766
6
+ - https://github.com/google/shaka-player/pull/3827
7
+ - Fix HDR signalling via essential or supplemental property
8
+ - https://github.com/google/shaka-player/issues/3726
9
+ - https://github.com/google/shaka-player/pull/3727
10
+ - Fix MediaCapabilities polyfill on Playstation 5
11
+ - https://github.com/google/shaka-player/issues/3582
12
+ - https://github.com/google/shaka-player/pull/3808
13
+ - Add DASH MIME type mapping for src= playback
14
+ - https://github.com/google/shaka-player/pull/3805
15
+ - Fix captions not working after a period transition on live DASH streams
16
+ - https://github.com/google/shaka-player/issues/3783
17
+ - https://github.com/google/shaka-player/pull/3801
18
+ - Fix timestamp offset of CEA-608 cues
19
+ - https://github.com/google/shaka-player/issues/3782
20
+ - Force caption update when removing cues
21
+ - Fixes parsing of HLS 'DEFAULT' attribute
22
+ - https://github.com/google/shaka-player/issues/3769
23
+ - https://github.com/google/shaka-player/pull/3771
24
+ - support stpp.ttml codec in Mp4TtmlParser
25
+ - https://github.com/google/shaka-player/pull/3754
26
+ - Fix Russian translation
27
+ - https://github.com/google/shaka-player/pull/3751
28
+ - Fix HLS VOD duration
29
+ - https://github.com/google/shaka-player/issues/3733
30
+ - Query HDR transfer function
31
+ - https://github.com/google/shaka-player/issues/3729
32
+ - https://github.com/google/shaka-player/pull/3730
33
+ - Fix styling of UI text cues
34
+ - https://github.com/google/shaka-player/issues/3521
35
+ - https://github.com/google/shaka-player/issues/3600
36
+ - https://github.com/google/shaka-player/issues/3713
37
+ - Fix seek range issues on transition from live to VOD
38
+ - https://github.com/google/shaka-player/issues/3675
39
+ - Enforce string-format of event data keys.
40
+ - https://github.com/google/shaka-player/issues/3710
41
+ - Fix vp09 playback on webOS
42
+ - https://github.com/google/shaka-player/pull/3566
43
+ - Dedupe DRM init data
44
+ - https://github.com/google/shaka-player/pull/3695
45
+ - Failover in geo-redundant streams
46
+ - https://github.com/google/shaka-player/pull/3587
47
+
48
+ Demo App:
49
+ - Fix 'Tears of Steel (live, DASH, Server Side ads)'
50
+ - https://github.com/google/shaka-player/pull/3758
51
+
52
+ Docs:
53
+ - Fix typo in Fairplay tutorial
54
+ - https://github.com/google/shaka-player/pull/3714
55
+
56
+
57
+ ## 3.1.3 (2021-10-13)
58
+
59
+ Bugfixes:
60
+ - Work around override of MediaCapabilities polyfill in Apple browsers
61
+ - https://github.com/google/shaka-player/issues/3530
62
+ - https://github.com/google/shaka-player/pull/3668
63
+ - Add support to file type in MediaCapabilities implementation
64
+ - https://github.com/google/shaka-player/pull/3570
65
+ - Fix video poster when autoplay is disabled
66
+ - https://github.com/google/shaka-player/pull/3645
67
+ - Fix tracking of active variant track in live streams
68
+ - Fixes updating of nested cues
69
+ - https://github.com/google/shaka-player/issues/3524
70
+ - https://github.com/google/shaka-player/issues/3643
71
+ - Fix ttml erroneously dismissing cues
72
+ - https://github.com/google/shaka-player/issues/3643
73
+ - Fix control panel alignment in UI
74
+ - https://github.com/google/shaka-player/pull/3650
75
+ - Export missing polyfill install methods
76
+ - https://github.com/google/shaka-player/pull/3660
77
+ - Dispose of ad manager on player detach
78
+ - https://github.com/google/shaka-player/pull/3665
79
+ - Add ResizeObserver to CS ad manager
80
+ - https://github.com/google/shaka-player/pull/3652
81
+ - Avoid seeking on src when start time is 0
82
+ - https://github.com/google/shaka-player/issues/3518
83
+ - https://github.com/google/shaka-player/pull/3644
84
+ - Tolerate misaligned TS files
85
+ - https://github.com/google/shaka-player/issues/3580
86
+ - Fix stopping of Server Side Ad manager
87
+ - https://github.com/google/shaka-player/pull/3611
88
+ - Fix DRM workaround for Tizen and Xbox with ac-3 boxes
89
+ - https://github.com/google/shaka-player/issues/3589
90
+ - https://github.com/google/shaka-player/pull/3631
91
+ - Fix DRM workaround for Tizen and Xbox with avc3 boxes
92
+ - https://github.com/google/shaka-player/pull/3625
93
+ - Fix `BUFFER_READ_OUT_OF_BOUNDS` error when CEA caption packets are empty
94
+ - https://github.com/google/shaka-player/issues/3608
95
+ - https://github.com/google/shaka-player/pull/3609
96
+ - Fix error when un-storing DRM asset
97
+ - https://github.com/google/shaka-player/issues/3534
98
+ - Fix CC parsing of EPB and v1 TKHD boxes
99
+ - https://github.com/google/shaka-player/issues/3502
100
+ - https://github.com/google/shaka-player/pull/3610
101
+ - Always polyfill MediaCapabilities for Apple browsers
102
+ - https://github.com/google/shaka-player/pull/3588
103
+ - Add Support to iOS 12 in MediaCapabilities polyfill
104
+ - https://github.com/google/shaka-player/pull/3573
105
+ - Display captions with forward slashes
106
+ - https://github.com/google/shaka-player/issues/3555
107
+ - https://github.com/google/shaka-player/pull/3556
108
+ - Add support to file type in MediaCapabilities polyfill
109
+ - https://github.com/google/shaka-player/pull/3569
110
+ - Use "undetermined" for missing CC language
111
+ - Exit PiP when destroying UI
112
+ - https://github.com/google/shaka-player/issues/3553
113
+
114
+ Docs:
115
+ - Add FAQ entry for common Vue problem
116
+ - https://github.com/google/shaka-player/issues/3155
117
+
118
+
119
+ ## 3.1.2 (2021-07-14)
120
+
121
+ Bugfixes:
122
+ - Fix choosing tracks from streaming event
123
+ - https://github.com/google/shaka-player/issues/3448
124
+ - https://github.com/google/shaka-player/pull/3459
125
+ - Fix multiperiod without consistent thumbnails
126
+ - https://github.com/google/shaka-player/issues/3383
127
+ - Fix failure with multiple thumbnails per period
128
+ - https://github.com/google/shaka-player/issues/3383
129
+ - Update Play icon after seeking from end
130
+ - https://github.com/google/shaka-player/pull/3515
131
+ - Reset forced subs between loads
132
+ - Fix thumbnail position calculation
133
+ - https://github.com/google/shaka-player/issues/3511
134
+ - https://github.com/google/shaka-player/pull/3516
135
+ - Fix thumbnail duration, expose start time and duration
136
+ - https://github.com/google/shaka-player/pull/3517
137
+ - Fix enforcement of cue alignment styles
138
+ - https://github.com/google/shaka-player/issues/3379
139
+ - Fix DASH transition from dynamic to static
140
+ - https://github.com/google/shaka-player/pull/3497
141
+ - Fix ARIA label on replay button
142
+ - https://github.com/google/shaka-player/pull/3513
143
+ - Fix audio language switching while using AirPlay
144
+ - https://github.com/google/shaka-player/issues/3125
145
+ - https://github.com/google/shaka-player/pull/3472
146
+ - Show captions with rapid seek when ignoreTextStreamFailures is true
147
+ - https://github.com/google/shaka-player/pull/3476
148
+ - Fix clearing buffer when requested for already-selected variant
149
+ - https://github.com/google/shaka-player/pull/3477
150
+ - Fix hung playback on rapid seek
151
+ - https://github.com/google/shaka-player/pull/3479
152
+ - Don't show AirPlay button if unavailable
153
+ - https://github.com/google/shaka-player/issues/3471
154
+ - Fix bogus debug logs
155
+
156
+ Docs:
157
+ - Update upgrade guides
158
+ - https://github.com/google/shaka-player/issues/3487
159
+
160
+
161
+ ## 3.1.1 (2021-06-17)
162
+
163
+ Bugfixes:
164
+ - Fix buffering due to re-fetch in multi-period DASH
165
+ - https://github.com/google/shaka-player/pull/3419
166
+ - https://github.com/google/shaka-player/issues/3354
167
+ - Prioritize AVERAGE-BANDWIDTH over BANDWIDTH in HLS
168
+ - https://github.com/google/shaka-player/pull/3428
169
+ - Fix EC-3 box support in DRM workaround on smart TVs
170
+ - https://github.com/google/shaka-player/pull/3427
171
+ - Fix exception in UI on devices that do not support fullscreen
172
+ - https://github.com/google/shaka-player/issues/3441
173
+ - Fix caption positioning and sizing when the container resizes
174
+ - https://github.com/google/shaka-player/pull/3426
175
+ - https://github.com/google/shaka-player/pull/3425
176
+ - https://github.com/google/shaka-player/pull/3414
177
+ - Fix exceptions thrown in content with trick-mode tracks
178
+ - https://github.com/google/shaka-player/issues/3423
179
+ - Filter unsupported H.264 streams in Xbox
180
+ - https://github.com/google/shaka-player/pull/3411
181
+ - Fix out-of-bounds exception in LL-DASH
182
+ - https://github.com/google/shaka-player/issues/3402
183
+ - https://github.com/google/shaka-player/pull/3403
184
+ - Fix failures and gaps in LL-DASH
185
+ - https://github.com/google/shaka-player/issues/3404
186
+ - https://github.com/google/shaka-player/pull/3405
187
+ - Allow muxjs to be loaded after Shaka
188
+ - https://github.com/google/shaka-player/issues/3407
189
+ - Choose the configured preferred text role at start
190
+ - https://github.com/google/shaka-player/pull/3399
191
+ - Fix STORAGE_LIMIT_REACHED error masked by DOWNLOAD_SIZE_CALLBACK_ERROR
192
+ - https://github.com/google/shaka-player/pull/3396
193
+ - Fix "details" field in shaka-ui-load-failed event
194
+ - https://github.com/google/shaka-player/issues/3388
195
+ - Ignore network changes if ABR is disabled
196
+ - https://github.com/google/shaka-player/pull/3387
197
+ - Fix ClearKey+WebM+src= playback failure
198
+ - https://github.com/google/shaka-player/issues/3366
199
+
200
+ Docs:
201
+ - Document disabling Range header requests in HLS
202
+ - https://github.com/google/shaka-player/pull/3442
203
+ - Add Angular integration link
204
+ - https://github.com/google/shaka-player/pull/3409
205
+
206
+ Demo App:
207
+ - Add MIME type and extra config to custom assets
208
+
209
+
1
210
  ## 3.1.0 (2021-04-29)
2
211
 
3
212
  New Features:
package/CONTRIBUTORS CHANGED
@@ -23,6 +23,8 @@
23
23
  # Please keep the list sorted.
24
24
 
25
25
  Aaron Vaage <vaage@google.com>
26
+ Adrián Gómez Llorente <adgllorente@gmail.com>
27
+ Aidan Ridley <aidan.ridley@charter.com>
26
28
  Alex Jones <alexedwardjones@gmail.com>
27
29
  Alvaro Velad Galvan <alvaro.velad@mirada.tv>
28
30
  Amila Sampath <lucksy@gmail.com>
@@ -32,14 +34,17 @@ Ashutosh Kumar Mukhiya <ashukm4@gmail.com>
32
34
  Benjamin Wallberg <me@bwallberg.com>
33
35
  Benjamin Wallberg <benjamin.wallberg@bonnierbroadcasting.com>
34
36
  Boris Cupac <borisrt2309@gmail.com>
37
+ Brad Nadler <bnadler@swankmp.com>
35
38
  Bryan Huh <bhh1988@gmail.com>
36
39
  Chad Assareh <assareh@google.com>
37
40
  Chris Fillmore <fillmore.chris@gmail.com>
38
41
  Costel Madalin Grecu <madalin.grecu@adswizz.com>
39
42
  Damien Deis <developer.deis@gmail.com>
40
43
  Dany L'Hébreux <danylhebreux@gmail.com>
44
+ Dl Dador <dldador@gmail.com>
41
45
  Donato Borrello <donato@jwplayer.com>
42
46
  Duc Pham <duc.pham@edgeware.tv>
47
+ Enson Choy <enson.choy@harmonicinc.com>
43
48
  Esteban Dosztal <edosztal@gmail.com>
44
49
  Fadomire <fadomire@gmail.com>
45
50
  François Beaufort <fbeaufort@google.com>
@@ -74,9 +79,12 @@ Niklas Korz <nk@alugha.com>
74
79
  Oskar Arvidsson <oskar@irock.se>
75
80
  Patrick Cruikshank <patrick.cruikshank@gmail.com>
76
81
  Patrick Kunka <patrick@kunkalabs.com>
82
+ Paul Jordaan <pdjordaan@gmail.com>
77
83
  Percy Tse <percy.tse@gmail.com>
78
84
  Peter Nycander <peter.nycander@gmail.com>
85
+ Prakash Duggaraju <duggaraju@gmail.com>
79
86
  Robert Colantuoni <rgc@colantuoni.com>
87
+ Robert Galluccio <robertnw5@gmail.com>
80
88
  Rohit Makasana <rohitbm@google.com>
81
89
  Roi Lipman <roilipman@gmail.com>
82
90
  Roksolana Ivanyshyn <roksolana.ivanyshyn.pub@gmail.com>
@@ -101,6 +109,5 @@ Toshihiro Suzuki <t.suzuki326@gmail.com>
101
109
  Vasanth Polipelli <vasanthap@google.com>
102
110
  Vignesh Venkatasubramanian <vigneshv@google.com>
103
111
  Vincent Valot <valot.vince@gmail.com>
104
- Yohann Connell <robinconnell@google.com>
105
- Adrián Gómez Llorente <adgllorente@gmail.com>
106
- Prakash Duggaraju <duggaraju@gmail.com>
112
+ Wayne Morgan <wayne.morgan.dev@gmail.com>
113
+ Yohann Connell <robinconnell@google.com>
package/README.md CHANGED
@@ -267,5 +267,8 @@ Shaka + Nuxt.js integration:
267
267
  Shaka + video.js integration:
268
268
  - https://github.com/davidjamesherzog/videojs-shaka
269
269
 
270
+ Shaka + Angular integration:
271
+ - https://github.com/PatrickKalkman/shaka-player-angular
272
+
270
273
  If you have published Shaka Integration code/tutorials, please feel free to submit PRs
271
274
  to add them to this list, we will gladly approve!
package/build/apps.py CHANGED
@@ -74,7 +74,7 @@ def compile_demo(force, is_debug):
74
74
  closure_opts += [
75
75
  # Ignore missing goog.require since we assume the whole library is
76
76
  # already included.
77
- '--jscomp_off=missingRequire', '--jscomp_off=strictMissingRequire',
77
+ '--jscomp_off=missingRequire',
78
78
  '-D', 'COMPILED=true',
79
79
  ]
80
80
 
@@ -125,7 +125,7 @@ def compile_receiver(force, is_debug):
125
125
  closure_opts += [
126
126
  # Ignore missing goog.require since we assume the whole library is
127
127
  # already included.
128
- '--jscomp_off=missingRequire', '--jscomp_off=strictMissingRequire',
128
+ '--jscomp_off=missingRequire',
129
129
  '-D', 'COMPILED=true',
130
130
  ]
131
131
 
package/build/check.py CHANGED
@@ -295,8 +295,8 @@ def check_tests(args):
295
295
  # Ignore missing goog.require since we assume the whole library is
296
296
  # already included.
297
297
  closure_opts += [
298
- '--jscomp_off=missingRequire', '--jscomp_off=strictMissingRequire',
299
- '--checks-only', '-O', 'SIMPLE'
298
+ '--jscomp_off=missingRequire',
299
+ '--checks-only', '-O', 'SIMPLE',
300
300
  ]
301
301
 
302
302
  # Set up a build with the build name of "dummy". With output_compiled_bundle
@@ -58,15 +58,6 @@ requirement {
58
58
  }
59
59
 
60
60
 
61
- # Ban the use of @expose annotations.
62
- requirement {
63
- type: CUSTOM
64
- java_class: 'com.google.javascript.jscomp.ConformanceRules$BanExpose'
65
- error_message: '@expose is not allowed; please use externs instead. '
66
- 'See docs/design/export.md for details.'
67
- }
68
-
69
-
70
61
  # Reject unresolved types.
71
62
  requirement {
72
63
  type: CUSTOM
@@ -818,7 +818,7 @@ function main(args) {
818
818
  // foo.bar.baz, foo and foo.bar will both need to be declared first.
819
819
  const namespaces = new Set();
820
820
  const namespaceDeclarations = [];
821
- for (const name of names) {
821
+ for (const name of Array.from(names).sort()) {
822
822
  // Add the full name "foo.bar.baz" and its prototype ahead of time. We
823
823
  // should never generate these as namespaces.
824
824
  namespaces.add(name);
@@ -34,4 +34,5 @@
34
34
  r'(?i)@returns': '@return',
35
35
  r'(?i)varint': 'variant',
36
36
  r'(?i)asynchronus': 'asynchronous',
37
+ r'(?i)deafult': 'default',
37
38
  }
@@ -32,6 +32,9 @@ import subprocess
32
32
  import sys
33
33
  import time
34
34
 
35
+ import subprocessWindowsPatch
36
+
37
+
35
38
  # Python 3 no longer has a separate unicode type. For type-checking done in
36
39
  # get_node_binary, create an alias to the str type.
37
40
  if sys.version_info[0] == 3:
@@ -212,8 +215,7 @@ def npm_version(is_dirty=False):
212
215
  """Gets the version of the library from NPM."""
213
216
  try:
214
217
  base = cygwin_safe_path(get_source_base())
215
- cmd = 'npm.cmd' if is_windows() else 'npm'
216
- cmd_line = [cmd, '--prefix', base, 'ls', 'shaka-player']
218
+ cmd_line = ['npm', '--prefix', base, 'ls', 'shaka-player']
217
219
  text = execute_get_output(cmd_line).decode('utf8')
218
220
  except subprocess.CalledProcessError as e:
219
221
  text = e.output.decode('utf8')
@@ -335,10 +337,9 @@ def update_node_modules():
335
337
  return True
336
338
 
337
339
  base = cygwin_safe_path(get_source_base())
338
- cmd = 'npm.cmd' if is_windows() else 'npm'
339
340
 
340
341
  # Check the version of npm.
341
- version = execute_get_output([cmd, '-v']).decode('utf8')
342
+ version = execute_get_output(['npm', '-v']).decode('utf8')
342
343
 
343
344
  if _parse_version(version) < _parse_version('5.0.0'):
344
345
  logging.error('npm version is too old, please upgrade. e.g.:')
@@ -351,7 +352,7 @@ def update_node_modules():
351
352
  with InDir(base):
352
353
  # npm update seems to be the wrong thing in npm v5, so use install.
353
354
  # See google/shaka-player#854 for more details.
354
- execute_get_output([cmd, 'install'])
355
+ execute_get_output(['npm', 'install'])
355
356
 
356
357
  # Update the timestamp of the file that tracks when we last updated.
357
358
  open(_node_modules_last_update_path(), 'wb').close()
@@ -0,0 +1,103 @@
1
+ # Copyright 2021 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
+ """Monkeypatch subprocess on Windows to find .CMD scripts.
16
+
17
+ Without this patch, subprocess fails to find .CMD scripts on Windows, even
18
+ though these are executables and should be treated as such according to the
19
+ PATHEXT environment variable.
20
+
21
+ Many people "work around" this issue on Windows with subprocess's shell=True
22
+ argument, but this comes with a risk of shell injection vulnerabilities.
23
+
24
+ Another solution is to explicitly add ".CMD" to the end of some commands on
25
+ Windows, but this breaks portability and requires "if windows" to be scattered
26
+ around a codebase.
27
+
28
+ This monkeypatch allows the caller of subprocess to stop worrying about Windows
29
+ nuances and to go back to the security best practice of shell=False. Any .CMD
30
+ script that would be found by the Windows shell will now be found by
31
+ subprocess. And because we're using the standard Windows PATHEXT environment
32
+ variable, this can be extended to other types of executable scripts, as well.
33
+ """
34
+
35
+ import os
36
+ import subprocess
37
+ import sys
38
+
39
+
40
+ # NOTE: All of the higher-level methods eventually delegate to Popen, so we
41
+ # only patch that one method.
42
+ # run => Popen
43
+ # call => Popen
44
+ # check_call => call => Popen
45
+ # check_output => run => Popen
46
+
47
+ # These environment variables should almost certainly exist, but these are
48
+ # defaults in case they are missing.
49
+ DEFAULT_PATHEXT = '.COM;.EXE;.BAT;.CMD'
50
+ DEFAULT_PATH = r'C:\WINDOWS\system32;C:\WINDOWS'
51
+
52
+
53
+ def resolve(exe):
54
+ """Resolve a command name into a full path to the executable."""
55
+
56
+ if '/' in exe or '\\' in exe or ':' in exe:
57
+ # This is a path, so don't modify it.
58
+ return exe
59
+
60
+ if '.' in exe:
61
+ # This has an extension already. Don't search for an extension.
62
+ exe_names = [exe]
63
+ else:
64
+ # This is a command name without an extension, so check for every extension
65
+ # in PATHEXT.
66
+ extensions = os.environ.get('PATHEXT', DEFAULT_PATHEXT).split(';')
67
+ exe_names = [exe + ext for ext in extensions]
68
+
69
+ exe_paths = os.environ.get('PATH', DEFAULT_PATH).split(';')
70
+
71
+ for path in exe_paths:
72
+ for name in exe_names:
73
+ candidate = os.path.join(path, name)
74
+ if os.access(candidate, os.X_OK): # If executable
75
+ return candidate
76
+
77
+ # Failed to resolve, so return the original name and let Popen fail with a
78
+ # natural-looking error complaining that this command cannot be found.
79
+ return exe
80
+
81
+
82
+ real_Popen = subprocess.Popen
83
+
84
+
85
+ def Popen(args, *more_args, **kwargs):
86
+ """A patch to install over subprocess.Popen."""
87
+
88
+ # If the first argument is a list, resolve the command name, which is the
89
+ # first item in the list.
90
+ if isinstance(args, list):
91
+ args[0] = resolve(args[0])
92
+
93
+ # Delegate to the real Popen implementation.
94
+ return real_Popen(args, *more_args, **kwargs)
95
+
96
+
97
+ # Only patch win32, but not cygwin. Cygwin works correctly already.
98
+ if sys.platform == 'win32':
99
+ # Patch over Popen.
100
+ subprocess.Popen = Popen
101
+ # Copy the docstring from the real Popen into the patch, so that
102
+ # help(subprocess.Popen) is still relatively sane with this patch installed.
103
+ Popen.__doc__ = real_Popen.__doc__
@@ -75,6 +75,8 @@ const ShakaDemoAssetInfo = class {
75
75
  this.imaAssetKey = null;
76
76
  /** @type {?string} */
77
77
  this.imaContentSrcId = null;
78
+ /** @type {?string} */
79
+ this.mimeType = null;
78
80
 
79
81
 
80
82
  // Offline storage values.
@@ -168,6 +170,15 @@ const ShakaDemoAssetInfo = class {
168
170
  return this;
169
171
  }
170
172
 
173
+ /**
174
+ * @param {string} mimeType
175
+ * @return {!ShakaDemoAssetInfo}
176
+ */
177
+ setMimeType(mimeType) {
178
+ this.mimeType = mimeType;
179
+ return this;
180
+ }
181
+
171
182
  /**
172
183
  * @param {!shaka.extern.RequestFilter} requestFilter
173
184
  * @return {!ShakaDemoAssetInfo}
@@ -490,7 +490,7 @@ shakaAssets.testAssets = [
490
490
  .addFeature(shakaAssets.Feature.MP4)
491
491
  .addFeature(shakaAssets.Feature.SUBTITLES)
492
492
  .addFeature(shakaAssets.Feature.LIVE)
493
- .setIMAAssetKey('_lDu24IaSYaYAMEfixipNQ'),
493
+ .setIMAAssetKey('PSzZMzAkSXCmlJOWDmRj8Q'),
494
494
  new ShakaDemoAssetInfo(
495
495
  /* name= */ 'Tears of Steel (multicodec, surround + stereo)',
496
496
  /* iconUri= */ 'https://storage.googleapis.com/shaka-asset-icons/tears_of_steel.png',
@@ -118,6 +118,10 @@ shakaDemo.MessageIds = {
118
118
  MANIFEST_URL_ERROR: 'DEMO_MANIFEST_URL_ERROR',
119
119
  NAME: 'DEMO_NAME',
120
120
  NAME_ERROR: 'DEMO_NAME_ERROR',
121
+ EXTRA_SHAKA_PLAYER_CONFIG: 'DEMO_EXTRA_SHAKA_PLAYER_CONFIG',
122
+ EXTRA_TAB: 'DEMO_EXTRA_TAB',
123
+ INVALID_JSON_CONFIG_ERROR: 'DEMO_INVALID_JSON_CONFIG_ERROR',
124
+ MIME_TYPE: 'DEMO_MIME_TYPE',
121
125
  SAVE_BUTTON: 'DEMO_SAVE_BUTTON',
122
126
  /* Search panel. */
123
127
  AD_SEARCH: 'DEMO_AD_SEARCH',
@@ -224,6 +228,7 @@ shakaDemo.MessageIds = {
224
228
  STREAMING_SECTION_HEADER: 'DEMO_STREAMING_SECTION_HEADER',
225
229
  SWITCH_INTERVAL: 'DEMO_SWITCH_INTERVAL',
226
230
  TEXT_LANGUAGE: 'DEMO_TEXT_LANGUAGE',
231
+ TEXT_ROLE: 'DEMO_TEXT_ROLE',
227
232
  TIMEOUT: 'DEMO_TIMEOUT',
228
233
  TRICK_PLAY_CONTROLS: 'DEMO_TRICK_PLAY_CONTROLS',
229
234
  TRICK_PLAY_CONTROLS_WARNING: 'DEMO_TRICK_PLAY_CONTROLS_WARNING',
package/demo/config.js CHANGED
@@ -395,7 +395,8 @@ shakaDemo.Config = class {
395
395
  const docLink = this.resolveExternLink_('.PlayerConfiguration');
396
396
  this.addSection_(MessageIds.LANGUAGE_SECTION_HEADER, docLink)
397
397
  .addTextInput_(MessageIds.AUDIO_LANGUAGE, 'preferredAudioLanguage')
398
- .addTextInput_(MessageIds.TEXT_LANGUAGE, 'preferredTextLanguage');
398
+ .addTextInput_(MessageIds.TEXT_LANGUAGE, 'preferredTextLanguage')
399
+ .addTextInput_(MessageIds.TEXT_ROLE, 'preferredTextRole');
399
400
  const onChange = (input) => {
400
401
  shakaDemoMain.setUILocale(input.value);
401
402
  shakaDemoMain.remakeHash();