ravnur-player-public 3.4.2 → 3.4.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 (262) hide show
  1. package/.eslintignore +7 -0
  2. package/.eslintrc.js +206 -0
  3. package/.flowconfig +3 -0
  4. package/.vscode/extensions.json +7 -0
  5. package/.vscode/launch.json +37 -0
  6. package/.vscode/settings.json +4 -0
  7. package/README-Private.md +54 -0
  8. package/babel.config.js +28 -0
  9. package/bitbucket-pipelines.yml +61 -0
  10. package/cert.pem +23 -0
  11. package/demo/BaseM.mp4 +0 -0
  12. package/demo/HD.mp4 +0 -0
  13. package/demo/annotations.json +50 -0
  14. package/demo/annotations_ge.json +50 -0
  15. package/demo/base.mp3 +0 -0
  16. package/demo/cc_2125en.vtt +4958 -0
  17. package/demo/cc_en.vtt +171 -0
  18. package/demo/cc_ge.vtt +178 -0
  19. package/demo/chapters_en.vtt +38 -0
  20. package/demo/chapters_ge.vtt +5 -0
  21. package/demo/chapters_ge1.json +23 -0
  22. package/demo/hls/audio/stereo/en/128kbit.m3u8 +912 -0
  23. package/demo/hls/audio/stereo/none/128kbit.m3u8 +912 -0
  24. package/demo/hls/audio/surround/en/320kbit.m3u8 +912 -0
  25. package/demo/hls/playlist.m3u8 +31 -0
  26. package/demo/hls/video/10000kbit.m3u8 +894 -0
  27. package/demo/hls/video/1100kbit.m3u8 +894 -0
  28. package/demo/hls/video/1500kbit.m3u8 +894 -0
  29. package/demo/hls/video/250kbit.m3u8 +894 -0
  30. package/demo/hls/video/4000kbit.m3u8 +894 -0
  31. package/demo/hls/video/500kbit.m3u8 +894 -0
  32. package/demo/hls/video/6000kbit.m3u8 +894 -0
  33. package/demo/hls/video/800kbit.m3u8 +894 -0
  34. package/demo/hls.js +5 -0
  35. package/demo/hls.js.map +1 -0
  36. package/demo/hls.min.js +2 -0
  37. package/demo/hls.min.js.map +1 -0
  38. package/demo/playlist.m3u8 +31 -0
  39. package/demo/ravnur-flash-audio.swf +0 -0
  40. package/demo/ravnur-flash-video-hls.swf +0 -0
  41. package/demo/ravnur-flash-video.swf +0 -0
  42. package/demo/shaka/shaka-player.foo.debug.d.ts +4532 -0
  43. package/demo/shaka/shaka-player.foo.debug.externs.js +3886 -0
  44. package/demo/shaka/shaka-player.foo.debug.js +1746 -0
  45. package/demo/shaka/shaka-player.foo.debug.map +8 -0
  46. package/demo/shaka/wrapper.js +7 -0
  47. package/demo/test.html +458 -0
  48. package/dist/RavnurMediaPlayer.min.js +1 -1
  49. package/dist/cdn/RavnurMediaPlayer.min.js +1 -1
  50. package/jest.config.js +4 -0
  51. package/key.pem +27 -0
  52. package/lib/es5.js +344 -0
  53. package/lib/images/Spinner-small.gif +0 -0
  54. package/lib/images/close.png +0 -0
  55. package/lib/images/ic_check_box_black_24dp_1x.png +0 -0
  56. package/lib/images/ic_check_box_outline_blank_black_24dp_1x.png +0 -0
  57. package/lib/images/ic_chevron_left_white_24dp_1x.png +0 -0
  58. package/lib/images/ic_chevron_right_white_24dp_1x.png +0 -0
  59. package/lib/images/ic_closed_caption_white_24dp_1x.png +0 -0
  60. package/lib/images/ic_fast_forward_white_24dp_1x.png +0 -0
  61. package/lib/images/ic_fast_rewind_white_24dp_1x.png +0 -0
  62. package/lib/images/ic_fullscreen_exit_white_24dp_1x.png +0 -0
  63. package/lib/images/ic_fullscreen_white_24dp_1x.png +0 -0
  64. package/lib/images/ic_hd_white_24dp_1x.png +0 -0
  65. package/lib/images/ic_keyboard_arrow_left_black_24dp_1x.png +0 -0
  66. package/lib/images/ic_keyboard_arrow_right_black_24dp_1x.png +0 -0
  67. package/lib/images/ic_pause_white_24dp_1x.png +0 -0
  68. package/lib/images/ic_photo_white_24dp_1x.png +0 -0
  69. package/lib/images/ic_play_arrow_white_24dp_1x.png +0 -0
  70. package/lib/images/ic_refresh_white_24dp_1x.png +0 -0
  71. package/lib/images/ic_settings_white_24dp_1x.png +0 -0
  72. package/lib/images/ic_skip_next_white_24dp_1x.png +0 -0
  73. package/lib/images/ic_skip_previous_white_24dp_1x.png +0 -0
  74. package/lib/images/ic_toc_white_24dp_1x.png +0 -0
  75. package/lib/images/ic_volume_off_white_24dp_1x.png +0 -0
  76. package/lib/images/ic_volume_up_white_24dp_1x.png +0 -0
  77. package/lib/player4ie8.css +225 -0
  78. package/package.json +1 -5
  79. package/server.js +29 -0
  80. package/src/config/cc.js +56 -0
  81. package/src/config/i18n.js +101 -0
  82. package/src/config/options.js +123 -0
  83. package/src/config/playlist.js +9 -0
  84. package/src/config/source.js +23 -0
  85. package/src/config/statuses.js +8 -0
  86. package/src/config/styles.js +16 -0
  87. package/src/entity.js +27 -0
  88. package/src/events.js +5 -0
  89. package/src/extensions/annotations.js +142 -0
  90. package/src/extensions/audio-tarcks.js +115 -0
  91. package/src/extensions/backward.js +45 -0
  92. package/src/extensions/base.js +73 -0
  93. package/src/extensions/bottom-next.js +50 -0
  94. package/src/extensions/bottom-prev.js +50 -0
  95. package/src/extensions/buffering.js +78 -0
  96. package/src/extensions/c2pa.js +350 -0
  97. package/src/extensions/caption-search.js +230 -0
  98. package/src/extensions/cc.js +874 -0
  99. package/src/extensions/crawl.js +118 -0
  100. package/src/extensions/download.js +411 -0
  101. package/src/extensions/error.js +47 -0
  102. package/src/extensions/forward.js +44 -0
  103. package/src/extensions/fullscreen.js +84 -0
  104. package/src/extensions/help.js +201 -0
  105. package/src/extensions/helpers/FileSaver.js +157 -0
  106. package/src/extensions/helpers/clickOpener.js +180 -0
  107. package/src/extensions/helpers/opener.js +30 -0
  108. package/src/extensions/helpers/openerHeightChecker.js +13 -0
  109. package/src/extensions/helpers/popover.js +33 -0
  110. package/src/extensions/helpers/popoverPosition.js +30 -0
  111. package/src/extensions/helpers/scrollIntoView.js +9 -0
  112. package/src/extensions/helpers/storage.js +20 -0
  113. package/src/extensions/helpers/textContent.js +6 -0
  114. package/src/extensions/helpers/timeCodeToSeconds.js +44 -0
  115. package/src/extensions/helpers/transport.js +43 -0
  116. package/src/extensions/helpers/vtt-loader.js +42 -0
  117. package/src/extensions/index.js +87 -0
  118. package/src/extensions/live.js +76 -0
  119. package/src/extensions/mux.js +57 -0
  120. package/src/extensions/next-frame.js +44 -0
  121. package/src/extensions/next.js +48 -0
  122. package/src/extensions/placeholder.js +241 -0
  123. package/src/extensions/play.js +102 -0
  124. package/src/extensions/poster.js +47 -0
  125. package/src/extensions/prev-frame.js +44 -0
  126. package/src/extensions/prev.js +48 -0
  127. package/src/extensions/progress.js +465 -0
  128. package/src/extensions/resizer.js +37 -0
  129. package/src/extensions/settings.js +367 -0
  130. package/src/extensions/theater.js +56 -0
  131. package/src/extensions/title.js +38 -0
  132. package/src/extensions/toc.js +334 -0
  133. package/src/extensions/volume.js +196 -0
  134. package/src/flash/FlashPlugin.js +301 -0
  135. package/src/flash/MediaElement.js +361 -0
  136. package/src/flash/plugins.js +32 -0
  137. package/src/flash-detector.js +66 -0
  138. package/src/helpers/$t.js +10 -0
  139. package/src/helpers/binder.js +11 -0
  140. package/src/helpers/isAndroid.js +5 -0
  141. package/src/helpers/isBlackBerry.js +5 -0
  142. package/src/helpers/isCanvasSupported.js +6 -0
  143. package/src/helpers/isIE.js +21 -0
  144. package/src/helpers/isMobile.js +10 -0
  145. package/src/helpers/isWindows.js +5 -0
  146. package/src/helpers/isWindowsPhone.js +5 -0
  147. package/src/helpers/isiOS.js +5 -0
  148. package/src/html5media.js +19 -0
  149. package/src/index.js +2 -0
  150. package/src/logger.js +31 -0
  151. package/src/microevent.js +65 -0
  152. package/src/normalize-options.js +139 -0
  153. package/src/player.js +864 -0
  154. package/src/players/base.js +209 -0
  155. package/src/players/flash.js +172 -0
  156. package/src/players/hls.js +278 -0
  157. package/src/players/html.js +205 -0
  158. package/src/players/index.js +59 -0
  159. package/src/players/shaka.js +219 -0
  160. package/src/playlist.js +362 -0
  161. package/src/screenfull.js +121 -0
  162. package/src/state.js +474 -0
  163. package/src/static/es5.js +344 -0
  164. package/src/static/images/Spinner-small.gif +0 -0
  165. package/src/static/images/close.png +0 -0
  166. package/src/static/images/ic_check_box_black_24dp_1x.png +0 -0
  167. package/src/static/images/ic_check_box_outline_blank_black_24dp_1x.png +0 -0
  168. package/src/static/images/ic_chevron_left_white_24dp_1x.png +0 -0
  169. package/src/static/images/ic_chevron_right_white_24dp_1x.png +0 -0
  170. package/src/static/images/ic_closed_caption_white_24dp_1x.png +0 -0
  171. package/src/static/images/ic_fast_forward_white_24dp_1x.png +0 -0
  172. package/src/static/images/ic_fast_rewind_white_24dp_1x.png +0 -0
  173. package/src/static/images/ic_fullscreen_exit_white_24dp_1x.png +0 -0
  174. package/src/static/images/ic_fullscreen_white_24dp_1x.png +0 -0
  175. package/src/static/images/ic_hd_white_24dp_1x.png +0 -0
  176. package/src/static/images/ic_keyboard_arrow_left_black_24dp_1x.png +0 -0
  177. package/src/static/images/ic_keyboard_arrow_right_black_24dp_1x.png +0 -0
  178. package/src/static/images/ic_pause_white_24dp_1x.png +0 -0
  179. package/src/static/images/ic_play_arrow_white_24dp_1x.png +0 -0
  180. package/src/static/images/ic_refresh_white_24dp_1x.png +0 -0
  181. package/src/static/images/ic_settings_white_24dp_1x.png +0 -0
  182. package/src/static/images/ic_skip_next_white_24dp_1x.png +0 -0
  183. package/src/static/images/ic_skip_previous_white_24dp_1x.png +0 -0
  184. package/src/static/images/ic_toc_white_24dp_1x.png +0 -0
  185. package/src/static/images/ic_volume_off_white_24dp_1x.png +0 -0
  186. package/src/static/images/ic_volume_up_white_24dp_1x.png +0 -0
  187. package/src/static/player4ie8.css +225 -0
  188. package/src/styles/bplaylist.css.js +124 -0
  189. package/src/styles/index.js +1966 -0
  190. package/src/styles/playlist.css.js +84 -0
  191. package/src/styles/rplaylist.css.js +98 -0
  192. package/src/svgs.js +111 -0
  193. package/src/types/Logger.js +10 -0
  194. package/src/types/Options.js +179 -0
  195. package/src/types/Playlist.js +3 -0
  196. package/src/types/Source.js +28 -0
  197. package/src/types/State.js +46 -0
  198. package/src/types/Styles.js +11 -0
  199. package/src/types/TimeData.js +8 -0
  200. package/src/types/Translation.js +69 -0
  201. package/src/utils/absolutizeUrl.js +9 -0
  202. package/src/utils/addClass.js +9 -0
  203. package/src/utils/addEvent.js +31 -0
  204. package/src/utils/addProperty.js +65 -0
  205. package/src/utils/appendChild.js +14 -0
  206. package/src/utils/buff2hex.js +5 -0
  207. package/src/utils/contains.js +33 -0
  208. package/src/utils/createElement.js +24 -0
  209. package/src/utils/each.js +34 -0
  210. package/src/utils/escapeHTML.js +8 -0
  211. package/src/utils/existy.js +4 -0
  212. package/src/utils/extend.js +17 -0
  213. package/src/utils/filter.js +16 -0
  214. package/src/utils/find.js +11 -0
  215. package/src/utils/findIndex.js +20 -0
  216. package/src/utils/first.js +5 -0
  217. package/src/utils/get.js +19 -0
  218. package/src/utils/has.js +5 -0
  219. package/src/utils/hasClass.js +6 -0
  220. package/src/utils/head.js +11 -0
  221. package/src/utils/inRange.js +16 -0
  222. package/src/utils/index.js +73 -0
  223. package/src/utils/isArray.js +4 -0
  224. package/src/utils/isBoolean.js +3 -0
  225. package/src/utils/isElement.js +7 -0
  226. package/src/utils/isEmpty.js +6 -0
  227. package/src/utils/isEqual.js +33 -0
  228. package/src/utils/isEqualBuffer.js +13 -0
  229. package/src/utils/isFunction.js +3 -0
  230. package/src/utils/isNotEmpty.js +5 -0
  231. package/src/utils/isObject.js +5 -0
  232. package/src/utils/isString.js +9 -0
  233. package/src/utils/last.js +4 -0
  234. package/src/utils/map.js +11 -0
  235. package/src/utils/negate.js +8 -0
  236. package/src/utils/noop.js +1 -0
  237. package/src/utils/notExisty.js +5 -0
  238. package/src/utils/reduce.js +8 -0
  239. package/src/utils/remove.js +7 -0
  240. package/src/utils/removeClass.js +8 -0
  241. package/src/utils/removeEvent.js +7 -0
  242. package/src/utils/toArray.js +7 -0
  243. package/src/utils/toggleClass.js +16 -0
  244. package/src/utils/uidGenerator.js +8 -0
  245. package/src/utils/upperFirst.js +4 -0
  246. package/tests/extensions/__snapshots__/download.spec.js.snap +226 -0
  247. package/tests/extensions/__snapshots__/fullscreen.spec.js.snap +30 -0
  248. package/tests/extensions/__snapshots__/title.spec.js.snap +16 -0
  249. package/tests/extensions/download.spec.js +111 -0
  250. package/tests/extensions/fullscreen.spec.js +56 -0
  251. package/tests/extensions/title.spec.js +35 -0
  252. package/tests/mocks/assets/BaseM.mp4 +0 -0
  253. package/tests/mocks/assets/hls.min.js +5 -0
  254. package/tests/mocks/assets/styleMock.js +1 -0
  255. package/tests/mocks/base-player-options.js +47 -0
  256. package/tests/mocks/sources.js +58 -0
  257. package/tests/mocks/timedata/cc_en.vtt +171 -0
  258. package/tests/mocks/timedata/cc_ge.vtt +178 -0
  259. package/tests/utils/wait.js +1 -0
  260. package/webpack.config.js +78 -0
  261. package/dist/.DS_Store +0 -0
  262. package/dist/cdn/.DS_Store +0 -0
@@ -0,0 +1,4532 @@
1
+ /*! @license
2
+ * Shaka Player
3
+ * Copyright 2016 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ declare class GlobalError extends Error {}
8
+
9
+ //!! generated by clutz.
10
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
11
+ declare namespace shaka {
12
+ class Player extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable {
13
+ private noStructuralTyping_shaka_Player : any;
14
+ constructor (mediaElement ? : HTMLMediaElement | null , dependencyInjector ? : (a : shaka.Player | null ) => any ) ;
15
+ /**
16
+ * Adds the given chapters track to the loaded manifest. <code>load()</code>
17
+ * must resolve before calling. The presentation must have a duration.
18
+ * This returns the created track.
19
+ */
20
+ addChaptersTrack (uri : string , language : string , mimeType ? : string ) : Promise < shaka.extern.Track > ;
21
+ /**
22
+ * Adds the given text track to the loaded manifest. <code>load()</code> must
23
+ * resolve before calling. The presentation must have a duration.
24
+ * This returns the created track, which can immediately be selected by the
25
+ * application. The track will not be automatically selected.
26
+ */
27
+ addTextTrackAsync (uri : string , language : string , kind : string , mimeType ? : string , codec ? : string , label ? : string , forced ? : boolean ) : Promise < shaka.extern.Track > ;
28
+ /**
29
+ * Adds the given thumbnails track to the loaded manifest.
30
+ * <code>load()</code> must resolve before calling. The presentation must
31
+ * have a duration.
32
+ * This returns the created track, which can immediately be used by the
33
+ * application.
34
+ */
35
+ addThumbnailsTrack (uri : string , mimeType ? : string ) : Promise < shaka.extern.Track > ;
36
+ /**
37
+ * Attaches the player to a media element.
38
+ * If the player was already attached to a media element, first detaches from
39
+ * that media element.
40
+ */
41
+ attach (mediaElement : HTMLMediaElement , initializeMediaSource ? : boolean ) : Promise < any > ;
42
+ /**
43
+ * Calling <code>attachCanvas</code> will tell the player to set canvas
44
+ * element for LCEVC decoding.
45
+ */
46
+ attachCanvas (canvas : HTMLCanvasElement | null ) : any ;
47
+ /**
48
+ * Cancel trick-play. If the player has not loaded content or is still loading
49
+ * content this will be a no-op.
50
+ */
51
+ cancelTrickPlay ( ) : any ;
52
+ /**
53
+ * Changes configuration settings on the Player. This checks the names of
54
+ * keys and the types of values to avoid coding errors. If there are errors,
55
+ * this logs them to the console and returns false. Correct fields are still
56
+ * applied even if there are other errors. You can pass an explicit
57
+ * <code>undefined</code> value to restore the default value. This has two
58
+ * modes of operation:
59
+ * <p>
60
+ * First, this can be passed a single "plain" object. This object should
61
+ * follow the {@link shaka.extern.PlayerConfiguration} object. Not all fields
62
+ * need to be set; unset fields retain their old values.
63
+ * <p>
64
+ * Second, this can be passed two arguments. The first is the name of the key
65
+ * to set. This should be a '.' separated path to the key. For example,
66
+ * <code>'streaming.alwaysStreamText'</code>. The second argument is the
67
+ * value to set.
68
+ * @param config This should either be a field name or an object.
69
+ * @param value In the second mode, this is the value to set.
70
+ */
71
+ configure (config : string | object , value ? : any ) : boolean ;
72
+ /**
73
+ * After destruction, a Player object cannot be used again.
74
+ */
75
+ destroy ( ) : Promise < any > ;
76
+ /**
77
+ * Detach the player from the current media element. Leaves the player in a
78
+ * state where it cannot play media, until it has been attached to something
79
+ * else.
80
+ */
81
+ detach (keepAdManager ? : boolean ) : Promise < any > ;
82
+ /**
83
+ * Get the drm info used to initialize EME. If EME is not being used, this
84
+ * will return <code>null</code>. If the player is idle or has not initialized
85
+ * EME yet, this will return <code>null</code>.
86
+ */
87
+ drmInfo ( ) : shaka.extern.DrmInfo | null ;
88
+ /**
89
+ * Returns the active sessions metadata
90
+ */
91
+ getActiveSessionsMetadata ( ) : shaka.extern.DrmSessionMetadata [] ;
92
+ /**
93
+ * Returns a shaka.ads.AdManager instance, responsible for Dynamic
94
+ * Ad Insertion functionality.
95
+ */
96
+ getAdManager ( ) : shaka.extern.IAdManager | null ;
97
+ /**
98
+ * Returns Thumbnail objects for each thumbnail for a given image track ID.
99
+ * If the player has not loaded content, this will return a null.
100
+ */
101
+ getAllThumbnails (trackId : number ) : Promise < shaka.extern.Thumbnail [] | null > ;
102
+ /**
103
+ * Get the uri to the asset that the player has loaded. If the player has not
104
+ * loaded content, this will return <code>null</code>.
105
+ */
106
+ getAssetUri ( ) : string | null ;
107
+ /**
108
+ * Return a list of audio languages available. If the player has not loaded
109
+ * any content, this will return an empty list.
110
+ */
111
+ getAudioLanguages ( ) : string [] ;
112
+ /**
113
+ * Return a list of audio language-role combinations available. If the
114
+ * player has not loaded any content, this will return an empty list.
115
+ */
116
+ getAudioLanguagesAndRoles ( ) : shaka.extern.LanguageRole [] ;
117
+ /**
118
+ * Returns the ratio of video length buffered compared to buffering Goal
119
+ */
120
+ getBufferFullness ( ) : number ;
121
+ /**
122
+ * Get information about what the player has buffered. If the player has not
123
+ * loaded content or is currently loading content, the buffered content will
124
+ * be empty.
125
+ */
126
+ getBufferedInfo ( ) : shaka.extern.BufferedInfo ;
127
+ /**
128
+ * This returns the list of chapters.
129
+ */
130
+ getChapters (language : string ) : shaka.extern.Chapter [] ;
131
+ /**
132
+ * Return a list of chapters tracks.
133
+ */
134
+ getChaptersTracks ( ) : shaka.extern.TrackList ;
135
+ /**
136
+ * Return a copy of the current configuration. Modifications of the returned
137
+ * value will not affect the Player's active configuration. You must call
138
+ * <code>player.configure()</code> to make changes.
139
+ */
140
+ getConfiguration ( ) : shaka.extern.PlayerConfiguration ;
141
+ /**
142
+ * Get the next known expiration time for any EME session. If the session
143
+ * never expires, this will return <code>Infinity</code>. If there are no EME
144
+ * sessions, this will return <code>Infinity</code>. If the player has not
145
+ * loaded content, this will return <code>Infinity</code>.
146
+ */
147
+ getExpiration ( ) : number ;
148
+ /**
149
+ * Return a list of image tracks that can be switched to.
150
+ * If the player has not loaded content, this will return an empty list.
151
+ */
152
+ getImageTracks ( ) : shaka.extern.TrackList ;
153
+ /**
154
+ * Gets a map of EME key ID to the current key status.
155
+ */
156
+ getKeyStatuses ( ) : { [ key: string ]: string } ;
157
+ /**
158
+ * Get the current load mode.
159
+ */
160
+ getLoadMode ( ) : shaka.Player.LoadMode ;
161
+ /**
162
+ * Get the manifest that the player has loaded. If the player has not loaded
163
+ * any content, this will return <code>null</code>.
164
+ * NOTE: This structure is NOT covered by semantic versioning compatibility
165
+ * guarantees. It may change at any time!
166
+ * This is marked as deprecated to warn Closure Compiler users at compile-time
167
+ * to avoid using this method.
168
+ */
169
+ getManifest ( ) : shaka.extern.Manifest | null ;
170
+ /**
171
+ * Get the type of manifest parser that the player is using. If the player has
172
+ * not loaded any content, this will return <code>null</code>.
173
+ */
174
+ getManifestParserFactory ( ) : ( shaka.extern.ManifestParser.Factory ) | null ;
175
+ /**
176
+ * Get the current manifest type.
177
+ */
178
+ getManifestType ( ) : string | null ;
179
+ /**
180
+ * Get the media element that the player is currently using to play loaded
181
+ * content. If the player has not loaded content, this will return
182
+ * <code>null</code>.
183
+ */
184
+ getMediaElement ( ) : HTMLMediaElement | null ;
185
+ getNetworkingEngine ( ) : shaka.net.NetworkingEngine | null ;
186
+ /**
187
+ * Get the playback rate of what is playing right now. If we are using trick
188
+ * play, this will return the trick play rate.
189
+ * If no content is playing, this will return 0.
190
+ * If content is buffering, this will return the expected playback rate once
191
+ * the video starts playing.
192
+ * <p>
193
+ * If the player has not loaded content, this will return a playback rate of
194
+ * 0.
195
+ */
196
+ getPlaybackRate ( ) : number ;
197
+ /**
198
+ * Get the current playhead position as a date.
199
+ */
200
+ getPlayheadTimeAsDate ( ) : Date | null ;
201
+ /**
202
+ * Get the presentation start time as a date.
203
+ */
204
+ getPresentationStartTimeAsDate ( ) : Date | null ;
205
+ /**
206
+ * Get the presentation segment availability duration. This should only be
207
+ * called when the player has loaded a live stream. If the player has not
208
+ * loaded a live stream, this will return <code>null</code>.
209
+ */
210
+ getSegmentAvailabilityDuration ( ) : number | null ;
211
+ /**
212
+ * Get statistics for the current playback session. If the player is not
213
+ * playing content, this will return an empty stats object.
214
+ */
215
+ getStats ( ) : shaka.extern.Stats ;
216
+ /**
217
+ * Return a list of text languages available. If the player has not loaded
218
+ * any content, this will return an empty list.
219
+ */
220
+ getTextLanguages ( ) : string [] ;
221
+ /**
222
+ * Return a list of text language-role combinations available. If the player
223
+ * has not loaded any content, this will be return an empty list.
224
+ */
225
+ getTextLanguagesAndRoles ( ) : shaka.extern.LanguageRole [] ;
226
+ /**
227
+ * Return a list of text tracks that can be switched to.
228
+ * <p>
229
+ * If the player has not loaded content, this will return an empty list.
230
+ */
231
+ getTextTracks ( ) : shaka.extern.TrackList ;
232
+ /**
233
+ * Return a Thumbnail object from a image track Id and time.
234
+ * If the player has not loaded content, this will return a null.
235
+ */
236
+ getThumbnails (trackId : number , time : number ) : Promise < shaka.extern.Thumbnail | null > ;
237
+ /**
238
+ * Return a list of variant tracks that can be switched to.
239
+ * <p>
240
+ * If the player has not loaded content, this will return an empty list.
241
+ */
242
+ getVariantTracks ( ) : shaka.extern.TrackList ;
243
+ /**
244
+ * Go to live in a live stream.
245
+ */
246
+ goToLive ( ) : any ;
247
+ /**
248
+ * Check if the manifest contains only audio-only content. If the player has
249
+ * not loaded content, this will return <code>false</code>.
250
+ * <p>
251
+ * The player does not support content that contain more than one type of
252
+ * variants (i.e. mixing audio-only, video-only, audio-video). Content will be
253
+ * filtered to only contain one type of variant.
254
+ */
255
+ isAudioOnly ( ) : boolean ;
256
+ /**
257
+ * Check if the player is currently in a buffering state (has too little
258
+ * content to play smoothly). If the player has not loaded content, this will
259
+ * return <code>false</code>.
260
+ */
261
+ isBuffering ( ) : boolean ;
262
+ /**
263
+ * Get if the player is playing in-progress content. If the player has not
264
+ * loaded content, this will return <code>false</code>.
265
+ */
266
+ isInProgress ( ) : boolean ;
267
+ /**
268
+ * Get if the player is playing live content. If the player has not loaded
269
+ * content, this will return <code>false</code>.
270
+ */
271
+ isLive ( ) : boolean ;
272
+ /**
273
+ * Check if the text displayer is enabled.
274
+ */
275
+ isTextTrackVisible ( ) : boolean ;
276
+ /**
277
+ * Get the key system currently used by EME. If EME is not being used, this
278
+ * will return an empty string. If the player has not loaded content, this
279
+ * will return an empty string.
280
+ */
281
+ keySystem ( ) : string ;
282
+ /**
283
+ * Loads a new stream.
284
+ * If another stream was already playing, first unloads that stream.
285
+ * @param startTime When <code>startTime</code> is <code>null</code> or <code>undefined</code>, playback will start at the default start time (0 for VOD and liveEdge for LIVE).
286
+ */
287
+ load (assetUriOrPreloader : string | shaka.media.PreloadManager | null , startTime ? : number | null , mimeType ? : string | null ) : Promise < any > ;
288
+ /**
289
+ * Starts to preload a given asset, and returns a PreloadManager object that
290
+ * represents that preloading process.
291
+ * The PreloadManager will load the manifest for that asset, as well as the
292
+ * initialization segment. It will not preload anything more than that;
293
+ * this feature is intended for reducing start-time latency, not for fully
294
+ * downloading assets before playing them (for that, use
295
+ * |shaka.offline.Storage|).
296
+ * You can pass that PreloadManager object in to the |load| method on this
297
+ * Player instance to finish loading that particular asset, or you can call
298
+ * the |destroy| method on the manager if the preload is no longer necessary.
299
+ * If this returns null rather than a PreloadManager, that indicates that the
300
+ * asset must be played with src=, which cannot be preloaded.
301
+ * @param startTime When <code>startTime</code> is <code>null</code> or <code>undefined</code>, playback will start at the default start time (0 for VOD and liveEdge for LIVE).
302
+ */
303
+ preload (assetUri : string , startTime ? : number | null , mimeType ? : string | null ) : Promise < shaka.media.PreloadManager | null > ;
304
+ /**
305
+ * Releases all of the mutexes of the player. Meant for use by the tests.
306
+ */
307
+ releaseAllMutexes ( ) : any ;
308
+ /**
309
+ * Reset configuration to default.
310
+ */
311
+ resetConfiguration ( ) : any ;
312
+ /**
313
+ * Retry streaming after a streaming failure has occurred. When the player has
314
+ * not loaded content or is loading content, this will be a no-op and will
315
+ * return <code>false</code>.
316
+ * <p>
317
+ * If the player has loaded content, and streaming has not seen an error, this
318
+ * will return <code>false</code>.
319
+ * <p>
320
+ * If the player has loaded content, and streaming seen an error, but the
321
+ * could not resume streaming, this will return <code>false</code>.
322
+ */
323
+ retryStreaming (retryDelaySeconds ? : number ) : boolean ;
324
+ /**
325
+ * Get the range of time (in seconds) that seeking is allowed. If the player
326
+ * has not loaded content and the manifest is HLS, this will return a range
327
+ * from 0 to 0.
328
+ */
329
+ seekRange ( ) : shaka.extern.BufferedRange ;
330
+ /**
331
+ * Sets the current audio language and current variant role to the selected
332
+ * language, role and channel count, and chooses a new variant if need be.
333
+ * If the player has not loaded any content, this will be a no-op.
334
+ */
335
+ selectAudioLanguage (language : string , role ? : string , channelsCount ? : number , safeMargin ? : number ) : any ;
336
+ /**
337
+ * Sets the current text language and current text role to the selected
338
+ * language and role, and chooses a new variant if need be. If the player has
339
+ * not loaded any content, this will be a no-op.
340
+ */
341
+ selectTextLanguage (language : string , role ? : string , forced ? : boolean ) : any ;
342
+ /**
343
+ * Select a specific text track. <code>track</code> should come from a call to
344
+ * <code>getTextTracks</code>. If the track is not found, this will be a
345
+ * no-op. If the player has not loaded content, this will be a no-op.
346
+ * <p>
347
+ * Note that <code>AdaptationEvents</code> are not fired for manual track
348
+ * selections.
349
+ */
350
+ selectTextTrack (track : shaka.extern.Track ) : any ;
351
+ /**
352
+ * Select a specific variant track to play. <code>track</code> should come
353
+ * from a call to <code>getVariantTracks</code>. If <code>track</code> cannot
354
+ * be found, this will be a no-op. If the player has not loaded content, this
355
+ * will be a no-op.
356
+ * <p>
357
+ * Changing variants will take effect once the currently buffered content has
358
+ * been played. To force the change to happen sooner, use
359
+ * <code>clearBuffer</code> with <code>safeMargin</code>. Setting
360
+ * <code>clearBuffer</code> to <code>true</code> will clear all buffered
361
+ * content after <code>safeMargin</code>, allowing the new variant to start
362
+ * playing sooner.
363
+ * <p>
364
+ * Note that <code>AdaptationEvents</code> are not fired for manual track
365
+ * selections.
366
+ * @param safeMargin Optional amount of buffer (in seconds) to retain when clearing the buffer. Useful for switching variant quickly without causing a buffering event. Defaults to 0 if not provided. Ignored if clearBuffer is false. Can cause hiccups on some browsers if chosen too small, e.g. The amount of two segments is a fair minimum to consider as safeMargin value.
367
+ */
368
+ selectVariantTrack (track : shaka.extern.Track , clearBuffer ? : boolean , safeMargin ? : number ) : any ;
369
+ /**
370
+ * Select variant tracks that have a given label. This assumes the
371
+ * label uniquely identifies an audio stream, so all the variants
372
+ * are expected to have the same variant.audio.
373
+ * @param clearBuffer Optional clear buffer or not when switch to new variant Defaults to true if not provided
374
+ * @param safeMargin Optional amount of buffer (in seconds) to retain when clearing the buffer. Defaults to 0 if not provided. Ignored if clearBuffer is false.
375
+ */
376
+ selectVariantsByLabel (label : string , clearBuffer ? : boolean , safeMargin ? : number ) : any ;
377
+ /**
378
+ * Set the maximum resolution that the platform's hardware can handle.
379
+ */
380
+ setMaxHardwareResolution (width : number , height : number ) : any ;
381
+ /**
382
+ * Enable or disable the text displayer. If the player is in an unloaded
383
+ * state, the request will be applied next time content is loaded.
384
+ */
385
+ setTextTrackVisibility (isVisible : boolean ) : any ;
386
+ /**
387
+ * Set the videoContainer to construct UITextDisplayer.
388
+ */
389
+ setVideoContainer (videoContainer : HTMLElement | null ) : any ;
390
+ /**
391
+ * Enable trick play to skip through content without playing by repeatedly
392
+ * seeking. For example, a rate of 2.5 would result in 2.5 seconds of content
393
+ * being skipped every second. A negative rate will result in moving
394
+ * backwards.
395
+ * <p>
396
+ * If the player has not loaded content or is still loading content this will
397
+ * be a no-op. Wait until <code>load</code> has completed before calling.
398
+ * <p>
399
+ * Trick play will be canceled automatically if the playhead hits the
400
+ * beginning or end of the seekable range for the content.
401
+ */
402
+ trickPlay (rate : number ) : any ;
403
+ /**
404
+ * Unloads the currently playing stream, if any.
405
+ */
406
+ unload (initializeMediaSource ? : boolean , keepAdManager ? : boolean ) : Promise < any > ;
407
+ /**
408
+ * Unloads the currently playing stream, if any, and returns a PreloadManager
409
+ * that contains the loaded manifest of that asset, if any.
410
+ * Allows for the asset to be re-loaded by this player faster, in the future.
411
+ * When in src= mode, this unloads but does not make a PreloadManager.
412
+ */
413
+ unloadAndSavePreload (initializeMediaSource ? : boolean , keepAdManager ? : boolean ) : Promise < shaka.media.PreloadManager | null > ;
414
+ /**
415
+ * Provides a way to update the stream start position during the media loading
416
+ * process. Can for example be called from the <code>manifestparsed</code>
417
+ * event handler to update the start position based on information in the
418
+ * manifest.
419
+ */
420
+ updateStartTime (startTime : number ) : any ;
421
+ /**
422
+ * Return whether the browser provides basic support. If this returns false,
423
+ * Shaka Player cannot be used at all. In this case, do not construct a
424
+ * Player instance and do not use the library.
425
+ */
426
+ static isBrowserSupported ( ) : boolean ;
427
+ /**
428
+ * Probes the browser to determine what features are supported. This makes a
429
+ * number of requests to EME/MSE/etc which may result in user prompts. This
430
+ * should only be used for diagnostics.
431
+ * <p>
432
+ * NOTE: This may show a request to the user for permission.
433
+ */
434
+ static probeSupport (promptsOkay ? : boolean ) : Promise < shaka.extern.SupportType > ;
435
+ /**
436
+ * Registers a plugin callback that will be called with
437
+ * <code>support()</code>. The callback will return the value that will be
438
+ * stored in the return value from <code>support()</code>.
439
+ */
440
+ static registerSupportPlugin (name : string , callback : ( ) => any ) : any ;
441
+ /**
442
+ * Set a factory to create an ad manager during player construction time.
443
+ * This method needs to be called bafore instantiating the Player class.
444
+ */
445
+ static setAdManagerFactory (factory : shaka.extern.IAdManager.Factory ) : any ;
446
+ static version : string ;
447
+ }
448
+ }
449
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
450
+ declare namespace shaka.Player {
451
+ /**
452
+ * In order to know what method of loading the player used for some content, we
453
+ * have this enum. It lets us know if content has not been loaded, loaded with
454
+ * media source, or loaded with src equals.
455
+ * This enum has a low resolution, because it is only meant to express the
456
+ * outer limits of the various states that the player is in. For example, when
457
+ * someone calls a public method on player, it should not matter if they have
458
+ * initialized drm engine, it should only matter if they finished loading
459
+ * content.
460
+ */
461
+ /**
462
+ * In order to know what method of loading the player used for some content, we
463
+ * have this enum. It lets us know if content has not been loaded, loaded with
464
+ * media source, or loaded with src equals.
465
+ * This enum has a low resolution, because it is only meant to express the
466
+ * outer limits of the various states that the player is in. For example, when
467
+ * someone calls a public method on player, it should not matter if they have
468
+ * initialized drm engine, it should only matter if they finished loading
469
+ * content.
470
+ */
471
+ enum LoadMode {
472
+ DESTROYED = 0.0 ,
473
+ MEDIA_SOURCE = 2.0 ,
474
+ NOT_LOADED = 1.0 ,
475
+ SRC_EQUALS = 3.0 ,
476
+ }
477
+ }
478
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
479
+ declare namespace shaka.abr {
480
+ class SimpleAbrManager implements shaka.extern.AbrManager , shaka.util.IReleasable {
481
+ private noStructuralTyping_shaka_abr_SimpleAbrManager : any;
482
+ chooseVariant (preferFastSwitching ? : boolean ) : shaka.extern.Variant ;
483
+ configure (config : any ) : any ;
484
+ disable ( ) : any ;
485
+ enable ( ) : any ;
486
+ getBandwidthEstimate ( ) : any ;
487
+ init (switchCallback : any ) : any ;
488
+ playbackRateChanged (rate : any ) : any ;
489
+ release ( ) : any ;
490
+ segmentDownloaded (deltaTimeMs : number , numBytes : number , allowSwitch : boolean , request ? : shaka.extern.Request ) : any ;
491
+ setCmsdManager (cmsdManager : any ) : any ;
492
+ setMediaElement (mediaElement : any ) : any ;
493
+ setVariants (variants : any ) : any ;
494
+ stop ( ) : any ;
495
+ trySuggestStreams ( ) : any ;
496
+ }
497
+ }
498
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
499
+ declare namespace shaka.config {
500
+ enum AutoShowText {
501
+ ALWAYS = 1.0 ,
502
+ IF_PREFERRED_TEXT_LANGUAGE = 2.0 ,
503
+ IF_SUBTITLES_MAY_BE_NEEDED = 3.0 ,
504
+ NEVER = 0.0 ,
505
+ }
506
+ }
507
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
508
+ declare namespace shaka.config {
509
+ enum CodecSwitchingStrategy {
510
+ RELOAD = 'reload' ,
511
+ SMOOTH = 'smooth' ,
512
+ }
513
+ }
514
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
515
+ declare namespace shaka.dash {
516
+ /**
517
+ * Creates a new DASH parser.
518
+ */
519
+ class DashParser implements shaka.extern.ManifestParser {
520
+ private noStructuralTyping_shaka_dash_DashParser : any;
521
+ banLocation (uri : any ) : any ;
522
+ configure (config : any ) : any ;
523
+ onExpirationUpdated (sessionId : any , expiration : any ) : any ;
524
+ onInitialVariantChosen (variant : any ) : any ;
525
+ start (uri : any , playerInterface : any ) : any ;
526
+ stop ( ) : any ;
527
+ update ( ) : any ;
528
+ }
529
+ }
530
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
531
+ declare namespace shaka {
532
+ class dependencies {
533
+ private noStructuralTyping_shaka_dependencies : any;
534
+ /**
535
+ * Registers a new dependency.
536
+ * @param key which is used for retrieving a dependency
537
+ * @param dep a dependency
538
+ */
539
+ static add (key : shaka.dependencies.Allowed , dep : any ) : any ;
540
+ /**
541
+ * Check if we have a dependency for the key.
542
+ * @param key key
543
+ */
544
+ static has (key : shaka.dependencies.Allowed ) : boolean ;
545
+ }
546
+ }
547
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
548
+ declare namespace shaka.dependencies {
549
+ enum Allowed {
550
+ ISOBoxer = 'ISOBoxer' ,
551
+ muxjs = 'muxjs' ,
552
+ }
553
+ }
554
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
555
+ declare namespace shaka.lcevc {
556
+ class Dec implements shaka.util.IReleasable {
557
+ private noStructuralTyping_shaka_lcevc_Dec : any;
558
+ constructor (media : HTMLVideoElement | null , canvas : HTMLCanvasElement | null , lcevcConfig : shaka.extern.LcevcConfiguration ) ;
559
+ /**
560
+ * Close LCEVC Decoder.
561
+ */
562
+ release ( ) : any ;
563
+ }
564
+ }
565
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
566
+ declare namespace shaka.media {
567
+ /**
568
+ * Closed Caption Parser provides all operations for parsing the closed captions
569
+ * embedded in Dash videos streams.
570
+ */
571
+ class ClosedCaptionParser implements shaka.media.IClosedCaptionParser {
572
+ private noStructuralTyping_shaka_media_ClosedCaptionParser : any;
573
+ /**
574
+ * Closed Caption Parser provides all operations for parsing the closed captions
575
+ * embedded in Dash videos streams.
576
+ */
577
+ constructor (mimeType : string ) ;
578
+ static findDecoder ( ) : ( shaka.extern.CaptionDecoderPlugin ) | null ;
579
+ static findParser (mimeType : string ) : ( shaka.extern.CeaParserPlugin ) | null ;
580
+ static registerDecoder (plugin : shaka.extern.CaptionDecoderPlugin ) : any ;
581
+ static registerParser (mimeType : string , plugin : shaka.extern.CeaParserPlugin ) : any ;
582
+ static unregisterDecoder ( ) : any ;
583
+ static unregisterParser (mimeType : string ) : any ;
584
+ }
585
+ }
586
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
587
+ declare namespace shaka.media {
588
+ /**
589
+ * The IClosedCaptionParser defines the interface to provide all operations for
590
+ * parsing the closed captions embedded in Dash videos streams.
591
+ * TODO: Remove this interface and move method definitions
592
+ * directly to ClosedCaptonParser.
593
+ */
594
+ interface IClosedCaptionParser {
595
+ }
596
+ }
597
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
598
+ declare namespace shaka.media {
599
+ /**
600
+ * Creates an InitSegmentReference, which provides the location to an
601
+ * initialization segment.
602
+ */
603
+ class InitSegmentReference {
604
+ private noStructuralTyping_shaka_media_InitSegmentReference : any;
605
+ constructor (uris : ( ) => string [] , startByte : number , endByte : number | null , mediaQuality ? : null | shaka.extern.MediaQualityInfo , timescale ? : null | number , segmentData ? : null | ArrayBuffer | ArrayBufferView , aesKey ? : shaka.extern.aesKey | null ) ;
606
+ /**
607
+ * Returns the offset from the start of the resource to the end of the
608
+ * segment, inclusive. A value of null indicates that the segment extends
609
+ * to the end of the resource.
610
+ */
611
+ getEndByte ( ) : number | null ;
612
+ /**
613
+ * Returns the offset from the start of the resource to the
614
+ * start of the segment.
615
+ */
616
+ getStartByte ( ) : number ;
617
+ }
618
+ }
619
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
620
+ declare namespace shaka.media {
621
+ class ManifestParser {
622
+ private noStructuralTyping_shaka_media_ManifestParser : any;
623
+ /**
624
+ * Registers a manifest parser by file extension.
625
+ * @param extension The file extension of the manifest.
626
+ * @param parserFactory The factory used to create parser instances.
627
+ */
628
+ static registerParserByExtension (extension : string , parserFactory : shaka.extern.ManifestParser.Factory ) : any ;
629
+ /**
630
+ * Registers a manifest parser by MIME type.
631
+ * @param mimeType The MIME type of the manifest.
632
+ * @param parserFactory The factory used to create parser instances.
633
+ */
634
+ static registerParserByMime (mimeType : string , parserFactory : shaka.extern.ManifestParser.Factory ) : any ;
635
+ /**
636
+ * Unregisters a manifest parser by MIME type.
637
+ * @param mimeType The MIME type of the manifest.
638
+ */
639
+ static unregisterParserByMime (mimeType : string ) : any ;
640
+ }
641
+ }
642
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
643
+ declare namespace shaka.media.ManifestParser {
644
+ enum AccessibilityPurpose {
645
+ HARD_OF_HEARING = 'hard of hearing' ,
646
+ VISUALLY_IMPAIRED = 'visually impaired' ,
647
+ }
648
+ }
649
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
650
+ declare namespace shaka.media {
651
+ /**
652
+ * A meta-SegmentIndex composed of multiple other SegmentIndexes.
653
+ * Used in constructing multi-Period Streams for DASH.
654
+ */
655
+ class MetaSegmentIndex extends shaka.media.SegmentIndex implements Iterable < shaka.media.SegmentReference > {
656
+ private noStructuralTyping_shaka_media_MetaSegmentIndex : any;
657
+ /**
658
+ * A meta-SegmentIndex composed of multiple other SegmentIndexes.
659
+ * Used in constructing multi-Period Streams for DASH.
660
+ */
661
+ constructor ( ) ;
662
+ //!! Symbol.iterator inserted by Clutz for Iterable subtype
663
+ [Symbol.iterator](): Iterator < shaka.media.SegmentReference > ;
664
+ evict (time : number ) : any ;
665
+ find (time : any ) : any ;
666
+ fit (windowStart : number , windowEnd : number | null , c ? : boolean ) : any ;
667
+ forEachTopLevelReference (fn : any ) : any ;
668
+ get (position : any ) : any ;
669
+ merge (references : any ) : any ;
670
+ mergeAndEvict (references : shaka.media.SegmentReference [] , windowStart : number ) : any ;
671
+ offset (offset : number ) : any ;
672
+ release ( ) : any ;
673
+ updateEvery (interval : number , updateCallback : ( ) => ( shaka.media.SegmentReference | null ) [] | null ) : any ;
674
+ }
675
+ }
676
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
677
+ declare namespace shaka.media {
678
+ class PreloadManager extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable {
679
+ private noStructuralTyping_shaka_media_PreloadManager : any;
680
+ constructor (assetUri : string , mimeType : string | null , startTimeOfLoad : number , startTime : number | null , playerInterface : any ) ;
681
+ /**
682
+ * Releases or stops all non-entrusted resources.
683
+ */
684
+ destroy ( ) : Promise < any > ;
685
+ /**
686
+ * Waits for the loading to be finished (or to fail with an error).
687
+ */
688
+ waitForFinish ( ) : Promise < any > ;
689
+ }
690
+ }
691
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
692
+ declare namespace shaka.media {
693
+ /**
694
+ * PresentationTimeline.
695
+ */
696
+ class PresentationTimeline {
697
+ private noStructuralTyping_shaka_media_PresentationTimeline : any;
698
+ constructor (presentationStartTime : number | null , presentationDelay : number , autoCorrectDrift ? : boolean ) ;
699
+ /**
700
+ * Gets the presentation delay in seconds.
701
+ */
702
+ getDelay ( ) : number ;
703
+ getDuration ( ) : number ;
704
+ getInitialProgramDateTime ( ) : number | null ;
705
+ getMaxSegmentDuration ( ) : number ;
706
+ getPresentationStartTime ( ) : number | null ;
707
+ /**
708
+ * Gets the seek range start time, offset by the given amount. This is used
709
+ * to ensure that we don't "fall" back out of the seek window while we are
710
+ * buffering.
711
+ * @param offset The offset to add to the start time for live streams.
712
+ */
713
+ getSafeSeekRangeStart (offset : number ) : number ;
714
+ /**
715
+ * Gets the seek range end.
716
+ */
717
+ getSeekRangeEnd ( ) : number ;
718
+ /**
719
+ * Gets the seek range start time.
720
+ */
721
+ getSeekRangeStart ( ) : number ;
722
+ /**
723
+ * Gets the presentation's segment availability duration.
724
+ */
725
+ getSegmentAvailabilityDuration ( ) : number ;
726
+ /**
727
+ * Gets the presentation's current segment availability end time. Segments
728
+ * starting after this time should be assumed to be unavailable.
729
+ */
730
+ getSegmentAvailabilityEnd ( ) : number ;
731
+ /**
732
+ * Gets the presentation's current segment availability start time. Segments
733
+ * ending at or before this time should be assumed to be unavailable.
734
+ */
735
+ getSegmentAvailabilityStart ( ) : number ;
736
+ isInProgress ( ) : boolean ;
737
+ isLive ( ) : boolean ;
738
+ /**
739
+ * Returns if the presentation timeline's start time is locked.
740
+ */
741
+ isStartTimeLocked ( ) : boolean ;
742
+ /**
743
+ * Lock the presentation timeline's start time. After this is called, no
744
+ * further adjustments to presentationStartTime_ will be permitted.
745
+ * This should be called after all Periods have been parsed, and all calls to
746
+ * notifySegments() from the initial manifest parse have been made.
747
+ * Without this, we can get assertion failures in SegmentIndex for certain
748
+ * DAI content. If DAI adds ad segments to the manifest faster than
749
+ * real-time, adjustments to presentationStartTime_ can cause availability
750
+ * windows to jump around on updates.
751
+ */
752
+ lockStartTime ( ) : any ;
753
+ /**
754
+ * Gives PresentationTimeline a Stream's maximum segment duration so it can
755
+ * size and position the segment availability window. This function should be
756
+ * called once for each Stream (no more, no less), but does not have to be
757
+ * called if notifySegments() is called instead for a particular stream.
758
+ * @param maxSegmentDuration The maximum segment duration for a particular stream.
759
+ */
760
+ notifyMaxSegmentDuration (maxSegmentDuration : number ) : any ;
761
+ /**
762
+ * Gives PresentationTimeline a Stream's minimum segment start time.
763
+ */
764
+ notifyMinSegmentStartTime (startTime : number ) : any ;
765
+ /**
766
+ * Gives PresentationTimeline an array of segments so it can size and position
767
+ * the segment availability window, and account for missing segment
768
+ * information. These segments do not necessarily need to all be from the
769
+ * same stream.
770
+ */
771
+ notifySegments (references : shaka.media.SegmentReference [] ) : any ;
772
+ /**
773
+ * Gives PresentationTimeline a Stream's timeline so it can size and position
774
+ * the segment availability window, and account for missing segment
775
+ * information.
776
+ */
777
+ notifyTimeRange (timeline : shaka.media.PresentationTimeline.TimeRange [] , startOffset : number ) : any ;
778
+ /**
779
+ * Offsets the segment times by the given amount.
780
+ * @param offset The number of seconds to offset by. A positive number adjusts the segment times forward.
781
+ */
782
+ offset (offset : number ) : any ;
783
+ /**
784
+ * Sets the presentation's segment availability time offset. This should be
785
+ * only set for Low Latency Dash.
786
+ * The segments are available earlier for download than the availability start
787
+ * time, so we can move closer to the live edge.
788
+ */
789
+ setAvailabilityTimeOffset (offset : number ) : any ;
790
+ /**
791
+ * Sets the clock offset, which is the difference between the client's clock
792
+ * and the server's clock, in milliseconds (i.e., serverTime = Date.now() +
793
+ * clockOffset).
794
+ * @param offset The clock offset, in ms.
795
+ */
796
+ setClockOffset (offset : number ) : any ;
797
+ /**
798
+ * Sets the presentation delay in seconds.
799
+ */
800
+ setDelay (delay : number ) : any ;
801
+ /**
802
+ * Sets the presentation's duration.
803
+ * @param duration The presentation's duration in seconds. Infinity indicates that the presentation continues indefinitely.
804
+ */
805
+ setDuration (duration : number ) : any ;
806
+ /**
807
+ * Sets the initial program date time.
808
+ */
809
+ setInitialProgramDateTime (initialProgramDateTime : number ) : any ;
810
+ /**
811
+ * Sets the presentation's start time.
812
+ * @param presentationStartTime The wall-clock time, in seconds, when the presentation started or will start. Only required for live.
813
+ */
814
+ setPresentationStartTime (presentationStartTime : number ) : any ;
815
+ /**
816
+ * Sets the presentation's segment availability duration. The segment
817
+ * availability duration should only be set for live.
818
+ * @param segmentAvailabilityDuration The presentation's new segment availability duration in seconds.
819
+ */
820
+ setSegmentAvailabilityDuration (segmentAvailabilityDuration : number ) : any ;
821
+ /**
822
+ * Sets the presentation's static flag.
823
+ * @param isStatic If true, the presentation is static, meaning all segments are available at once.
824
+ */
825
+ setStatic (isStatic : boolean ) : any ;
826
+ /**
827
+ * Sets the start time of the user-defined seek range. This is only used for
828
+ * VOD content.
829
+ */
830
+ setUserSeekStart (time : number ) : any ;
831
+ /**
832
+ * True if the presentation start time is being used to calculate the live
833
+ * edge.
834
+ * Using the presentation start time means that the stream may be subject to
835
+ * encoder drift. At runtime, we will avoid using the presentation start time
836
+ * whenever possible.
837
+ */
838
+ usingPresentationStartTime ( ) : boolean ;
839
+ }
840
+ }
841
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
842
+ declare namespace shaka.media.PresentationTimeline {
843
+ type TimeRange = { end : number , partialSegments : number , segmentPosition : number , start : number , unscaledStart : number } ;
844
+ }
845
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
846
+ declare namespace shaka.media {
847
+ /**
848
+ * SegmentIndex.
849
+ */
850
+ class SegmentIndex implements shaka.extern.SegmentIndex , shaka.util.IReleasable , Iterable < shaka.media.SegmentReference > {
851
+ private noStructuralTyping_shaka_media_SegmentIndex : any;
852
+ /**
853
+ * SegmentIndex.
854
+ */
855
+ constructor (references : shaka.media.SegmentReference [] ) ;
856
+ //!! Symbol.iterator inserted by Clutz for Iterable subtype
857
+ [Symbol.iterator](): Iterator < shaka.media.SegmentReference > ;
858
+ /**
859
+ * Removes all SegmentReferences that end before the given time.
860
+ * @param time The time in seconds.
861
+ */
862
+ evict (time : number ) : any ;
863
+ find (time : any ) : any ;
864
+ /**
865
+ * Drops references that start after windowEnd, or end before windowStart,
866
+ * and contracts the last reference so that it ends at windowEnd.
867
+ * Do not call on the last period of a live presentation (unknown duration).
868
+ * It is okay to call on the other periods of a live presentation, where the
869
+ * duration is known and another period has been added.
870
+ * @param isNew Whether this is a new SegmentIndex and we shouldn't update the number of evicted elements.
871
+ */
872
+ fit (windowStart : number , windowEnd : number | null , isNew ? : boolean ) : any ;
873
+ get (position : any ) : any ;
874
+ /**
875
+ * Returns a new iterator that initially points to the segment that contains
876
+ * the given time, or the nearest independent segment before it.
877
+ * Like the normal iterator, next() must be called first to get to the first
878
+ * element. Returns null if we do not find a segment at the
879
+ * requested time.
880
+ * The first segment returned by the iterator _MUST_ be an independent
881
+ * segment. Assumes that only partial references can be dependent, based on
882
+ * RFC 8216 rev 13, section 8.1: "Each (non-Partial) Media Segment in a Media
883
+ * Playlist will contain at least one independent frame."
884
+ */
885
+ getIteratorForTime (time : number , allowNonIndepedent ? : boolean , reverse ? : boolean ) : shaka.media.SegmentIterator | null ;
886
+ getNumEvicted ( ) : any ;
887
+ getNumReferences ( ) : any ;
888
+ /**
889
+ * Marks the index as immutable. Segments cannot be added or removed after
890
+ * this point. This doesn't affect the references themselves. This also
891
+ * makes the destroy/release methods do nothing.
892
+ * This is mainly for testing.
893
+ */
894
+ markImmutable ( ) : any ;
895
+ /**
896
+ * Merges the given SegmentReferences and evicts the ones that end before the
897
+ * given time. Supports extending the original references only.
898
+ * Will not replace old references or interleave new ones.
899
+ * Used, for example, by the DASH and HLS parser, where manifests may not list
900
+ * all available references, so we must keep available references in memory to
901
+ * fill the availability window.
902
+ * @param references The list of SegmentReferences, which must be sorted first by their start times (ascending) and second by their end times (ascending).
903
+ * @param windowStart The start of the availability window to filter out the references that are no longer available.
904
+ */
905
+ mergeAndEvict (references : shaka.media.SegmentReference [] , windowStart : number ) : any ;
906
+ /**
907
+ * Offset all segment references by a fixed amount.
908
+ * @param offset The amount to add to each segment's start and end times.
909
+ */
910
+ offset (offset : number ) : any ;
911
+ release ( ) : any ;
912
+ /**
913
+ * Updates the references every so often. Stops when the references list
914
+ * returned by the callback is null.
915
+ * @param interval The interval in seconds.
916
+ */
917
+ updateEvery (interval : number , updateCallback : ( ) => ( shaka.media.SegmentReference | null ) [] | null ) : any ;
918
+ /**
919
+ * Create a SegmentIndex for a single segment of the given start time and
920
+ * duration at the given URIs.
921
+ */
922
+ static forSingleSegment (startTime : number , duration : number , uris : string [] ) : shaka.media.SegmentIndex ;
923
+ }
924
+ }
925
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
926
+ declare namespace shaka.media {
927
+ /**
928
+ * An iterator over a SegmentIndex's references.
929
+ */
930
+ class SegmentIterator implements Iterator < shaka.media.SegmentReference | null > {
931
+ private noStructuralTyping_shaka_media_SegmentIterator : any;
932
+ /**
933
+ * An iterator over a SegmentIndex's references.
934
+ */
935
+ constructor (segmentIndex : shaka.media.SegmentIndex | null , index : number , partialSegmentIndex : number , reverse : boolean ) ;
936
+ current ( ) : shaka.media.SegmentReference | null ;
937
+ currentPosition ( ) : number ;
938
+ next ( ) : any ;
939
+ setReverse (reverse : boolean ) : any ;
940
+ }
941
+ }
942
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
943
+ declare namespace shaka.media.SegmentPrefetch {
944
+ type FetchDispatcher = (a : shaka.media.InitSegmentReference | shaka.media.SegmentReference , b : shaka.extern.Stream , c ? : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null ) => shaka.net.NetworkingEngine.PendingRequest ;
945
+ }
946
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
947
+ declare namespace shaka.media {
948
+ /**
949
+ * SegmentReference provides the start time, end time, and location to a media
950
+ * segment.
951
+ */
952
+ class SegmentReference {
953
+ private noStructuralTyping_shaka_media_SegmentReference : any;
954
+ constructor (startTime : number , endTime : number , uris : ( ) => string [] , startByte : number , endByte : number | null , initSegmentReference : shaka.media.InitSegmentReference | null , timestampOffset : number , appendWindowStart : number , appendWindowEnd : number , partialReferences ? : shaka.media.SegmentReference [] , tilesLayout ? : string | null , tileDuration ? : number | null , syncTime ? : number | null , status ? : shaka.media.SegmentReference.Status , aesKey ? : shaka.extern.aesKey | null , allPartialSegments ? : boolean ) ;
955
+ /**
956
+ * Returns the offset from the start of the resource to the end of the
957
+ * segment, inclusive. A value of null indicates that the segment extends to
958
+ * the end of the resource.
959
+ */
960
+ getEndByte ( ) : number | null ;
961
+ /**
962
+ * Returns the segment's end time in seconds.
963
+ */
964
+ getEndTime ( ) : number ;
965
+ /**
966
+ * Return the segment data.
967
+ */
968
+ getSegmentData ( ) : ArrayBuffer | ArrayBufferView | null ;
969
+ /**
970
+ * Returns the offset from the start of the resource to the
971
+ * start of the segment.
972
+ */
973
+ getStartByte ( ) : number ;
974
+ /**
975
+ * Returns the segment's start time in seconds.
976
+ */
977
+ getStartTime ( ) : number ;
978
+ /**
979
+ * Returns the segment's status.
980
+ */
981
+ getStatus ( ) : shaka.media.SegmentReference.Status ;
982
+ /**
983
+ * Returns the segment's thumbnail sprite.
984
+ */
985
+ getThumbnailSprite ( ) : shaka.media.SegmentReference.ThumbnailSprite | null ;
986
+ /**
987
+ * Returns the segment's explicit tile duration.
988
+ * Only defined in image segments.
989
+ */
990
+ getTileDuration ( ) : number | null ;
991
+ /**
992
+ * Returns the segment's tiles layout. Only defined in image segments.
993
+ */
994
+ getTilesLayout ( ) : string | null ;
995
+ /**
996
+ * Creates and returns the URIs of the resource containing the segment.
997
+ */
998
+ getUris ( ) : string [] ;
999
+ /**
1000
+ * Returns true if the segment has a byterange optimization.
1001
+ */
1002
+ hasByterangeOptimization ( ) : boolean ;
1003
+ /**
1004
+ * Returns true if the segment is independent.
1005
+ */
1006
+ isIndependent ( ) : boolean ;
1007
+ /**
1008
+ * Returns true if reference as being the last part of the full segment.
1009
+ */
1010
+ isLastPartial ( ) : boolean ;
1011
+ /**
1012
+ * Returns true if the segment is partial.
1013
+ */
1014
+ isPartial ( ) : boolean ;
1015
+ /**
1016
+ * Returns true if the segment is preloaded.
1017
+ */
1018
+ isPreload ( ) : boolean ;
1019
+ /**
1020
+ * Mark the reference as byterange optimization.
1021
+ * The "byterange optimization" means that it is playable using MP4 low
1022
+ * latency streaming with chunked data.
1023
+ */
1024
+ markAsByterangeOptimization ( ) : any ;
1025
+ /**
1026
+ * Mark the reference as being the last part of the full segment
1027
+ */
1028
+ markAsLastPartial ( ) : any ;
1029
+ /**
1030
+ * Mark the reference as non-independent.
1031
+ */
1032
+ markAsNonIndependent ( ) : any ;
1033
+ /**
1034
+ * Mark the reference as partial.
1035
+ */
1036
+ markAsPartial ( ) : any ;
1037
+ /**
1038
+ * Mark the reference as preload.
1039
+ */
1040
+ markAsPreload ( ) : any ;
1041
+ /**
1042
+ * Mark the reference as unavailable.
1043
+ */
1044
+ markAsUnavailable ( ) : any ;
1045
+ /**
1046
+ * Offset the segment reference by a fixed amount.
1047
+ * @param offset The amount to add to the segment's start and end times.
1048
+ */
1049
+ offset (offset : number ) : any ;
1050
+ /**
1051
+ * Set the segment data.
1052
+ */
1053
+ setSegmentData (segmentData : ArrayBuffer | ArrayBufferView ) : any ;
1054
+ /**
1055
+ * Set the segment's thumbnail sprite.
1056
+ */
1057
+ setThumbnailSprite (thumbnailSprite : shaka.media.SegmentReference.ThumbnailSprite ) : any ;
1058
+ /**
1059
+ * Sync this segment against a particular sync time that will serve as "0" in
1060
+ * the presentation timeline.
1061
+ */
1062
+ syncAgainst (lowestSyncTime : number ) : any ;
1063
+ }
1064
+ }
1065
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1066
+ declare namespace shaka.media.SegmentReference {
1067
+ /**
1068
+ * Rather than using booleans to communicate what the state of the reference,
1069
+ * we have this enum.
1070
+ */
1071
+ /**
1072
+ * Rather than using booleans to communicate what the state of the reference,
1073
+ * we have this enum.
1074
+ */
1075
+ enum Status {
1076
+ AVAILABLE = 0.0 ,
1077
+ MISSING = 2.0 ,
1078
+ UNAVAILABLE = 1.0 ,
1079
+ }
1080
+ }
1081
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1082
+ declare namespace shaka.media.SegmentReference {
1083
+ type ThumbnailSprite = { height : number , positionX : number , positionY : number , width : number } ;
1084
+ }
1085
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1086
+ declare namespace shaka.net {
1087
+ class DataUriPlugin {
1088
+ private noStructuralTyping_shaka_net_DataUriPlugin : any;
1089
+ static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated ) : shaka.extern.IAbortableOperation < any > ;
1090
+ }
1091
+ }
1092
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1093
+ declare namespace shaka.net {
1094
+ class HttpFetchPlugin {
1095
+ private noStructuralTyping_shaka_net_HttpFetchPlugin : any;
1096
+ /**
1097
+ * Determine if the Fetch API is supported in the browser. Note: this is
1098
+ * deliberately exposed as a method to allow the client app to use the same
1099
+ * logic as Shaka when determining support.
1100
+ */
1101
+ static isSupported ( ) : boolean ;
1102
+ static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated , headersReceived : shaka.extern.HeadersReceived ) : shaka.extern.IAbortableOperation < any > ;
1103
+ }
1104
+ }
1105
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1106
+ declare namespace shaka.net {
1107
+ class HttpXHRPlugin {
1108
+ private noStructuralTyping_shaka_net_HttpXHRPlugin : any;
1109
+ static parse (uri : string , request : shaka.extern.Request , requestType : shaka.net.NetworkingEngine.RequestType , progressUpdated : shaka.extern.ProgressUpdated , headersReceived : shaka.extern.HeadersReceived ) : shaka.extern.IAbortableOperation < any > ;
1110
+ }
1111
+ }
1112
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1113
+ declare namespace shaka.net {
1114
+ /**
1115
+ * NetworkingEngine wraps all networking operations. This accepts plugins that
1116
+ * handle the actual request. A plugin is registered using registerScheme.
1117
+ * Each scheme has at most one plugin to handle the request.
1118
+ */
1119
+ class NetworkingEngine extends shaka.util.FakeEventTarget implements shaka.util.IDestroyable {
1120
+ private noStructuralTyping_shaka_net_NetworkingEngine : any;
1121
+ /**
1122
+ * NetworkingEngine wraps all networking operations. This accepts plugins that
1123
+ * handle the actual request. A plugin is registered using registerScheme.
1124
+ * Each scheme has at most one plugin to handle the request.
1125
+ */
1126
+ constructor (onProgressUpdated ? : shaka.net.NetworkingEngine.onProgressUpdated , onHeadersReceived ? : shaka.net.NetworkingEngine.OnHeadersReceived , onDownloadFailed ? : shaka.net.NetworkingEngine.OnDownloadFailed , onRequest ? : shaka.net.NetworkingEngine.OnRequest , onRetry ? : shaka.net.NetworkingEngine.OnRetry , onResponse ? : shaka.net.NetworkingEngine.OnResponse ) ;
1127
+ /**
1128
+ * Clears all request filters.
1129
+ */
1130
+ clearAllRequestFilters ( ) : any ;
1131
+ /**
1132
+ * Clears all response filters.
1133
+ */
1134
+ clearAllResponseFilters ( ) : any ;
1135
+ destroy ( ) : Promise < any > ;
1136
+ /**
1137
+ * Registers a new request filter. All filters are applied in the order they
1138
+ * are registered.
1139
+ */
1140
+ registerRequestFilter (filter : shaka.extern.RequestFilter ) : any ;
1141
+ /**
1142
+ * Registers a new response filter. All filters are applied in the order they
1143
+ * are registered.
1144
+ */
1145
+ registerResponseFilter (filter : shaka.extern.ResponseFilter ) : any ;
1146
+ /**
1147
+ * Makes a network request and returns the resulting data.
1148
+ */
1149
+ request (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : shaka.net.NetworkingEngine.PendingRequest ;
1150
+ setForceHTTPS (forceHTTPS : boolean ) : any ;
1151
+ /**
1152
+ * Removes a request filter.
1153
+ */
1154
+ unregisterRequestFilter (filter : shaka.extern.RequestFilter ) : any ;
1155
+ /**
1156
+ * Removes a response filter.
1157
+ */
1158
+ unregisterResponseFilter (filter : shaka.extern.ResponseFilter ) : any ;
1159
+ /**
1160
+ * Gets a copy of the default retry parameters.
1161
+ */
1162
+ static defaultRetryParameters ( ) : shaka.extern.RetryParameters ;
1163
+ /**
1164
+ * Makes a simple network request for the given URIs.
1165
+ */
1166
+ static makeRequest (uris : string [] , retryParams : shaka.extern.RetryParameters , streamDataCallback ? : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null ) : shaka.extern.Request ;
1167
+ /**
1168
+ * Registers a scheme plugin. This plugin will handle all requests with the
1169
+ * given scheme. If a plugin with the same scheme already exists, it is
1170
+ * replaced, unless the existing plugin is of higher priority.
1171
+ * If no priority is provided, this defaults to the highest priority of
1172
+ * APPLICATION.
1173
+ */
1174
+ static registerScheme (scheme : string , plugin : shaka.extern.SchemePlugin , priority ? : number , progressSupport ? : boolean ) : any ;
1175
+ /**
1176
+ * Removes a scheme plugin.
1177
+ */
1178
+ static unregisterScheme (scheme : string ) : any ;
1179
+ }
1180
+ }
1181
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1182
+ declare namespace shaka.net.NetworkingEngine {
1183
+ /**
1184
+ * A more advanced form of the RequestType structure, meant to describe
1185
+ * sub-types of basic request types.
1186
+ * For example, an INIT_SEGMENT is a sub-type of SEGMENT.
1187
+ * This is meant to allow for more specificity to be added to the request type
1188
+ * data, without breaking backwards compatibility.
1189
+ */
1190
+ /**
1191
+ * A more advanced form of the RequestType structure, meant to describe
1192
+ * sub-types of basic request types.
1193
+ * For example, an INIT_SEGMENT is a sub-type of SEGMENT.
1194
+ * This is meant to allow for more specificity to be added to the request type
1195
+ * data, without breaking backwards compatibility.
1196
+ */
1197
+ enum AdvancedRequestType {
1198
+ INIT_SEGMENT = 0.0 ,
1199
+ MASTER_PLAYLIST = 3.0 ,
1200
+ MEDIA_PLAYLIST = 2.0 ,
1201
+ MEDIA_SEGMENT = 1.0 ,
1202
+ MPD = 4.0 ,
1203
+ MSS = 5.0 ,
1204
+ }
1205
+ }
1206
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1207
+ declare namespace shaka.net.NetworkingEngine {
1208
+ /**
1209
+ * A wrapper class for the number of bytes remaining to be downloaded for the
1210
+ * request.
1211
+ * Instead of using PendingRequest directly, this class is needed to be sent to
1212
+ * plugin as a parameter, and a Promise is returned, before PendingRequest is
1213
+ * created.
1214
+ */
1215
+ class NumBytesRemainingClass {
1216
+ private noStructuralTyping_shaka_net_NetworkingEngine_NumBytesRemainingClass : any;
1217
+ }
1218
+ }
1219
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1220
+ declare namespace shaka.net.NetworkingEngine {
1221
+ type OnDownloadFailed = (a : shaka.extern.Request , b : shaka.util.Error | null , c : number , d : boolean ) => any ;
1222
+ }
1223
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1224
+ declare namespace shaka.net.NetworkingEngine {
1225
+ type OnHeadersReceived = (a : { [ key: string ]: string } , b : shaka.extern.Request , c : shaka.net.NetworkingEngine.RequestType ) => any ;
1226
+ }
1227
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1228
+ declare namespace shaka.net.NetworkingEngine {
1229
+ type OnRequest = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Request , c : shaka.extern.RequestContext | undefined ) => any ;
1230
+ }
1231
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1232
+ declare namespace shaka.net.NetworkingEngine {
1233
+ type OnResponse = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Response , c : shaka.extern.RequestContext | undefined ) => any ;
1234
+ }
1235
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1236
+ declare namespace shaka.net.NetworkingEngine {
1237
+ type OnRetry = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.RequestContext | undefined , c : string , d : string ) => any ;
1238
+ }
1239
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1240
+ declare namespace shaka.net.NetworkingEngine {
1241
+ /**
1242
+ * A pending network request. This can track the current progress of the
1243
+ * download, and allows the request to be aborted if the network is slow.
1244
+ */
1245
+ class PendingRequest extends shaka.util.AbortableOperation < any > implements shaka.extern.IAbortableOperation < any > {
1246
+ private noStructuralTyping_shaka_net_NetworkingEngine_PendingRequest : any;
1247
+ /**
1248
+ * A pending network request. This can track the current progress of the
1249
+ * download, and allows the request to be aborted if the network is slow.
1250
+ */
1251
+ constructor (promise : Promise < any > , onAbort : shaka.extern.CreateSegmentIndexFunction , numBytesRemainingObj : shaka.net.NetworkingEngine.NumBytesRemainingClass | null ) ;
1252
+ }
1253
+ }
1254
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1255
+ declare namespace shaka.net.NetworkingEngine {
1256
+ /**
1257
+ * Priority level for network scheme plugins.
1258
+ * If multiple plugins are provided for the same scheme, only the
1259
+ * highest-priority one is used.
1260
+ */
1261
+ /**
1262
+ * Priority level for network scheme plugins.
1263
+ * If multiple plugins are provided for the same scheme, only the
1264
+ * highest-priority one is used.
1265
+ */
1266
+ enum PluginPriority {
1267
+ APPLICATION = 3.0 ,
1268
+ FALLBACK = 1.0 ,
1269
+ PREFERRED = 2.0 ,
1270
+ }
1271
+ }
1272
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1273
+ declare namespace shaka.net.NetworkingEngine {
1274
+ /**
1275
+ * Request types. Allows a filter to decide which requests to read/alter.
1276
+ */
1277
+ /**
1278
+ * Request types. Allows a filter to decide which requests to read/alter.
1279
+ */
1280
+ enum RequestType {
1281
+ ADS = 7.0 ,
1282
+ APP = 3.0 ,
1283
+ CONTENT_STEERING = 8.0 ,
1284
+ KEY = 6.0 ,
1285
+ LICENSE = 2.0 ,
1286
+ MANIFEST = 0.0 ,
1287
+ SEGMENT = 1.0 ,
1288
+ SERVER_CERTIFICATE = 5.0 ,
1289
+ TIMING = 4.0 ,
1290
+ }
1291
+ }
1292
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1293
+ declare namespace shaka.net.NetworkingEngine {
1294
+ type onProgressUpdated = (a : number , b : number , c : boolean , d ? : shaka.extern.Request ) => any ;
1295
+ }
1296
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1297
+ declare namespace shaka {
1298
+ class polyfill {
1299
+ private noStructuralTyping_shaka_polyfill : any;
1300
+ /**
1301
+ * Install all polyfills.
1302
+ */
1303
+ static installAll ( ) : any ;
1304
+ /**
1305
+ * Registers a new polyfill to be installed.
1306
+ * @param priority An optional number priority. Higher priorities will be executed before lower priority ones. Default is 0.
1307
+ */
1308
+ static register (polyfill : ( ) => any , priority ? : number ) : any ;
1309
+ }
1310
+ }
1311
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1312
+ declare namespace shaka.text {
1313
+ class Cue {
1314
+ private noStructuralTyping_shaka_text_Cue : any;
1315
+ constructor (startTime : number , endTime : number , payload : string ) ;
1316
+ /**
1317
+ * Text background color as a CSS color, e.g. "#FFFFFF" or "white".
1318
+ */
1319
+ backgroundColor : string ;
1320
+ /**
1321
+ * The URL of the background image, e.g. "data:[mime type];base64,[data]".
1322
+ */
1323
+ backgroundImage : string ;
1324
+ /**
1325
+ * The border around this cue as a CSS border.
1326
+ */
1327
+ border : string ;
1328
+ /**
1329
+ * The number of horizontal and vertical cells into which the Root Container
1330
+ * Region area is divided.
1331
+ */
1332
+ cellResolution : { columns : number , rows : number } ;
1333
+ /**
1334
+ * Text color as a CSS color, e.g. "#FFFFFF" or "white".
1335
+ */
1336
+ color : string ;
1337
+ /**
1338
+ * Text direction of the cue.
1339
+ */
1340
+ direction : shaka.text.Cue.direction ;
1341
+ /**
1342
+ * Vertical alignments of the cues within their extents.
1343
+ * 'BEFORE' means displaying the captions at the top of the text display
1344
+ * container box, 'CENTER' means in the middle, 'AFTER' means at the bottom.
1345
+ */
1346
+ displayAlign : shaka.text.Cue.displayAlign ;
1347
+ /**
1348
+ * The end time of the cue in seconds, relative to the start of the
1349
+ * presentation.
1350
+ */
1351
+ endTime : number ;
1352
+ /**
1353
+ * Text font family.
1354
+ */
1355
+ fontFamily : string ;
1356
+ /**
1357
+ * Text font size in px or em (e.g. '100px'/'100em').
1358
+ */
1359
+ fontSize : string ;
1360
+ /**
1361
+ * Text font style. Normal, italic or oblique.
1362
+ */
1363
+ fontStyle : shaka.text.Cue.fontStyle ;
1364
+ /**
1365
+ * Text font weight. Either normal or bold.
1366
+ */
1367
+ fontWeight : shaka.text.Cue.fontWeight ;
1368
+ /**
1369
+ * Id of the cue.
1370
+ */
1371
+ id : string ;
1372
+ /**
1373
+ * If true, this represents a container element that is "above" the main
1374
+ * cues. For example, the <body> and <div> tags that contain the <p> tags
1375
+ * in a TTML file. This controls the flow of the final cues; any nested cues
1376
+ * within an "isContainer" cue will be laid out as separate lines.
1377
+ */
1378
+ isContainer : boolean ;
1379
+ /**
1380
+ * Text letter spacing as a CSS letter-spacing value.
1381
+ */
1382
+ letterSpacing : string ;
1383
+ /**
1384
+ * The offset from the display box in either number of lines or
1385
+ * percentage depending on the value of lineInterpretation.
1386
+ */
1387
+ line : number | null ;
1388
+ /**
1389
+ * Line alignment of the cue box.
1390
+ * Start alignment means the cue box’s top side (for horizontal cues), left
1391
+ * side (for vertical growing right), or right side (for vertical growing
1392
+ * left) is aligned at the line.
1393
+ * Center alignment means the cue box is centered at the line.
1394
+ * End alignment The cue box’s bottom side (for horizontal cues), right side
1395
+ * (for vertical growing right), or left side (for vertical growing left) is
1396
+ * aligned at the line.
1397
+ */
1398
+ lineAlign : shaka.text.Cue.lineAlign ;
1399
+ /**
1400
+ * Whether or not the cue only acts as a line break between two nested cues.
1401
+ * Should only appear in nested cues.
1402
+ */
1403
+ lineBreak : boolean ;
1404
+ /**
1405
+ * Separation between line areas inside the cue box in px or em
1406
+ * (e.g. '100px'/'100em'). If not specified, this should be no less than
1407
+ * the largest font size applied to the text in the cue.
1408
+ */
1409
+ lineHeight : string ;
1410
+ /**
1411
+ * The way to interpret line field. (Either as an integer line number or
1412
+ * percentage from the display box).
1413
+ */
1414
+ lineInterpretation : shaka.text.Cue.lineInterpretation ;
1415
+ /**
1416
+ * Text line padding as a CSS line-padding value.
1417
+ */
1418
+ linePadding : string ;
1419
+ /**
1420
+ * Nested cues, which should be laid out horizontally in one block.
1421
+ * Top-level cues are blocks, and nested cues are inline elements.
1422
+ * Cues can be nested arbitrarily deeply.
1423
+ */
1424
+ nestedCues : shaka.text.Cue [] ;
1425
+ /**
1426
+ * Opacity of the cue element, from 0-1.
1427
+ */
1428
+ opacity : number ;
1429
+ /**
1430
+ * The text payload of the cue. If nestedCues is non-empty, this should be
1431
+ * empty. Top-level block containers should have no payload of their own.
1432
+ */
1433
+ payload : string ;
1434
+ /**
1435
+ * The indent (in percent) of the cue box in the direction defined by the
1436
+ * writing direction.
1437
+ */
1438
+ position : number | null ;
1439
+ /**
1440
+ * Position alignment of the cue.
1441
+ */
1442
+ positionAlign : shaka.text.Cue.positionAlign ;
1443
+ /**
1444
+ * The region to render the cue into. Only supported on top-level cues,
1445
+ * because nested cues are inline elements.
1446
+ */
1447
+ region : shaka.text.CueRegion | null ;
1448
+ /**
1449
+ * Used to indicate the type of ruby tag that should be used when rendering
1450
+ * the cue. Valid values: ruby, rp, rt.
1451
+ */
1452
+ rubyTag : string | null ;
1453
+ /**
1454
+ * Size of the cue box (in percents), where 0 means "auto".
1455
+ */
1456
+ size : number ;
1457
+ /**
1458
+ * The start time of the cue in seconds, relative to the start of the
1459
+ * presentation.
1460
+ */
1461
+ startTime : number ;
1462
+ /**
1463
+ * Alignment of the text inside the cue box.
1464
+ */
1465
+ textAlign : shaka.text.Cue.textAlign ;
1466
+ /**
1467
+ * Text combine upright as a CSS text-combine-upright value.
1468
+ */
1469
+ textCombineUpright : string ;
1470
+ /**
1471
+ * Text decoration. A combination of underline, overline
1472
+ * and line through. Empty array means no decoration.
1473
+ */
1474
+ textDecoration : shaka.text.Cue.textDecoration [] ;
1475
+ /**
1476
+ * Text shadow color as a CSS text-shadow value.
1477
+ */
1478
+ textShadow : string ;
1479
+ /**
1480
+ * Text stroke color as a CSS color, e.g. "#FFFFFF" or "white".
1481
+ */
1482
+ textStrokeColor : string ;
1483
+ /**
1484
+ * Text stroke width as a CSS stroke-width value.
1485
+ */
1486
+ textStrokeWidth : string ;
1487
+ /**
1488
+ * Whether or not line wrapping should be applied to the cue.
1489
+ */
1490
+ wrapLine : boolean ;
1491
+ /**
1492
+ * Text writing mode of the cue.
1493
+ */
1494
+ writingMode : shaka.text.Cue.writingMode ;
1495
+ }
1496
+ }
1497
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1498
+ declare namespace shaka.text.Cue {
1499
+ /**
1500
+ * Default text background color according to
1501
+ * https://w3c.github.io/webvtt/#default-text-background
1502
+ */
1503
+ /**
1504
+ * Default text background color according to
1505
+ * https://w3c.github.io/webvtt/#default-text-background
1506
+ */
1507
+ enum defaultTextBackgroundColor {
1508
+ bg_black = 'black' ,
1509
+ bg_blue = 'blue' ,
1510
+ bg_cyan = 'cyan' ,
1511
+ bg_lime = 'lime' ,
1512
+ bg_magenta = 'magenta' ,
1513
+ bg_red = 'red' ,
1514
+ bg_white = 'white' ,
1515
+ bg_yellow = 'yellow' ,
1516
+ }
1517
+ }
1518
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1519
+ declare namespace shaka.text.Cue {
1520
+ /**
1521
+ * Default text color according to
1522
+ * https://w3c.github.io/webvtt/#default-text-color
1523
+ */
1524
+ /**
1525
+ * Default text color according to
1526
+ * https://w3c.github.io/webvtt/#default-text-color
1527
+ */
1528
+ enum defaultTextColor {
1529
+ black = 'black' ,
1530
+ blue = 'blue' ,
1531
+ cyan = 'cyan' ,
1532
+ lime = 'lime' ,
1533
+ magenta = 'magenta' ,
1534
+ red = 'red' ,
1535
+ white = 'white' ,
1536
+ yellow = 'yellow' ,
1537
+ }
1538
+ }
1539
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1540
+ declare namespace shaka.text.Cue {
1541
+ enum direction {
1542
+ HORIZONTAL_LEFT_TO_RIGHT = 'ltr' ,
1543
+ HORIZONTAL_RIGHT_TO_LEFT = 'rtl' ,
1544
+ }
1545
+ }
1546
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1547
+ declare namespace shaka.text.Cue {
1548
+ /**
1549
+ * Vertical alignments of the cues within their extents.
1550
+ * 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
1551
+ * means in the middle, 'AFTER' means at the bottom.
1552
+ */
1553
+ /**
1554
+ * Vertical alignments of the cues within their extents.
1555
+ * 'BEFORE' means displaying at the top of the captions container box, 'CENTER'
1556
+ * means in the middle, 'AFTER' means at the bottom.
1557
+ */
1558
+ enum displayAlign {
1559
+ AFTER = 'after' ,
1560
+ BEFORE = 'before' ,
1561
+ CENTER = 'center' ,
1562
+ }
1563
+ }
1564
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1565
+ declare namespace shaka.text.Cue {
1566
+ enum fontStyle {
1567
+ ITALIC = 'italic' ,
1568
+ NORMAL = 'normal' ,
1569
+ OBLIQUE = 'oblique' ,
1570
+ }
1571
+ }
1572
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1573
+ declare namespace shaka.text.Cue {
1574
+ /**
1575
+ * In CSS font weight can be a number, where 400 is normal and 700 is bold.
1576
+ * Use these values for the enum for consistency.
1577
+ */
1578
+ /**
1579
+ * In CSS font weight can be a number, where 400 is normal and 700 is bold.
1580
+ * Use these values for the enum for consistency.
1581
+ */
1582
+ enum fontWeight {
1583
+ BOLD = 700.0 ,
1584
+ NORMAL = 400.0 ,
1585
+ }
1586
+ }
1587
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1588
+ declare namespace shaka.text.Cue {
1589
+ enum lineAlign {
1590
+ CENTER = 'center' ,
1591
+ END = 'end' ,
1592
+ START = 'start' ,
1593
+ }
1594
+ }
1595
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1596
+ declare namespace shaka.text.Cue {
1597
+ enum lineInterpretation {
1598
+ LINE_NUMBER = 0.0 ,
1599
+ PERCENTAGE = 1.0 ,
1600
+ }
1601
+ }
1602
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1603
+ declare namespace shaka.text.Cue {
1604
+ enum positionAlign {
1605
+ AUTO = 'auto' ,
1606
+ CENTER = 'center' ,
1607
+ LEFT = 'line-left' ,
1608
+ RIGHT = 'line-right' ,
1609
+ }
1610
+ }
1611
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1612
+ declare namespace shaka.text.Cue {
1613
+ enum textAlign {
1614
+ CENTER = 'center' ,
1615
+ END = 'end' ,
1616
+ LEFT = 'left' ,
1617
+ RIGHT = 'right' ,
1618
+ START = 'start' ,
1619
+ }
1620
+ }
1621
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1622
+ declare namespace shaka.text.Cue {
1623
+ enum textDecoration {
1624
+ LINE_THROUGH = 'lineThrough' ,
1625
+ OVERLINE = 'overline' ,
1626
+ UNDERLINE = 'underline' ,
1627
+ }
1628
+ }
1629
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1630
+ declare namespace shaka.text.Cue {
1631
+ enum writingMode {
1632
+ HORIZONTAL_TOP_TO_BOTTOM = 'horizontal-tb' ,
1633
+ VERTICAL_LEFT_TO_RIGHT = 'vertical-lr' ,
1634
+ VERTICAL_RIGHT_TO_LEFT = 'vertical-rl' ,
1635
+ }
1636
+ }
1637
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1638
+ declare namespace shaka.text {
1639
+ class CueRegion {
1640
+ private noStructuralTyping_shaka_text_CueRegion : any;
1641
+ /**
1642
+ * The width of the rendering area in heightUnits.
1643
+ */
1644
+ height : number ;
1645
+ /**
1646
+ * The units (percentage, pixels or lines) the region height is in.
1647
+ */
1648
+ heightUnits : shaka.text.CueRegion.units ;
1649
+ /**
1650
+ * Region identifier.
1651
+ */
1652
+ id : string ;
1653
+ /**
1654
+ * The X offset to start the rendering area in percentage (0-100) of this
1655
+ * region width.
1656
+ */
1657
+ regionAnchorX : number ;
1658
+ /**
1659
+ * The Y offset to start the rendering area in percentage (0-100) of the
1660
+ * region height.
1661
+ */
1662
+ regionAnchorY : number ;
1663
+ /**
1664
+ * If scroll=UP, it means that cues in the region will be added to the
1665
+ * bottom of the region and will push any already displayed cues in the
1666
+ * region up. Otherwise (scroll=NONE) cues will stay fixed at the location
1667
+ * they were first painted in.
1668
+ */
1669
+ scroll : shaka.text.CueRegion.scrollMode ;
1670
+ /**
1671
+ * The units (percentage or pixels) the region viewportAnchors are in.
1672
+ */
1673
+ viewportAnchorUnits : shaka.text.CueRegion.units ;
1674
+ /**
1675
+ * The X offset to start the rendering area in viewportAnchorUnits of the
1676
+ * video width.
1677
+ */
1678
+ viewportAnchorX : number ;
1679
+ /**
1680
+ * The X offset to start the rendering area in viewportAnchorUnits of the
1681
+ * video height.
1682
+ */
1683
+ viewportAnchorY : number ;
1684
+ /**
1685
+ * The width of the rendering area in widthUnits.
1686
+ */
1687
+ width : number ;
1688
+ /**
1689
+ * The units (percentage or pixels) the region width is in.
1690
+ */
1691
+ widthUnits : shaka.text.CueRegion.units ;
1692
+ }
1693
+ }
1694
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1695
+ declare namespace shaka.text.CueRegion {
1696
+ enum scrollMode {
1697
+ NONE = '' ,
1698
+ UP = 'up' ,
1699
+ }
1700
+ }
1701
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1702
+ declare namespace shaka.text.CueRegion {
1703
+ enum units {
1704
+ LINES = 2.0 ,
1705
+ PERCENTAGE = 1.0 ,
1706
+ PX = 0.0 ,
1707
+ }
1708
+ }
1709
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1710
+ declare namespace shaka.text {
1711
+ /**
1712
+ * A text displayer plugin using the browser's native VTTCue interface.
1713
+ */
1714
+ class SimpleTextDisplayer implements shaka.extern.TextDisplayer {
1715
+ private noStructuralTyping_shaka_text_SimpleTextDisplayer : any;
1716
+ /**
1717
+ * A text displayer plugin using the browser's native VTTCue interface.
1718
+ */
1719
+ constructor (video : HTMLMediaElement | null , label : string ) ;
1720
+ append (cues : any ) : any ;
1721
+ configure (config : any ) : any ;
1722
+ destroy ( ) : any ;
1723
+ isTextVisible ( ) : any ;
1724
+ remove (start : any , end : any ) : any ;
1725
+ setTextVisibility (on : any ) : any ;
1726
+ }
1727
+ }
1728
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1729
+ declare namespace shaka.text {
1730
+ /**
1731
+ * A stub text displayer plugin that does nothing
1732
+ */
1733
+ class StubTextDisplayer implements shaka.extern.TextDisplayer {
1734
+ private noStructuralTyping_shaka_text_StubTextDisplayer : any;
1735
+ append (cues : any ) : any ;
1736
+ configure (config : any ) : any ;
1737
+ destroy ( ) : any ;
1738
+ isTextVisible ( ) : any ;
1739
+ remove (start : any , end : any ) : any ;
1740
+ setTextVisibility (on : any ) : any ;
1741
+ }
1742
+ }
1743
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1744
+ declare namespace shaka.text {
1745
+ class TextEngine implements shaka.util.IDestroyable {
1746
+ private noStructuralTyping_shaka_text_TextEngine : any;
1747
+ constructor (displayer : shaka.extern.TextDisplayer | null ) ;
1748
+ destroy ( ) : Promise < any > ;
1749
+ static findParser (mimeType : any ) : ( shaka.extern.TextParserPlugin ) | null ;
1750
+ static registerParser (mimeType : string , plugin : shaka.extern.TextParserPlugin ) : any ;
1751
+ static unregisterParser (mimeType : string ) : any ;
1752
+ }
1753
+ }
1754
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1755
+ declare namespace shaka.text {
1756
+ /**
1757
+ * The text displayer plugin for the Shaka Player UI. Can also be used directly
1758
+ * by providing an appropriate container element.
1759
+ */
1760
+ class UITextDisplayer implements shaka.extern.TextDisplayer {
1761
+ private noStructuralTyping_shaka_text_UITextDisplayer : any;
1762
+ /**
1763
+ * The text displayer plugin for the Shaka Player UI. Can also be used directly
1764
+ * by providing an appropriate container element.
1765
+ */
1766
+ constructor (video : HTMLMediaElement | null , videoContainer : HTMLElement | null , config : shaka.extern.TextDisplayerConfiguration ) ;
1767
+ append (cues : any ) : any ;
1768
+ configure (config : any ) : any ;
1769
+ destroy ( ) : any ;
1770
+ isTextVisible ( ) : any ;
1771
+ remove (start : any , end : any ) : any ;
1772
+ setTextVisibility (on : any ) : any ;
1773
+ }
1774
+ }
1775
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1776
+ declare namespace shaka.text {
1777
+ class WebVttGenerator {
1778
+ private noStructuralTyping_shaka_text_WebVttGenerator : any;
1779
+ }
1780
+ }
1781
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1782
+ declare namespace shaka.transmuxer {
1783
+ class TransmuxerEngine implements shaka.util.IDestroyable {
1784
+ private noStructuralTyping_shaka_transmuxer_TransmuxerEngine : any;
1785
+ destroy ( ) : Promise < any > ;
1786
+ static findTransmuxer (mimeType : string , contentType ? : string ) : ( shaka.extern.TransmuxerPlugin ) | null ;
1787
+ static registerTransmuxer (mimeType : string , plugin : shaka.extern.TransmuxerPlugin , priority : number ) : any ;
1788
+ static unregisterTransmuxer (mimeType : string , priority : number ) : any ;
1789
+ }
1790
+ }
1791
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1792
+ declare namespace shaka.transmuxer.TransmuxerEngine {
1793
+ /**
1794
+ * Priority level for transmuxer plugins.
1795
+ * If multiple plugins are provided for the same mime type, only the
1796
+ * highest-priority one is used.
1797
+ */
1798
+ /**
1799
+ * Priority level for transmuxer plugins.
1800
+ * If multiple plugins are provided for the same mime type, only the
1801
+ * highest-priority one is used.
1802
+ */
1803
+ enum PluginPriority {
1804
+ APPLICATION = 4.0 ,
1805
+ FALLBACK = 1.0 ,
1806
+ PREFERRED = 3.0 ,
1807
+ PREFERRED_SECONDARY = 2.0 ,
1808
+ }
1809
+ }
1810
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1811
+ declare namespace shaka.util {
1812
+ /**
1813
+ * A utility to wrap abortable operations. Note that these are not cancelable.
1814
+ * Cancelation implies undoing what has been done so far, whereas aborting only
1815
+ * means that further work is stopped.
1816
+ */
1817
+ class AbortableOperation < T > implements shaka.extern.IAbortableOperation < T > {
1818
+ private noStructuralTyping_shaka_util_AbortableOperation : any;
1819
+ /**
1820
+ * A utility to wrap abortable operations. Note that these are not cancelable.
1821
+ * Cancelation implies undoing what has been done so far, whereas aborting only
1822
+ * means that further work is stopped.
1823
+ */
1824
+ constructor (promise : Promise < T > , onAbort : shaka.extern.CreateSegmentIndexFunction ) ;
1825
+ abort ( ) : any ;
1826
+ chain < U > (onSuccess : undefined | Function , onError ? : (a : any ) => any ) : shaka.util.AbortableOperation < U > ;
1827
+ finally (onFinal : any ) : any ;
1828
+ promise : Promise < T > ;
1829
+ static aborted ( ) : shaka.util.AbortableOperation < any > ;
1830
+ static all (operations : shaka.util.AbortableOperation < any > [] ) : shaka.util.AbortableOperation < any > ;
1831
+ static completed < U > (value : U ) : shaka.util.AbortableOperation < U > ;
1832
+ static failed (error : shaka.util.Error ) : shaka.util.AbortableOperation < any > ;
1833
+ static notAbortable < U > (promise : Promise < U > ) : shaka.util.AbortableOperation < U > ;
1834
+ }
1835
+ }
1836
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1837
+ declare namespace shaka.util {
1838
+ class BufferUtils {
1839
+ private noStructuralTyping_shaka_util_BufferUtils : any;
1840
+ /**
1841
+ * Compare two buffers for equality. For buffers of different types, this
1842
+ * compares the underlying buffers as binary data.
1843
+ */
1844
+ static equal (arr1 : ArrayBuffer | ArrayBufferView | null , arr2 : ArrayBuffer | ArrayBufferView | null ) : boolean ;
1845
+ /**
1846
+ * Gets an ArrayBuffer that contains the data from the given TypedArray. Note
1847
+ * this will allocate a new ArrayBuffer if the object is a partial view of
1848
+ * the data.
1849
+ */
1850
+ static toArrayBuffer (view : ArrayBuffer | ArrayBufferView ) : ArrayBuffer ;
1851
+ /**
1852
+ * Creates a DataView over the given buffer.
1853
+ */
1854
+ static toDataView (buffer : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : DataView ;
1855
+ /**
1856
+ * Creates a new Uint16Array view on the same buffer. This clamps the values
1857
+ * to be within the same view (i.e. you can't use this to move past the end
1858
+ * of the view, even if the underlying buffer is larger). However, you can
1859
+ * pass a negative offset to access the data before the view.
1860
+ * @param offset The offset from the beginning of this data's view to start the new view at.
1861
+ * @param length The byte length of the new view.
1862
+ */
1863
+ static toUint16 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint16Array ;
1864
+ /**
1865
+ * Creates a new Uint8Array view on the same buffer. This clamps the values
1866
+ * to be within the same view (i.e. you can't use this to move past the end
1867
+ * of the view, even if the underlying buffer is larger). However, you can
1868
+ * pass a negative offset to access the data before the view.
1869
+ * @param offset The offset from the beginning of this data's view to start the new view at.
1870
+ * @param length The byte length of the new view.
1871
+ */
1872
+ static toUint8 (data : ArrayBuffer | ArrayBufferView , offset ? : number , length ? : number ) : Uint8Array ;
1873
+ }
1874
+ }
1875
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1876
+ declare namespace shaka.util.CmcdManager {
1877
+ enum StreamingFormat {
1878
+ DASH = 'd' ,
1879
+ HLS = 'h' ,
1880
+ OTHER = 'o' ,
1881
+ SMOOTH = 's' ,
1882
+ }
1883
+ }
1884
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1885
+ declare namespace shaka.util {
1886
+ class CmsdManager {
1887
+ private noStructuralTyping_shaka_util_CmsdManager : any;
1888
+ constructor (config : shaka.extern.CmsdConfiguration ) ;
1889
+ /**
1890
+ * Gets the current bandwidth estimate.
1891
+ */
1892
+ getBandwidthEstimate (defaultEstimate : number ) : number ;
1893
+ /**
1894
+ * Returns the estimated throughput in bits per second. If there is no
1895
+ * estimated throughput or it's not enabled, it returns null.
1896
+ */
1897
+ getEstimatedThroughput ( ) : number | null ;
1898
+ /**
1899
+ * Returns the max bitrate in bits per second. If there is no max bitrate or
1900
+ * it's not enabled, it returns null.
1901
+ */
1902
+ getMaxBitrate ( ) : number | null ;
1903
+ /**
1904
+ * Returns the response delay in milliseconds. If there is no response delay
1905
+ * or it's not enabled, it returns null.
1906
+ */
1907
+ getResponseDelay ( ) : number | null ;
1908
+ /**
1909
+ * Returns the RTT in milliseconds. If there is no RTT or it's not enabled,
1910
+ * it returns null.
1911
+ */
1912
+ getRoundTripTime ( ) : number | null ;
1913
+ }
1914
+ }
1915
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1916
+ declare namespace shaka.util {
1917
+ class ConfigUtils {
1918
+ private noStructuralTyping_shaka_util_ConfigUtils : any;
1919
+ /**
1920
+ * Convert config from ('fieldName', value) format to a partial config object.
1921
+ * E. g. from ('manifest.retryParameters.maxAttempts', 1) to
1922
+ * { manifest: { retryParameters: { maxAttempts: 1 }}}.
1923
+ */
1924
+ static convertToConfigObject (fieldName : string , value : any ) : object ;
1925
+ static mergeConfigObjects (destination : object , source : object , template : object , overrides : object , path : string ) : boolean ;
1926
+ }
1927
+ }
1928
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1929
+ declare namespace shaka.util {
1930
+ class DataViewReader {
1931
+ private noStructuralTyping_shaka_util_DataViewReader : any;
1932
+ constructor (data : ArrayBuffer | ArrayBufferView , endianness : shaka.util.DataViewReader.Endianness ) ;
1933
+ /**
1934
+ * Gets the byte length of the DataView.
1935
+ */
1936
+ getLength ( ) : number ;
1937
+ /**
1938
+ * Gets the current byte position.
1939
+ */
1940
+ getPosition ( ) : number ;
1941
+ hasMoreData ( ) : boolean ;
1942
+ /**
1943
+ * Reads the specified number of raw bytes.
1944
+ * @param bytes The number of bytes to read.
1945
+ */
1946
+ readBytes (bytes : number ) : Uint8Array ;
1947
+ /**
1948
+ * Reads a signed 32 bit integer, and advances the reader.
1949
+ */
1950
+ readInt32 ( ) : number ;
1951
+ /**
1952
+ * Keeps reading until it reaches a byte that equals to zero. The text is
1953
+ * assumed to be UTF-8.
1954
+ */
1955
+ readTerminatedString ( ) : string ;
1956
+ /**
1957
+ * Reads an unsigned 16 bit integer, and advances the reader.
1958
+ */
1959
+ readUint16 ( ) : number ;
1960
+ /**
1961
+ * Reads an unsigned 32 bit integer, and advances the reader.
1962
+ */
1963
+ readUint32 ( ) : number ;
1964
+ /**
1965
+ * Reads an unsigned 64 bit integer, and advances the reader.
1966
+ */
1967
+ readUint64 ( ) : number ;
1968
+ /**
1969
+ * Reads an unsigned 8 bit integer, and advances the reader.
1970
+ */
1971
+ readUint8 ( ) : number ;
1972
+ /**
1973
+ * Rewinds the specified number of bytes.
1974
+ * @param bytes The number of bytes to rewind.
1975
+ */
1976
+ rewind (bytes : number ) : any ;
1977
+ /**
1978
+ * Seeks to a specified position.
1979
+ * @param position The desired byte position within the DataView.
1980
+ */
1981
+ seek (position : number ) : any ;
1982
+ /**
1983
+ * Skips the specified number of bytes.
1984
+ * @param bytes The number of bytes to skip.
1985
+ */
1986
+ skip (bytes : number ) : any ;
1987
+ }
1988
+ }
1989
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
1990
+ declare namespace shaka.util.DataViewReader {
1991
+ /**
1992
+ * Endianness.
1993
+ */
1994
+ /**
1995
+ * Endianness.
1996
+ */
1997
+ enum Endianness {
1998
+ BIG_ENDIAN = 0.0 ,
1999
+ LITTLE_ENDIAN = 1.0 ,
2000
+ }
2001
+ }
2002
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2003
+ declare namespace shaka.util {
2004
+ class Dom {
2005
+ private noStructuralTyping_shaka_util_Dom : any;
2006
+ /**
2007
+ * Remove all of the child nodes of an element.
2008
+ */
2009
+ static removeAllChildren (element : Element ) : any ;
2010
+ }
2011
+ }
2012
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2013
+ declare namespace shaka.util {
2014
+ class Error extends GlobalError implements shaka.extern.Error {
2015
+ private noStructuralTyping_shaka_util_Error : any;
2016
+ constructor (severity : shaka.util.Error.Severity , category : shaka.util.Error.Category , code : shaka.util.Error.Code , ...varArgs : any [] ) ;
2017
+ category : any ;
2018
+ code : any ;
2019
+ data : any ;
2020
+ handled : any ;
2021
+ severity : any ;
2022
+ }
2023
+ }
2024
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2025
+ declare namespace shaka.util.Error {
2026
+ enum Category {
2027
+ ADS = 10.0 ,
2028
+ CAST = 8.0 ,
2029
+ DRM = 6.0 ,
2030
+ MANIFEST = 4.0 ,
2031
+ MEDIA = 3.0 ,
2032
+ NETWORK = 1.0 ,
2033
+ PLAYER = 7.0 ,
2034
+ STORAGE = 9.0 ,
2035
+ STREAMING = 5.0 ,
2036
+ TEXT = 2.0 ,
2037
+ }
2038
+ }
2039
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2040
+ declare namespace shaka.util.Error {
2041
+ enum Code {
2042
+ AES_128_INVALID_IV_LENGTH = 4048.0 ,
2043
+ AES_128_INVALID_KEY_LENGTH = 4049.0 ,
2044
+ ALREADY_CASTING = 8002.0 ,
2045
+ ATTEMPTS_EXHAUSTED = 1010.0 ,
2046
+ BAD_ENCODING = 2004.0 ,
2047
+ BAD_HTTP_STATUS = 1001.0 ,
2048
+ BUFFER_READ_OUT_OF_BOUNDS = 3000.0 ,
2049
+ CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM = 4033.0 ,
2050
+ CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS = 2012.0 ,
2051
+ CANNOT_ADD_EXTERNAL_THUMBNAILS_TO_LIVE_STREAM = 4045.0 ,
2052
+ CANNOT_STORE_LIVE_OFFLINE = 9005.0 ,
2053
+ CAST_API_UNAVAILABLE = 8000.0 ,
2054
+ CAST_CANCELED_BY_USER = 8004.0 ,
2055
+ CAST_CONNECTION_TIMED_OUT = 8005.0 ,
2056
+ CAST_RECEIVER_APP_UNAVAILABLE = 8006.0 ,
2057
+ CHAPTERS_TRACK_FAILED = 2015.0 ,
2058
+ CONTENT_NOT_LOADED = 7004.0 ,
2059
+ CONTENT_TRANSFORMATION_FAILED = 3019.0 ,
2060
+ CONTENT_UNSUPPORTED_BY_BROWSER = 4032.0 ,
2061
+ CS_AD_MANAGER_NOT_INITIALIZED = 10001.0 ,
2062
+ CS_IMA_SDK_MISSING = 10000.0 ,
2063
+ CURRENT_DAI_REQUEST_NOT_FINISHED = 10004.0 ,
2064
+ DASH_CONFLICTING_AES_128 = 4050.0 ,
2065
+ DASH_CONFLICTING_KEY_IDS = 4010.0 ,
2066
+ DASH_DUPLICATE_REPRESENTATION_ID = 4018.0 ,
2067
+ DASH_EMPTY_ADAPTATION_SET = 4003.0 ,
2068
+ DASH_EMPTY_PERIOD = 4004.0 ,
2069
+ DASH_INVALID_XML = 4001.0 ,
2070
+ DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED = 4009.0 ,
2071
+ DASH_NO_COMMON_KEY_SYSTEM = 4008.0 ,
2072
+ DASH_NO_SEGMENT_INFO = 4002.0 ,
2073
+ DASH_PSSH_BAD_ENCODING = 4007.0 ,
2074
+ DASH_UNSUPPORTED_AES_128 = 4051.0 ,
2075
+ DASH_UNSUPPORTED_CONTAINER = 4006.0 ,
2076
+ DASH_UNSUPPORTED_XLINK_ACTUATE = 4027.0 ,
2077
+ DASH_WEBM_MISSING_INIT = 4005.0 ,
2078
+ DASH_XLINK_DEPTH_LIMIT = 4028.0 ,
2079
+ DEPRECATED_OPERATION_ABORTED = 9002.0 ,
2080
+ DOWNLOAD_SIZE_CALLBACK_ERROR = 9015.0 ,
2081
+ EBML_BAD_FLOATING_POINT_SIZE = 3003.0 ,
2082
+ EBML_OVERFLOW = 3002.0 ,
2083
+ ENCRYPTED_CONTENT_WITHOUT_DRM_INFO = 6010.0 ,
2084
+ ERROR_CHECKING_HDCP_VERSION = 6019.0 ,
2085
+ EXPIRED = 6014.0 ,
2086
+ FAILED_TO_ATTACH_TO_VIDEO = 6003.0 ,
2087
+ FAILED_TO_CREATE_CDM = 6002.0 ,
2088
+ FAILED_TO_CREATE_SESSION = 6005.0 ,
2089
+ FAILED_TO_GENERATE_LICENSE_REQUEST = 6006.0 ,
2090
+ HLS_COULD_NOT_GUESS_CODECS = 4025.0 ,
2091
+ HLS_INVALID_PLAYLIST_HIERARCHY = 4017.0 ,
2092
+ HLS_KEYFORMATS_NOT_SUPPORTED = 4026.0 ,
2093
+ HLS_MSE_ENCRYPTED_LEGACY_APPLE_MEDIA_KEYS_NOT_SUPPORTED = 4041.0 ,
2094
+ HLS_MSE_ENCRYPTED_MP2T_NOT_SUPPORTED = 4040.0 ,
2095
+ HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND = 4020.0 ,
2096
+ HLS_PLAYLIST_HEADER_MISSING = 4015.0 ,
2097
+ HLS_REQUIRED_ATTRIBUTE_MISSING = 4023.0 ,
2098
+ HLS_REQUIRED_TAG_MISSING = 4024.0 ,
2099
+ HLS_VARIABLE_NOT_FOUND = 4039.0 ,
2100
+ HTTP_ERROR = 1002.0 ,
2101
+ INCONSISTENT_DRM_ACROSS_PERIODS = 4038.0 ,
2102
+ INDEXED_DB_ERROR = 9001.0 ,
2103
+ INDEXED_DB_INIT_TIMED_OUT = 9017.0 ,
2104
+ INIT_DATA_TRANSFORM_ERROR = 6016.0 ,
2105
+ INVALID_HLS_TAG = 4016.0 ,
2106
+ INVALID_MP4_CEA = 2010.0 ,
2107
+ INVALID_MP4_TTML = 2007.0 ,
2108
+ INVALID_MP4_VTT = 2008.0 ,
2109
+ INVALID_SERVER_CERTIFICATE = 6004.0 ,
2110
+ INVALID_TEXT_CUE = 2001.0 ,
2111
+ INVALID_TEXT_HEADER = 2000.0 ,
2112
+ INVALID_XML = 2005.0 ,
2113
+ JS_INTEGER_OVERFLOW = 3001.0 ,
2114
+ KEY_NOT_FOUND = 9012.0 ,
2115
+ LICENSE_REQUEST_FAILED = 6007.0 ,
2116
+ LICENSE_RESPONSE_REJECTED = 6008.0 ,
2117
+ LOAD_INTERRUPTED = 7000.0 ,
2118
+ LOCAL_PLAYER_INSTANCE_REQUIRED = 9008.0 ,
2119
+ MALFORMED_DATA_URI = 1004.0 ,
2120
+ MALFORMED_OFFLINE_URI = 9004.0 ,
2121
+ MALFORMED_TEST_URI = 1008.0 ,
2122
+ MEDIA_SOURCE_OPERATION_FAILED = 3014.0 ,
2123
+ MEDIA_SOURCE_OPERATION_THREW = 3015.0 ,
2124
+ MIN_HDCP_VERSION_NOT_MATCH = 6018.0 ,
2125
+ MISSING_STORAGE_CELL = 9013.0 ,
2126
+ MISSING_TEXT_PLUGIN = 2014.0 ,
2127
+ MODIFY_OPERATION_NOT_SUPPORTED = 9016.0 ,
2128
+ MP4_SIDX_INVALID_TIMESCALE = 3005.0 ,
2129
+ MP4_SIDX_TYPE_NOT_SUPPORTED = 3006.0 ,
2130
+ MP4_SIDX_WRONG_BOX_TYPE = 3004.0 ,
2131
+ MSS_INVALID_XML = 4046.0 ,
2132
+ MSS_LIVE_CONTENT_NOT_SUPPORTED = 4047.0 ,
2133
+ MSS_MISSING_DATA_FOR_TRANSMUXING = 3020.0 ,
2134
+ MSS_TRANSMUXING_CODEC_UNKNOWN = 3021.0 ,
2135
+ MSS_TRANSMUXING_FAILED = 3022.0 ,
2136
+ MT_AD_MANAGER_NOT_INITIALIZED = 10005.0 ,
2137
+ NEW_KEY_OPERATION_NOT_SUPPORTED = 9011.0 ,
2138
+ NO_CAST_RECEIVERS = 8001.0 ,
2139
+ NO_INIT_DATA_FOR_OFFLINE = 9007.0 ,
2140
+ NO_LICENSE_SERVER_GIVEN = 6012.0 ,
2141
+ NO_RECOGNIZED_KEY_SYSTEMS = 6000.0 ,
2142
+ NO_VARIANTS = 4036.0 ,
2143
+ NO_VIDEO_ELEMENT = 7002.0 ,
2144
+ NO_WEB_CRYPTO_API = 4042.0 ,
2145
+ OBJECT_DESTROYED = 7003.0 ,
2146
+ OFFLINE_SESSION_REMOVED = 6013.0 ,
2147
+ OPERATION_ABORTED = 7001.0 ,
2148
+ PERIOD_FLATTENING_FAILED = 4037.0 ,
2149
+ QUOTA_EXCEEDED_ERROR = 3017.0 ,
2150
+ REQUESTED_ITEM_NOT_FOUND = 9003.0 ,
2151
+ REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE = 6001.0 ,
2152
+ REQUEST_FILTER_ERROR = 1006.0 ,
2153
+ RESPONSE_FILTER_ERROR = 1007.0 ,
2154
+ RESTRICTIONS_CANNOT_BE_MET = 4012.0 ,
2155
+ SEGMENT_MISSING = 1011.0 ,
2156
+ SERVER_CERTIFICATE_REQUEST_FAILED = 6017.0 ,
2157
+ SERVER_CERTIFICATE_REQUIRED = 6015.0 ,
2158
+ SRC_EQUALS_PRELOAD_NOT_SUPPORTED = 7005.0 ,
2159
+ SS_AD_MANAGER_NOT_INITIALIZED = 10003.0 ,
2160
+ SS_IMA_SDK_MISSING = 10002.0 ,
2161
+ STORAGE_LIMIT_REACHED = 9014.0 ,
2162
+ STORAGE_NOT_SUPPORTED = 9000.0 ,
2163
+ STREAMING_ENGINE_STARTUP_INVALID_STATE = 5006.0 ,
2164
+ TEXT_COULD_NOT_GUESS_MIME_TYPE = 2011.0 ,
2165
+ TEXT_ONLY_WEBVTT_SRC_EQUALS = 2013.0 ,
2166
+ TIMEOUT = 1003.0 ,
2167
+ TRANSMUXING_FAILED = 3018.0 ,
2168
+ TRANSMUXING_NO_VIDEO_DATA = 3023.0 ,
2169
+ UNABLE_TO_DETECT_ENCODING = 2003.0 ,
2170
+ UNABLE_TO_EXTRACT_CUE_START_TIME = 2009.0 ,
2171
+ UNABLE_TO_GUESS_MANIFEST_TYPE = 4000.0 ,
2172
+ UNEXPECTED_CAST_ERROR = 8003.0 ,
2173
+ UNEXPECTED_TEST_REQUEST = 1009.0 ,
2174
+ UNSUPPORTED_EXTERNAL_THUMBNAILS_URI = 2017.0 ,
2175
+ UNSUPPORTED_SCHEME = 1000.0 ,
2176
+ VIDEO_ERROR = 3016.0 ,
2177
+ WEBM_CUES_ELEMENT_MISSING = 3007.0 ,
2178
+ WEBM_CUE_TIME_ELEMENT_MISSING = 3013.0 ,
2179
+ WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING = 3012.0 ,
2180
+ WEBM_DURATION_ELEMENT_MISSING = 3011.0 ,
2181
+ WEBM_EBML_HEADER_ELEMENT_MISSING = 3008.0 ,
2182
+ WEBM_INFO_ELEMENT_MISSING = 3010.0 ,
2183
+ WEBM_SEGMENT_ELEMENT_MISSING = 3009.0 ,
2184
+ }
2185
+ }
2186
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2187
+ declare namespace shaka.util.Error {
2188
+ enum Severity {
2189
+ CRITICAL = 2.0 ,
2190
+ RECOVERABLE = 1.0 ,
2191
+ }
2192
+ }
2193
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2194
+ declare namespace shaka.util {
2195
+ class EventManager implements shaka.util.IReleasable {
2196
+ private noStructuralTyping_shaka_util_EventManager : any;
2197
+ /**
2198
+ * Attaches an event listener to an event target.
2199
+ * @param target The event target.
2200
+ * @param type The event type.
2201
+ * @param listener The event listener.
2202
+ * @param options An object that specifies characteristics about the event listener. The passive option, if true, indicates that this function will never call preventDefault(), which improves scrolling performance.
2203
+ */
2204
+ listen (target : EventTarget | null , type : string , listener : shaka.util.EventManager.ListenerType , options ? : boolean | AddEventListenerOptions ) : any ;
2205
+ /**
2206
+ * Attaches an event listener to an event target. The listener will be
2207
+ * removed when the first instance of the event is fired.
2208
+ * @param target The event target.
2209
+ * @param type The event type.
2210
+ * @param listener The event listener.
2211
+ * @param options An object that specifies characteristics about the event listener. The passive option, if true, indicates that this function will never call preventDefault(), which improves scrolling performance.
2212
+ */
2213
+ listenOnce (target : EventTarget | null , type : string , listener : shaka.util.EventManager.ListenerType , options ? : boolean | AddEventListenerOptions ) : any ;
2214
+ /**
2215
+ * Detaches all event listeners.
2216
+ */
2217
+ release ( ) : any ;
2218
+ /**
2219
+ * Detaches all event listeners from all targets.
2220
+ */
2221
+ removeAll ( ) : any ;
2222
+ /**
2223
+ * Detaches an event listener from an event target.
2224
+ * @param target The event target.
2225
+ * @param type The event type.
2226
+ * @param listener The event listener.
2227
+ */
2228
+ unlisten (target : EventTarget | null , type : string , listener ? : shaka.util.EventManager.ListenerType ) : any ;
2229
+ }
2230
+ }
2231
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2232
+ declare namespace shaka.util.EventManager {
2233
+ type ListenerType = (a : Event ) => any ;
2234
+ }
2235
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2236
+ declare namespace shaka.util {
2237
+ class ExpGolomb {
2238
+ private noStructuralTyping_shaka_util_ExpGolomb : any;
2239
+ constructor (data : Uint8Array , convertEbsp2rbsp ? : boolean ) ;
2240
+ }
2241
+ }
2242
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2243
+ declare namespace shaka.util {
2244
+ class FairPlayUtils {
2245
+ private noStructuralTyping_shaka_util_FairPlayUtils : any;
2246
+ /**
2247
+ * Common FairPlay response transform for some DRMs providers.
2248
+ */
2249
+ static commonFairPlayResponse (type : shaka.net.NetworkingEngine.RequestType , response : shaka.extern.Response , context ? : shaka.extern.RequestContext ) : any ;
2250
+ /**
2251
+ * Conax FairPlay request.
2252
+ */
2253
+ static conaxFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ;
2254
+ /**
2255
+ * Conax initDataTransform configuration.
2256
+ */
2257
+ static conaxInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : any ;
2258
+ /**
2259
+ * Using the default method, extract a content ID from the init data. This is
2260
+ * based on the FairPlay example documentation.
2261
+ */
2262
+ static defaultGetContentId (initData : ArrayBuffer | ArrayBufferView ) : string ;
2263
+ /**
2264
+ * ExpressPlay FairPlay request.
2265
+ */
2266
+ static expressplayFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ;
2267
+ /**
2268
+ * ExpressPlay initDataTransform configuration.
2269
+ */
2270
+ static expressplayInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : any ;
2271
+ /**
2272
+ * EZDRM FairPlay request.
2273
+ */
2274
+ static ezdrmFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ;
2275
+ /**
2276
+ * EZDRM initDataTransform configuration.
2277
+ */
2278
+ static ezdrmInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : any ;
2279
+ /**
2280
+ * Transforms the init data buffer using the given data. The format is:
2281
+ * <pre>
2282
+ * [4 bytes] initDataSize
2283
+ * [initDataSize bytes] initData
2284
+ * [4 bytes] contentIdSize
2285
+ * [contentIdSize bytes] contentId
2286
+ * [4 bytes] certSize
2287
+ * [certSize bytes] cert
2288
+ * </pre>
2289
+ * @param cert The server certificate; this will throw if not provided.
2290
+ */
2291
+ static initDataTransform (initData : ArrayBuffer | ArrayBufferView , contentId : ArrayBuffer | ArrayBufferView | string , cert : ArrayBuffer | ArrayBufferView | null ) : Uint8Array ;
2292
+ /**
2293
+ * Check if FairPlay is supported.
2294
+ */
2295
+ static isFairPlaySupported ( ) : Promise < boolean > ;
2296
+ /**
2297
+ * Verimatrix FairPlay request.
2298
+ */
2299
+ static verimatrixFairPlayRequest (type : shaka.net.NetworkingEngine.RequestType , request : shaka.extern.Request , context ? : shaka.extern.RequestContext ) : any ;
2300
+ /**
2301
+ * Verimatrix initDataTransform configuration.
2302
+ */
2303
+ static verimatrixInitDataTransform (initData : Uint8Array , initDataType : string , drmInfo : shaka.extern.DrmInfo | null ) : any ;
2304
+ }
2305
+ }
2306
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2307
+ declare namespace shaka.util {
2308
+ class FakeEvent extends Event {
2309
+ private noStructuralTyping_shaka_util_FakeEvent : any;
2310
+ constructor (type : string , dict ? : Map < string , object | null > | null ) ;
2311
+ }
2312
+ }
2313
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2314
+ declare namespace shaka.util {
2315
+ class FakeEventTarget implements EventTarget , shaka.util.IReleasable {
2316
+ private noStructuralTyping_shaka_util_FakeEventTarget : any;
2317
+ /**
2318
+ * Add an event listener to this object.
2319
+ * @param type The event type to listen for.
2320
+ * @param listener The callback or listener object to invoke.
2321
+ * @param options Ignored.
2322
+ */
2323
+ addEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , options ? : AddEventListenerOptions | boolean ) : any ;
2324
+ /**
2325
+ * Dispatch an event from this object.
2326
+ * @param event The event to be dispatched from this object.
2327
+ */
2328
+ dispatchEvent (event : Event ) : boolean ;
2329
+ /**
2330
+ * Add an event listener to this object that is invoked for all events types
2331
+ * the object fires.
2332
+ * @param listener The callback or listener object to invoke.
2333
+ */
2334
+ listenToAllEvents (listener : EventListener | null | ( (a : Event ) => any ) ) : any ;
2335
+ release ( ) : any ;
2336
+ /**
2337
+ * Remove an event listener from this object.
2338
+ * @param type The event type for which you wish to remove a listener.
2339
+ * @param listener The callback or listener object to remove.
2340
+ * @param options Ignored.
2341
+ */
2342
+ removeEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , options ? : EventListenerOptions | null | boolean ) : any ;
2343
+ }
2344
+ }
2345
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2346
+ declare namespace shaka.util.FakeEventTarget {
2347
+ /**
2348
+ * These are the listener types defined in the closure extern for EventTarget.
2349
+ */
2350
+ type ListenerType = EventListener | null | ( (a : Event ) => any ) ;
2351
+ }
2352
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2353
+ declare namespace shaka.util {
2354
+ /**
2355
+ * An interface to standardize how objects are destroyed.
2356
+ */
2357
+ interface IDestroyable {
2358
+ /**
2359
+ * Request that this object be destroyed, releasing all resources and shutting
2360
+ * down all operations. Returns a Promise which is resolved when destruction
2361
+ * is complete. This Promise should never be rejected.
2362
+ */
2363
+ destroy ( ) : Promise < any > ;
2364
+ }
2365
+ }
2366
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2367
+ declare namespace shaka.util {
2368
+ /**
2369
+ * An interface to standardize how objects release internal references
2370
+ * synchronously. If an object needs to asynchronously release references, then
2371
+ * it should use 'shaka.util.IDestroyable'.
2372
+ */
2373
+ interface IReleasable {
2374
+ /**
2375
+ * Request that this object release all internal references.
2376
+ */
2377
+ release ( ) : any ;
2378
+ }
2379
+ }
2380
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2381
+ declare namespace shaka.util {
2382
+ class Id3Utils {
2383
+ private noStructuralTyping_shaka_util_Id3Utils : any;
2384
+ /**
2385
+ * Returns any adjacent ID3 tags found in data starting at offset, as one
2386
+ * block of data
2387
+ * @param id3Data - The ID3 data containing one or more ID3 tags
2388
+ * @param offset - The offset at which to start searching
2389
+ */
2390
+ static getID3Data (id3Data : Uint8Array | null , offset ? : number ) : Uint8Array ;
2391
+ /**
2392
+ * Returns an array of ID3 frames found in all the ID3 tags in the id3Data
2393
+ * @param id3Data - The ID3 data containing one or more ID3 tags
2394
+ */
2395
+ static getID3Frames (id3Data : Uint8Array | null ) : shaka.extern.MetadataFrame [] ;
2396
+ }
2397
+ }
2398
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2399
+ declare namespace shaka.util {
2400
+ class LanguageUtils {
2401
+ private noStructuralTyping_shaka_util_LanguageUtils : any;
2402
+ /**
2403
+ * Check if |locale1| and |locale2| are language-compatible.
2404
+ * Language compatible is when the language component of each locale matches.
2405
+ * This means that no matter what region they have (or don't have) as long as
2406
+ * the language components match, they are language-compatible.
2407
+ * Examples:
2408
+ * Locale A | Locale B | Language-Compatible
2409
+ * -----------------------------------------
2410
+ * en-US | en-US | true
2411
+ * en-US | en | true
2412
+ * en-US | en-CA | true
2413
+ * en-CA | fr-CA | false
2414
+ */
2415
+ static areLanguageCompatible (locale1 : string , locale2 : string ) : boolean ;
2416
+ /**
2417
+ * Check if |locale1| and |locale2| are locale-compatible.
2418
+ * Locale-compatible is defined as all components in each locale match. Since
2419
+ * we only respect the language and region components, we only check that
2420
+ * the language and region components match.
2421
+ * Examples:
2422
+ * Locale A | Locale B | Locale Compatible
2423
+ * ---------------------------------------
2424
+ * en-US | en-US | true
2425
+ * en | en-US | false
2426
+ * en-US | en-CA | false
2427
+ */
2428
+ static areLocaleCompatible (locale1 : string , locale2 : string ) : boolean ;
2429
+ /**
2430
+ * Check if two language codes are siblings. Language codes are siblings if
2431
+ * they share the same base language while neither one is the base language.
2432
+ * For example, "en-US" and "en-CA" are siblings but "en-US" and "en" are not
2433
+ * siblings.
2434
+ */
2435
+ static areSiblings (a : string , b : string ) : boolean ;
2436
+ /**
2437
+ * Find the locale in |searchSpace| that comes closest to |target|. If no
2438
+ * locale is found to be close to |target|, then |null| will be returned.
2439
+ */
2440
+ static findClosestLocale (target : string , searchSpace : Iterable < string > ) : string | null ;
2441
+ /**
2442
+ * Get the normalized base language for a language code.
2443
+ */
2444
+ static getBase (lang : string ) : string ;
2445
+ /**
2446
+ * Get the normalized language of the given text stream. Will return 'und' if
2447
+ * a language is not found on the text stream.
2448
+ * This should always be used to get the language from a text stream.
2449
+ */
2450
+ static getLocaleForText (stream : shaka.extern.Stream ) : string ;
2451
+ /**
2452
+ * Get the normalized locale for the given variant. This will look through
2453
+ * the variant to find the locale that represents the content in the variant.
2454
+ * This will return 'und' if no language can be found.
2455
+ * This should always be used to get the locale from a variant.
2456
+ */
2457
+ static getLocaleForVariant (variant : shaka.extern.Variant ) : string ;
2458
+ /**
2459
+ * Check if |possibleParent| is the parent locale of |possibleChild|. Because
2460
+ * we do not support dialects, the parent-child relationship is a lot simpler.
2461
+ * In a parent child relationship:
2462
+ * - The parent and child have the same language-component
2463
+ * - The parent has no region-component
2464
+ * - The child has a region-component
2465
+ * Example:
2466
+ * Locale A | Locale B | Is A The parent of B?
2467
+ * --------------------------------------------
2468
+ * en-US | en-US | no
2469
+ * en-US | en | no
2470
+ * en | en-US | yes
2471
+ * en | en | no
2472
+ * en | fr | no
2473
+ */
2474
+ static isParentOf (possibleParent : string , possibleChild : string ) : boolean ;
2475
+ /**
2476
+ * Check if |localeA| shares the same parent with |localeB|. Since we don't
2477
+ * support dialect, we will only look at language and region. For two locales
2478
+ * to be siblings:
2479
+ * - Both must have language-components
2480
+ * - Both must have region-components
2481
+ * - Both must have the same language-component
2482
+ * Example:
2483
+ * Locale A | Locale B | Siblings?
2484
+ * --------------------------------------------
2485
+ * en-US | en-US | yes
2486
+ * en-US | en-CA | yes
2487
+ * en-US | en | no
2488
+ * en | en-US | no
2489
+ * en | en | no
2490
+ * en | fr | no
2491
+ */
2492
+ static isSiblingOf (localeA : string , localeB : string ) : boolean ;
2493
+ /**
2494
+ * Normalize a locale. This will take a locale and canonicalize it to a state
2495
+ * that we are prepared to work with.
2496
+ * We only support with:
2497
+ * - language
2498
+ * - language-REGION
2499
+ * If given a dialect, we will discard it. We will convert any 3-character
2500
+ * codes to 2-character codes. We will force language codes to lowercase and
2501
+ * region codes to uppercase.
2502
+ */
2503
+ static normalize (locale : string ) : string ;
2504
+ /**
2505
+ * Compute a numerical relatedness for language codes. Language codes with a
2506
+ * higher relatedness are a better match. Unrelated language codes have a
2507
+ * relatedness score of 0.
2508
+ */
2509
+ static relatedness (target : string , candidate : string ) : number ;
2510
+ }
2511
+ }
2512
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2513
+ declare namespace shaka.util {
2514
+ class MimeUtils {
2515
+ private noStructuralTyping_shaka_util_MimeUtils : any;
2516
+ /**
2517
+ * Takes a MIME type and optional codecs string and produces the full MIME
2518
+ * type. Also remove the codecs for raw formats.
2519
+ */
2520
+ static getFullType (mimeType : string , codecs ? : string ) : string ;
2521
+ /**
2522
+ * Takes a MIME type and optional codecs string and produces the full MIME
2523
+ * type.
2524
+ */
2525
+ static getFullTypeWithAllCodecs (mimeType : string , codecs ? : string ) : string ;
2526
+ }
2527
+ }
2528
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2529
+ declare namespace shaka.util {
2530
+ class Mp4Parser {
2531
+ private noStructuralTyping_shaka_util_Mp4Parser : any;
2532
+ /**
2533
+ * Declare a box type as a Box.
2534
+ */
2535
+ box (type : string , definition : shaka.util.Mp4Parser.CallbackType ) : shaka.util.Mp4Parser ;
2536
+ /**
2537
+ * Declare a box type as a Full Box.
2538
+ */
2539
+ fullBox (type : string , definition : shaka.util.Mp4Parser.CallbackType ) : shaka.util.Mp4Parser ;
2540
+ /**
2541
+ * Parse the given data using the added callbacks.
2542
+ * @param partialOkay If true, allow reading partial payloads from some boxes. If the goal is a child box, we can sometimes find it without enough data to find all child boxes.
2543
+ * @param stopOnPartial If true, stop reading if an incomplete box is detected.
2544
+ */
2545
+ parse (data : ArrayBuffer | ArrayBufferView , partialOkay ? : boolean , stopOnPartial ? : boolean ) : any ;
2546
+ /**
2547
+ * Parse the next box on the current level.
2548
+ * @param absStart The absolute start position in the original byte array.
2549
+ * @param partialOkay If true, allow reading partial payloads from some boxes. If the goal is a child box, we can sometimes find it without enough data to find all child boxes.
2550
+ * @param stopOnPartial If true, stop reading if an incomplete box is detected.
2551
+ */
2552
+ parseNext (absStart : number , reader : shaka.util.DataViewReader , partialOkay ? : boolean , stopOnPartial ? : boolean ) : any ;
2553
+ /**
2554
+ * Stop parsing. Useful for extracting information from partial segments and
2555
+ * avoiding an out-of-bounds error once you find what you are looking for.
2556
+ */
2557
+ stop ( ) : any ;
2558
+ /**
2559
+ * Create a callback that tells the Mp4 parser to treat the body of a box as a
2560
+ * binary blob and to parse the body's contents using the provided callback.
2561
+ */
2562
+ static allData (callback : (a : Uint8Array ) => any ) : shaka.util.Mp4Parser.CallbackType ;
2563
+ /**
2564
+ * A callback that tells the Mp4 parser to treat the body of a box as a audio
2565
+ * sample entry. A audio sample entry has some fixed-sized fields
2566
+ * describing the audio codec parameters, followed by an arbitrary number of
2567
+ * appended children. Each child is a box.
2568
+ */
2569
+ static audioSampleEntry (box : shaka.extern.ParsedBox ) : any ;
2570
+ /**
2571
+ * A callback that tells the Mp4 parser to treat the body of a box as a series
2572
+ * of boxes. The number of boxes is limited by the size of the parent box.
2573
+ */
2574
+ static children (box : shaka.extern.ParsedBox ) : any ;
2575
+ /**
2576
+ * Find the header size of the box.
2577
+ * Useful for modifying boxes in place or finding the exact offset of a field.
2578
+ */
2579
+ static headerSize (box : shaka.extern.ParsedBox ) : number ;
2580
+ /**
2581
+ * A callback that tells the Mp4 parser to treat the body of a box as a sample
2582
+ * description. A sample description box has a fixed number of children. The
2583
+ * number of children is represented by a 4 byte unsigned integer. Each child
2584
+ * is a box.
2585
+ */
2586
+ static sampleDescription (box : shaka.extern.ParsedBox ) : any ;
2587
+ /**
2588
+ * Convert an integer type from a box into an ascii string name.
2589
+ * Useful for debugging.
2590
+ * @param type The type of the box, a uint32.
2591
+ */
2592
+ static typeToString (type : number ) : string ;
2593
+ /**
2594
+ * A callback that tells the Mp4 parser to treat the body of a box as a visual
2595
+ * sample entry. A visual sample entry has some fixed-sized fields
2596
+ * describing the video codec parameters, followed by an arbitrary number of
2597
+ * appended children. Each child is a box.
2598
+ */
2599
+ static visualSampleEntry (box : shaka.extern.ParsedBox ) : any ;
2600
+ }
2601
+ }
2602
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2603
+ declare namespace shaka.util.Mp4Parser {
2604
+ type CallbackType = (a : shaka.extern.ParsedBox ) => any ;
2605
+ }
2606
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2607
+ declare namespace shaka.util {
2608
+ /**
2609
+ * A utility to combine streams across periods.
2610
+ */
2611
+ class PeriodCombiner implements shaka.util.IReleasable {
2612
+ private noStructuralTyping_shaka_util_PeriodCombiner : any;
2613
+ combinePeriods (periods : shaka.extern.Period [] , isDynamic : boolean ) : Promise < any > ;
2614
+ getImageStreams ( ) : shaka.extern.Stream [] ;
2615
+ getTextStreams ( ) : shaka.extern.Stream [] ;
2616
+ getVariants ( ) : shaka.extern.Variant [] ;
2617
+ release ( ) : any ;
2618
+ setAllowMultiTypeVariants (allowed : boolean ) : any ;
2619
+ setUseStreamOnce (useOnce : boolean ) : any ;
2620
+ }
2621
+ }
2622
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2623
+ declare namespace shaka.util {
2624
+ class PlayerConfiguration {
2625
+ private noStructuralTyping_shaka_util_PlayerConfiguration : any;
2626
+ static createDefault ( ) : shaka.extern.PlayerConfiguration ;
2627
+ /**
2628
+ * Merges the given configuration changes into the given destination. This
2629
+ * uses the default Player configurations as the template.
2630
+ */
2631
+ static mergeConfigObjects (destination : shaka.extern.PlayerConfiguration , updates : object , template ? : shaka.extern.PlayerConfiguration ) : boolean ;
2632
+ }
2633
+ }
2634
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2635
+ declare namespace shaka.util {
2636
+ class StreamUtils {
2637
+ private noStructuralTyping_shaka_util_StreamUtils : any;
2638
+ static meetsRestrictions (variant : shaka.extern.Variant , restrictions : shaka.extern.Restrictions , maxHwRes : { height : number , width : number } ) : boolean ;
2639
+ }
2640
+ }
2641
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2642
+ declare namespace shaka.util {
2643
+ class StringUtils {
2644
+ private noStructuralTyping_shaka_util_StringUtils : any;
2645
+ /**
2646
+ * Creates a string from the given buffer, auto-detecting the encoding that is
2647
+ * being used. If it cannot detect the encoding, it will throw an exception.
2648
+ */
2649
+ static fromBytesAutoDetect (data : ArrayBuffer | ArrayBufferView | null ) : string ;
2650
+ /**
2651
+ * Creates a string from the given buffer as UTF-16 encoding.
2652
+ * @param littleEndian true to read little endian, false to read big.
2653
+ * @param noThrow true to avoid throwing in cases where we may expect invalid input. If noThrow is true and the data has an odd length,it will be truncated.
2654
+ */
2655
+ static fromUTF16 (data : ArrayBuffer | ArrayBufferView | null , littleEndian : boolean , noThrow ? : boolean ) : string ;
2656
+ /**
2657
+ * Creates a string from the given buffer as UTF-8 encoding.
2658
+ */
2659
+ static fromUTF8 (data : ArrayBuffer | ArrayBufferView | null ) : string ;
2660
+ /**
2661
+ * Resets the fromCharCode method's implementation.
2662
+ * For debug use.
2663
+ */
2664
+ static resetFromCharCode ( ) : any ;
2665
+ /**
2666
+ * Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
2667
+ */
2668
+ static toUTF16 (str : string , littleEndian : boolean ) : ArrayBuffer ;
2669
+ /**
2670
+ * Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
2671
+ */
2672
+ static toUTF8 (str : string ) : ArrayBuffer ;
2673
+ }
2674
+ }
2675
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2676
+ declare namespace shaka.util {
2677
+ /**
2678
+ * A timer allows a single function to be executed at a later time or at
2679
+ * regular intervals.
2680
+ */
2681
+ class Timer {
2682
+ private noStructuralTyping_shaka_util_Timer : any;
2683
+ constructor (onTick : ( ) => any ) ;
2684
+ /**
2685
+ * Stop the timer and clear the previous behaviour. The timer is still usable
2686
+ * after calling |stop|.
2687
+ */
2688
+ stop ( ) : any ;
2689
+ /**
2690
+ * Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
2691
+ * called first.
2692
+ */
2693
+ tickAfter (seconds : number ) : shaka.util.Timer ;
2694
+ /**
2695
+ * Have the timer call |onTick| every |seconds| until |stop| is called.
2696
+ */
2697
+ tickEvery (seconds : number ) : shaka.util.Timer ;
2698
+ /**
2699
+ * Have the timer call |onTick| now.
2700
+ */
2701
+ tickNow ( ) : shaka.util.Timer ;
2702
+ }
2703
+ }
2704
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2705
+ declare namespace shaka.util {
2706
+ class TsParser {
2707
+ private noStructuralTyping_shaka_util_TsParser : any;
2708
+ /**
2709
+ * Clear previous data
2710
+ */
2711
+ clearData ( ) : any ;
2712
+ /**
2713
+ * Return the audio data
2714
+ */
2715
+ getAudioData ( ) : shaka.extern.MPEG_PES [] ;
2716
+ /**
2717
+ * Return the audio and video codecs
2718
+ */
2719
+ getCodecs ( ) : { audio : string | null , video : string | null } ;
2720
+ /**
2721
+ * Return the ID3 metadata
2722
+ */
2723
+ getMetadata ( ) : shaka.extern.ID3Metadata [] ;
2724
+ /**
2725
+ * Return the start time for the audio and video
2726
+ */
2727
+ getStartTime (contentType : string ) : number | null ;
2728
+ /**
2729
+ * Return the audio data
2730
+ */
2731
+ getVideoData (naluProcessing ? : boolean ) : shaka.extern.MPEG_PES [] ;
2732
+ /**
2733
+ * Return the video information
2734
+ */
2735
+ getVideoInfo ( ) : { codec : string | null , height : string | null , width : string | null } ;
2736
+ /**
2737
+ * Return the video data
2738
+ */
2739
+ getVideoNalus ( ) : shaka.extern.VideoNalu [] ;
2740
+ /**
2741
+ * Return the video resolution
2742
+ */
2743
+ getVideoResolution ( ) : { height : string | null , width : string | null } ;
2744
+ /**
2745
+ * Parse the given data
2746
+ */
2747
+ parse (data : Uint8Array | null ) : shaka.util.TsParser ;
2748
+ /**
2749
+ * Parse AVC Nalus
2750
+ * The code is based on hls.js
2751
+ * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2752
+ */
2753
+ parseAvcNalus (pes : shaka.extern.MPEG_PES , nextPes ? : shaka.extern.MPEG_PES | null ) : shaka.extern.VideoNalu [] ;
2754
+ /**
2755
+ * Parse AVC and HVC Nalus
2756
+ * The code is based on hls.js
2757
+ * Credit to https://github.com/video-dev/hls.js/blob/master/src/demux/tsdemuxer.ts
2758
+ */
2759
+ parseNalus (pes : shaka.extern.MPEG_PES , lastNalu ? : shaka.extern.VideoNalu | null , lastState ? : number | null ) : shaka.extern.VideoNalu [] ;
2760
+ static Timescale : number ;
2761
+ /**
2762
+ * Check if the passed data corresponds to an MPEG2-TS
2763
+ */
2764
+ static probe (data : Uint8Array | null ) : boolean ;
2765
+ /**
2766
+ * Returns the synchronization offset
2767
+ */
2768
+ static syncOffset (data : Uint8Array | null ) : number ;
2769
+ }
2770
+ }
2771
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/dist/shaka-player.foo.debug.externs.js
2772
+ declare namespace shaka.util {
2773
+ class Uint8ArrayUtils {
2774
+ private noStructuralTyping_shaka_util_Uint8ArrayUtils : any;
2775
+ /**
2776
+ * Concatenate buffers.
2777
+ */
2778
+ static concat ( ...varArgs : ( ArrayBuffer | ArrayBufferView ) [] ) : Uint8Array ;
2779
+ /**
2780
+ * Convert a base64 string to a Uint8Array. Accepts either the standard
2781
+ * alphabet or the alternate "base64url" alphabet.
2782
+ */
2783
+ static fromBase64 (str : string ) : Uint8Array ;
2784
+ /**
2785
+ * Convert a hex string to a Uint8Array.
2786
+ */
2787
+ static fromHex (str : string ) : Uint8Array ;
2788
+ /**
2789
+ * Convert a buffer to a base64 string. The output will always use the
2790
+ * alternate encoding/alphabet also known as "base64url".
2791
+ * @param padding If true, pad the output with equals signs. Defaults to true.
2792
+ */
2793
+ static toBase64 (data : ArrayBuffer | ArrayBufferView , padding ? : boolean ) : string ;
2794
+ /**
2795
+ * Convert a buffer to a hex string.
2796
+ */
2797
+ static toHex (data : ArrayBuffer | ArrayBufferView ) : string ;
2798
+ /**
2799
+ * Convert a buffer to a base64 string. The output will be standard
2800
+ * alphabet as opposed to base64url safe alphabet.
2801
+ */
2802
+ static toStandardBase64 (data : ArrayBuffer | ArrayBufferView ) : string ;
2803
+ }
2804
+ }
2805
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/airplay.js
2806
+ declare namespace ಠ_ಠ.clutz {
2807
+ class AirPlayEvent extends Event {
2808
+ private noStructuralTyping_AirPlayEvent : any;
2809
+ constructor ( ...a : any [] ) ;
2810
+ availability : String | null ;
2811
+ }
2812
+ }
2813
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/awesomplete.js
2814
+ declare namespace ಠ_ಠ.clutz {
2815
+ class Awesomplete {
2816
+ private noStructuralTyping_Awesomplete : any;
2817
+ constructor (input : Element ) ;
2818
+ list : string [] ;
2819
+ minChars : number ;
2820
+ evaluate ( ) : any ;
2821
+ }
2822
+ }
2823
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2824
+ declare namespace ಠ_ಠ.clutz {
2825
+ function __onGCastApiAvailable (a : boolean ) : any ;
2826
+ }
2827
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2828
+ declare namespace cast.receiver {
2829
+ class CastChannel {
2830
+ private noStructuralTyping_cast_receiver_CastChannel : any;
2831
+ send (message : any ) : any ;
2832
+ }
2833
+ }
2834
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2835
+ declare namespace cast.receiver {
2836
+ class CastMessageBus {
2837
+ private noStructuralTyping_cast_receiver_CastMessageBus : any;
2838
+ broadcast (message : any ) : any ;
2839
+ getCastChannel (senderId : string ) : cast.receiver.CastChannel ;
2840
+ onMessage : Function | null ;
2841
+ }
2842
+ }
2843
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2844
+ declare namespace cast.receiver.CastMessageBus {
2845
+ class Event {
2846
+ private noStructuralTyping_cast_receiver_CastMessageBus_Event : any;
2847
+ data : any ;
2848
+ senderId : string ;
2849
+ }
2850
+ }
2851
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2852
+ declare namespace cast.receiver {
2853
+ class CastReceiverManager {
2854
+ private noStructuralTyping_cast_receiver_CastReceiverManager : any;
2855
+ onSenderConnected : Function | null ;
2856
+ onSenderDisconnected : Function | null ;
2857
+ onSystemVolumeChanged : Function | null ;
2858
+ getCastMessageBus (namespace : string , messageType ? : string ) : cast.receiver.CastMessageBus | null ;
2859
+ getSenders ( ) : string [] | null ;
2860
+ getSystemVolume ( ) : cast.receiver.system.SystemVolumeData | null ;
2861
+ isSystemReady ( ) : boolean ;
2862
+ setSystemVolumeLevel (level : number ) : any ;
2863
+ setSystemVolumeMuted (muted : number ) : any ;
2864
+ start ( ) : any ;
2865
+ stop ( ) : any ;
2866
+ static getInstance ( ) : cast.receiver.CastReceiverManager | null ;
2867
+ }
2868
+ }
2869
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2870
+ declare namespace cast.receiver.media {
2871
+ enum MetadataType {
2872
+ GENERIC = 0.0 ,
2873
+ MOVIE = 1.0 ,
2874
+ MUSIC_TRACK = 3.0 ,
2875
+ PHOTO = 4.0 ,
2876
+ TV_SHOW = 2.0 ,
2877
+ }
2878
+ }
2879
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2880
+ declare namespace cast.receiver.system {
2881
+ class SystemVolumeData {
2882
+ private noStructuralTyping_cast_receiver_system_SystemVolumeData : any;
2883
+ level : number ;
2884
+ muted : boolean ;
2885
+ }
2886
+ }
2887
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2888
+ declare namespace chrome.cast {
2889
+ class ApiConfig {
2890
+ private noStructuralTyping_chrome_cast_ApiConfig : any;
2891
+ constructor (sessionRequest : chrome.cast.SessionRequest | null , sessionListener : Function | null , receiverListener : Function | null , autoJoinPolicy ? : string , defaultActionPolicy ? : string ) ;
2892
+ }
2893
+ }
2894
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2895
+ declare namespace chrome.cast {
2896
+ class Error {
2897
+ private noStructuralTyping_chrome_cast_Error : any;
2898
+ constructor (code : string , description ? : string , details ? : object | null ) ;
2899
+ code : string ;
2900
+ description : string | null ;
2901
+ details : object | null ;
2902
+ }
2903
+ }
2904
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2905
+ declare namespace chrome.cast {
2906
+ class Receiver {
2907
+ private noStructuralTyping_chrome_cast_Receiver : any;
2908
+ friendlyName : string ;
2909
+ }
2910
+ }
2911
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2912
+ declare namespace chrome.cast {
2913
+ class Session {
2914
+ private noStructuralTyping_chrome_cast_Session : any;
2915
+ receiver : chrome.cast.Receiver | null ;
2916
+ sessionId : string ;
2917
+ status : string ;
2918
+ addMessageListener (namespace : string , listener : Function | null ) : any ;
2919
+ addUpdateListener (listener : Function | null ) : any ;
2920
+ leave (successCallback : Function | null , errorCallback : Function | null ) : any ;
2921
+ removeMessageListener (namespace : string , listener : Function | null ) : any ;
2922
+ removeUpdateListener (listener : Function | null ) : any ;
2923
+ sendMessage (namespace : string , message : object | string , successCallback : Function | null , errorCallback : Function | null ) : any ;
2924
+ stop (successCallback : Function | null , errorCallback : Function | null ) : any ;
2925
+ }
2926
+ }
2927
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2928
+ declare namespace chrome.cast {
2929
+ class SessionRequest {
2930
+ private noStructuralTyping_chrome_cast_SessionRequest : any;
2931
+ constructor (appId : string , capabilities : ( object | null ) [] | null , timeout : number | null , androidReceiverCompatible : boolean , credentialsData : object | null ) ;
2932
+ }
2933
+ }
2934
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2935
+ declare namespace chrome.cast.SessionStatus {
2936
+ let STOPPED : string ;
2937
+ }
2938
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/chromecast.js
2939
+ declare namespace chrome.cast {
2940
+ let isAvailable : boolean ;
2941
+ }
2942
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/cmcd.js
2943
+ declare namespace ಠ_ಠ.clutz {
2944
+ type CmcdData = { bl ? : number , br ? : number , bs ? : boolean , cid ? : string , d ? : number , dl ? : number , mtp ? : number , nor ? : string , nrr ? : string , ot ? : string , pr ? : number , rtp ? : number , sf ? : string , sid ? : string , st ? : string , su ? : boolean , tb ? : number , v ? : number } ;
2945
+ }
2946
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/hisense.js
2947
+ declare namespace window {
2948
+ function Hisense_Get4KSupportState ( ) : boolean ;
2949
+ }
2950
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
2951
+ declare namespace google.ima.AdErrorEvent {
2952
+ enum Type {
2953
+ AD_ERROR = 'AD_ERROR' ,
2954
+ }
2955
+ }
2956
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
2957
+ declare namespace google.ima.AdEvent {
2958
+ enum Type {
2959
+ AD_BREAK_READY = 'AD_BREAK_READY' ,
2960
+ AD_BUFFERING = 'AD_BUFFERING' ,
2961
+ AD_ERROR = 'AD_ERROR' ,
2962
+ AD_METADATA = 'AD_METADATA' ,
2963
+ AD_PROGRESS = 'AD_PROGRESS' ,
2964
+ ALL_ADS_COMPLETED = 'ALL_ADS_COMPLETED' ,
2965
+ CLICK = 'CLICK' ,
2966
+ COMPLETE = 'COMPLETE' ,
2967
+ CONTENT_PAUSE_REQUESTED = 'CONTENT_PAUSE_REQUESTED' ,
2968
+ CONTENT_RESUME_REQUESTED = 'CONTENT_RESUME_REQUESTED' ,
2969
+ DURATION_CHANGE = 'DURATION_CHANGE' ,
2970
+ FIRST_QUARTILE = 'FIRST_QUARTILE' ,
2971
+ IMPRESSION = 'IMPRESSION' ,
2972
+ INTERACTION = 'INTERACTION' ,
2973
+ LINEAR_CHANGED = 'LINEAR_CHANGED' ,
2974
+ LOADED = 'LOADED' ,
2975
+ LOG = 'LOG' ,
2976
+ MIDPOINT = 'MIDPOINT' ,
2977
+ PAUSED = 'PAUSED' ,
2978
+ RESUMED = 'RESUMED' ,
2979
+ SKIPPABLE_STATE_CHANGED = 'SKIPPABLE_STATE_CHANGED' ,
2980
+ SKIPPED = 'SKIPPED' ,
2981
+ STARTED = 'STARTED' ,
2982
+ THIRD_QUARTILE = 'THIRD_QUARTILE' ,
2983
+ USER_CLOSE = 'USER_CLOSE' ,
2984
+ VOLUME_CHANGED = 'VOLUME_CHANGED' ,
2985
+ VOLUME_MUTED = 'VOLUME_MUTED' ,
2986
+ }
2987
+ }
2988
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
2989
+ declare namespace google.ima {
2990
+ class AdsLoader implements EventTarget {
2991
+ private noStructuralTyping_google_ima_AdsLoader : any;
2992
+ constructor (container : google.ima.AdDisplayContainer ) ;
2993
+ addEventListener ( ) : any ;
2994
+ contentComplete ( ) : any ;
2995
+ destroy ( ) : any ;
2996
+ dispatchEvent ( ) : any ;
2997
+ getSettings ( ) : google.ima.ImaSdkSettings | null ;
2998
+ removeEventListener ( ) : any ;
2999
+ requestAds (request : google.ima.AdsRequest ) : any ;
3000
+ }
3001
+ }
3002
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3003
+ declare namespace google.ima {
3004
+ class AdsManager implements EventTarget {
3005
+ private noStructuralTyping_google_ima_AdsManager : any;
3006
+ addEventListener ( ) : any ;
3007
+ destroy ( ) : any ;
3008
+ dispatchEvent ( ) : any ;
3009
+ getAdSkippableState ( ) : boolean ;
3010
+ getCuePoints ( ) : number [] ;
3011
+ getRemainingTime ( ) : number ;
3012
+ getVolume ( ) : any ;
3013
+ init (width : number , height : number , viewMode : google.ima.ViewMode ) : any ;
3014
+ pause ( ) : any ;
3015
+ removeEventListener ( ) : any ;
3016
+ resize (width : number , height : number , viewMode : google.ima.ViewMode ) : any ;
3017
+ resume ( ) : any ;
3018
+ setVolume (volume : number ) : any ;
3019
+ skip ( ) : any ;
3020
+ start ( ) : any ;
3021
+ stop ( ) : any ;
3022
+ updateAdsRenderingSettings (adsRenderingSettings : google.ima.AdsRenderingSettings ) : any ;
3023
+ }
3024
+ }
3025
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3026
+ declare namespace google.ima.AdsManagerLoadedEvent {
3027
+ enum Type {
3028
+ ADS_MANAGER_LOADED = 'ADS_MANAGER_LOADED' ,
3029
+ }
3030
+ }
3031
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3032
+ declare namespace google.ima {
3033
+ type AdsRenderingSettings = { autoAlign : boolean , bitrate : number , enablePreloading : boolean , loadVideoTimeout : number , mimeTypes : string [] | null , playAdsAfterTime : number , restoreCustomPlaybackStateOnAdBreakComplete : boolean , uiElements : string [] | null , useStyledLinearAds : boolean , useStyledNonLinearAds : boolean } ;
3034
+ }
3035
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3036
+ declare namespace google.ima {
3037
+ type AdsRequest = { adTagUrl ? : string , adsResponse ? : string } ;
3038
+ }
3039
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3040
+ declare namespace google.ima.ImaSdkSettings {
3041
+ enum VpaidMode {
3042
+ DISABLED = 0.0 ,
3043
+ ENABLED = 1.0 ,
3044
+ INSECURE = 2.0 ,
3045
+ }
3046
+ }
3047
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3048
+ declare namespace google.ima {
3049
+ enum ViewMode {
3050
+ FULLSCREEN = 'FULLSCREEN' ,
3051
+ NORMAL = 'NORMAL' ,
3052
+ }
3053
+ }
3054
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3055
+ declare namespace google.ima.dai.api {
3056
+ enum OmidAccessMode {
3057
+ DOMAIN = 'domain' ,
3058
+ FULL = 'full' ,
3059
+ LIMITED = 'limited' ,
3060
+ }
3061
+ }
3062
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3063
+ declare namespace google.ima.dai.api {
3064
+ enum OmidVerificationVendor {
3065
+ COMSCORE = 7.0 ,
3066
+ DOUBLEVERIFY = 3.0 ,
3067
+ GOOGLE = 9.0 ,
3068
+ INTEGRAL_AD_SCIENCE = 4.0 ,
3069
+ MEETRICS = 8.0 ,
3070
+ MOAT = 2.0 ,
3071
+ NIELSEN = 6.0 ,
3072
+ OTHER = 1.0 ,
3073
+ PIXELATE = 5.0 ,
3074
+ }
3075
+ }
3076
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3077
+ declare namespace google.ima.dai.api.StreamEvent {
3078
+ enum Type {
3079
+ AD_BREAK_ENDED = 'adBreakEnded' ,
3080
+ AD_BREAK_STARTED = 'adBreakStarted' ,
3081
+ AD_PERIOD_ENDED = 'adPeriodEnded' ,
3082
+ AD_PERIOD_STARTED = 'adPeriodStarted' ,
3083
+ AD_PROGRESS = 'adProgress' ,
3084
+ CLICK = 'click' ,
3085
+ COMPLETE = 'complete' ,
3086
+ CUEPOINTS_CHANGED = 'cuepointsChanged' ,
3087
+ ERROR = 'error' ,
3088
+ FIRST_QUARTILE = 'firstquartile' ,
3089
+ LOADED = 'loaded' ,
3090
+ MIDPOINT = 'midpoint' ,
3091
+ SKIPPABLE_STATE_CHANGED = 'skippableStateChanged' ,
3092
+ SKIPPED = 'skip' ,
3093
+ STARTED = 'started' ,
3094
+ STREAM_INITIALIZED = 'streamInitialized' ,
3095
+ THIRD_QUARTILE = 'thirdquartile' ,
3096
+ VIDEO_CLICKED = 'videoClicked' ,
3097
+ }
3098
+ }
3099
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3100
+ declare namespace google.ima.dai.api {
3101
+ class StreamManager implements EventTarget {
3102
+ private noStructuralTyping_google_ima_dai_api_StreamManager : any;
3103
+ constructor (videoElement : HTMLMediaElement | null , adUiElement ? : HTMLElement | null , uiSettings ? : google.ima.dai.api.UiSettings | null ) ;
3104
+ addEventListener (type : string | any [] | null , handler : null | object , capture ? : boolean | AddEventListenerOptions , handlerScope ? : object | null ) : any ;
3105
+ contentTimeForStreamTime (streamTime : number ) : any ;
3106
+ dispatchEvent ( ) : any ;
3107
+ onTimedMetadata (metadata : object | null ) : any ;
3108
+ previousCuePointForStreamTime (streamTime : number ) : any ;
3109
+ processMetadata (type : string , data : Uint8Array | null | string , timestamp : number ) : any ;
3110
+ removeEventListener ( ) : any ;
3111
+ replaceAdTagParameters (adTagParameters : object | null ) : any ;
3112
+ requestStream (streamRequest : google.ima.dai.api.StreamRequest | null ) : any ;
3113
+ reset ( ) : any ;
3114
+ setClickElement (clickElement : Element | null ) : any ;
3115
+ streamTimeForContentTime (contentTime : number ) : any ;
3116
+ }
3117
+ }
3118
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3119
+ declare namespace google.ima.dai.api.StreamRequest {
3120
+ enum StreamFormat {
3121
+ DASH = 'dash' ,
3122
+ HLS = 'hls' ,
3123
+ }
3124
+ }
3125
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/ima.js
3126
+ declare namespace google.ima {
3127
+ let settings : google.ima.ImaSdkSettings ;
3128
+ }
3129
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/jwk_set.js
3130
+ declare namespace ಠ_ಠ.clutz {
3131
+ /**
3132
+ * A JSON Web Key.
3133
+ */
3134
+ class JWK {
3135
+ private noStructuralTyping_JWK : any;
3136
+ /**
3137
+ * A key in base 64. Used with kty="oct".
3138
+ */
3139
+ k : string ;
3140
+ /**
3141
+ * A key ID. Any ASCII string.
3142
+ */
3143
+ kid : string ;
3144
+ /**
3145
+ * A key type. One of:
3146
+ * 1. "oct" (symmetric key octect sequence)
3147
+ * 2. "RSA" (RSA key)
3148
+ * 3. "EC" (elliptical curve key)
3149
+ * Use "oct" for clearkey.
3150
+ */
3151
+ kty : string ;
3152
+ }
3153
+ }
3154
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/jwk_set.js
3155
+ declare namespace ಠ_ಠ.clutz {
3156
+ /**
3157
+ * A JSON Web Key set.
3158
+ */
3159
+ class JWKSet {
3160
+ private noStructuralTyping_JWKSet : any;
3161
+ keys : ( JWK | null ) [] | null ;
3162
+ }
3163
+ }
3164
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3165
+ declare namespace LCEVCdec {
3166
+ /**
3167
+ * LCEVC Dec constructor
3168
+ */
3169
+ class LCEVCdec {
3170
+ private noStructuralTyping_LCEVCdec_LCEVCdec : any;
3171
+ /**
3172
+ * LCEVC Dec constructor
3173
+ */
3174
+ constructor (media : HTMLVideoElement | null , canvas : HTMLCanvasElement | null , lcevcConfig : shaka.extern.LcevcConfiguration ) ;
3175
+ /**
3176
+ * Append the video buffers before they are appended to
3177
+ * Media Source Extensions SourceBuffer. Here the lcevc data
3178
+ * will be parsed and managed to enhance frames based on timestamps.
3179
+ * @param data Video Buffer Data.
3180
+ * @param type Type of Video Buffer Data.
3181
+ * @param variantId Variant that the fragment belongs to.
3182
+ * @param timestampOffset Timestamp offset for appended segments
3183
+ */
3184
+ appendBuffer (data : ArrayBuffer | ArrayBufferView , type : string , variantId : number , timestampOffset : number ) : any ;
3185
+ /**
3186
+ * Close LCEVC DEC
3187
+ */
3188
+ close ( ) : any ;
3189
+ /**
3190
+ * Set container Format for LCEVC Data Parsing.
3191
+ * @param containerFormat container type of the stream.
3192
+ */
3193
+ setContainerFormat (containerFormat : number ) : any ;
3194
+ /**
3195
+ * Set current variant as variantId to the LCEVC decoder
3196
+ * @param autoBufferSwitch is lcevcDec mode that switches variant when the downloaded buffer from last variant has finished playing and buffers from the new variant starts to play.
3197
+ */
3198
+ setLevelSwitching (variantId : number , autoBufferSwitch : boolean ) : any ;
3199
+ /**
3200
+ * Set streaming Format for LCEVC Data Parsing.
3201
+ * @param streamingFormat container type of the stream.
3202
+ */
3203
+ setStreamingFormat (streamingFormat : number ) : any ;
3204
+ }
3205
+ }
3206
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3207
+ declare namespace LCEVCdec {
3208
+ /**
3209
+ * The older module interface, for backward compatibility.
3210
+ * Typed to the same interface, but under a different name.
3211
+ */
3212
+ export import LcevcDil = LCEVCdec.LCEVCdec ;
3213
+ }
3214
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3215
+ declare namespace LCEVCdec.SupportObject {
3216
+ /**
3217
+ * LCEVC Support CheckList Error if any.
3218
+ */
3219
+ let SupportError : string ;
3220
+ }
3221
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3222
+ declare namespace LCEVCdec.SupportObject {
3223
+ /**
3224
+ * LCEVC Support Checklist Result
3225
+ */
3226
+ let SupportStatus : boolean ;
3227
+ }
3228
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3229
+ declare namespace LCEVCdec.SupportObject {
3230
+ /**
3231
+ * Check if canvas has WebGL support
3232
+ */
3233
+ function webGLSupport (canvas : HTMLCanvasElement | null ) : boolean ;
3234
+ }
3235
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/lcevc.js
3236
+ declare namespace ಠ_ಠ.clutz {
3237
+ /**
3238
+ * Typedef for the module interface. Both LCEVCdec (new module) and LcevcDil
3239
+ * (old module) implement roughly the same interface.
3240
+ */
3241
+ type LCEVCmodule = typeof LCEVCdec ;
3242
+ }
3243
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/managedmediasource.js
3244
+ declare namespace ಠ_ಠ.clutz {
3245
+ class ManagedMediaSource extends MediaSource {
3246
+ private noStructuralTyping_ManagedMediaSource : any;
3247
+ static isTypeSupported (type : string ) : boolean ;
3248
+ }
3249
+ }
3250
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mdl.js
3251
+ declare namespace ಠ_ಠ.clutz {
3252
+ class MaterialLayout {
3253
+ private noStructuralTyping_MaterialLayout : any;
3254
+ Constant_ : { MENU_ICON : string } ;
3255
+ toggleDrawer ( ) : any ;
3256
+ }
3257
+ }
3258
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/media_remote.js
3259
+ declare namespace ಠ_ಠ.clutz {
3260
+ class RemotePlayback implements EventTarget {
3261
+ private noStructuralTyping_RemotePlayback : any;
3262
+ addEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , opt_options ? : boolean | AddEventListenerOptions ) : void ;
3263
+ /**
3264
+ * The cancelWatchAvailability() method of the RemotePlayback interface
3265
+ * cancels the request to watch for one or all available devices.
3266
+ */
3267
+ cancelWatchAvailability (id : number ) : Promise < any > ;
3268
+ dispatchEvent (evt : Event ) : boolean ;
3269
+ /**
3270
+ * The prompt() method of the RemotePlayback interface prompts the user
3271
+ * to select an available remote playback device and give permission
3272
+ * for the current media to be played using that device.
3273
+ *
3274
+ * If the user gives permission, the state will be set to connecting and
3275
+ * the user agent will connect to the device to initiate playback.
3276
+ *
3277
+ * If the user chooses to instead disconnect from the device, the state will
3278
+ * be set to disconnected and user agent will disconnect from this device.
3279
+ */
3280
+ prompt ( ) : Promise < any > ;
3281
+ removeEventListener (type : string , listener : EventListener | null | ( (a : Event ) => any ) , opt_options ? : boolean | EventListenerOptions ) : void ;
3282
+ /**
3283
+ * Represents the RemotePlayback connection's state.
3284
+ */
3285
+ state : string ;
3286
+ /**
3287
+ * The watchAvailability() method of the RemotePlayback interface watches
3288
+ * the list of available remote playback devices and returns a Promise that
3289
+ * resolves with the callbackId of a remote playback device.
3290
+ */
3291
+ watchAvailability (callback : (a : boolean ) => any ) : Promise < any > ;
3292
+ }
3293
+ }
3294
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediasession.js
3295
+ declare namespace ಠ_ಠ.clutz {
3296
+ class MediaMetadata {
3297
+ private noStructuralTyping_MediaMetadata : any;
3298
+ constructor (options : any ) ;
3299
+ artist : string ;
3300
+ artwork : object ;
3301
+ title : string ;
3302
+ }
3303
+ }
3304
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediasession.js
3305
+ declare namespace ಠ_ಠ.clutz {
3306
+ class MediaSession {
3307
+ private noStructuralTyping_MediaSession : any;
3308
+ callback (a : { action : string , seekOffset : number | null } ) : any ;
3309
+ metadata : MediaMetadata | null ;
3310
+ type : string ;
3311
+ setActionHandler (type : any , callback : any ) : any ;
3312
+ }
3313
+ }
3314
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3315
+ declare namespace mediaTailor {
3316
+ type Ad = { adId : string , adParameters : string , adSystem : string , adTitle : string , creativeId : string , creativeSequence : string , durationInSeconds : number , nonLinearAdList : mediaTailor.NonLinearAd [] , skipOffset : number | null , startTimeInSeconds : number , trackingEvents : mediaTailor.TrackingEvent [] } ;
3317
+ }
3318
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3319
+ declare namespace mediaTailor {
3320
+ type AdBreak = { adBreakTrackingEvents : mediaTailor.TrackingEvent [] , ads : mediaTailor.Ad [] , durationInSeconds : number , nonLinearAdsList : mediaTailor.Ad [] , startTimeInSeconds : number } ;
3321
+ }
3322
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3323
+ declare namespace mediaTailor {
3324
+ type NonLinearAd = { adId : string , adParameters : string , adSystem : string , adTitle : string , creativeAdId : string , creativeId : string , creativeSequence : string , height : number | null , staticResource : string , width : number | null } ;
3325
+ }
3326
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3327
+ declare namespace mediaTailor {
3328
+ type SessionResponse = { manifestUrl : string | null , trackingUrl : string | null } ;
3329
+ }
3330
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3331
+ declare namespace mediaTailor {
3332
+ type TrackingEvent = { beaconUrls : string [] , eventType : string } ;
3333
+ }
3334
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3335
+ declare namespace mediaTailor {
3336
+ type TrackingResponse = { avails : mediaTailor.AdBreak [] } ;
3337
+ }
3338
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3339
+ declare namespace mediaTailorExternalResource {
3340
+ type App = { data : mediaTailorExternalResource.AppData , placeholder : mediaTailorExternalResource.AppPlaceholder } ;
3341
+ }
3342
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3343
+ declare namespace mediaTailorExternalResource {
3344
+ type AppData = { source : mediaTailorExternalResource.AppDataSource [] } ;
3345
+ }
3346
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3347
+ declare namespace mediaTailorExternalResource {
3348
+ type AppDataSource = { url : string } ;
3349
+ }
3350
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3351
+ declare namespace mediaTailorExternalResource {
3352
+ type AppPlaceholder = { left : number , top : number } ;
3353
+ }
3354
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/mediatailor.js
3355
+ declare namespace mediaTailorExternalResource {
3356
+ type Response = { apps : mediaTailorExternalResource.App [] } ;
3357
+ }
3358
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/pictureinpicture.js
3359
+ declare namespace ಠ_ಠ.clutz {
3360
+ class DocumentPictureInPicture implements EventTarget {
3361
+ private noStructuralTyping_DocumentPictureInPicture : any;
3362
+ addEventListener (type : any , listener : any , options : any ) : any ;
3363
+ dispatchEvent (event : any ) : any ;
3364
+ removeEventListener (type : any , listener : any , options : any ) : any ;
3365
+ requestWindow (options : DocumentPictureInPictureOptions ) : Promise < Window | null > ;
3366
+ window : Window | null ;
3367
+ }
3368
+ }
3369
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/pictureinpicture.js
3370
+ declare namespace ಠ_ಠ.clutz {
3371
+ class DocumentPictureInPictureEvent extends Event {
3372
+ private noStructuralTyping_DocumentPictureInPictureEvent : any;
3373
+ constructor ( ) ;
3374
+ window : Window | null ;
3375
+ }
3376
+ }
3377
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/pictureinpicture.js
3378
+ declare namespace ಠ_ಠ.clutz {
3379
+ type DocumentPictureInPictureOptions = { height ? : number , width ? : number } ;
3380
+ }
3381
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/playstation.js
3382
+ declare namespace msdk.device {
3383
+ function getDisplayInfo ( ) : Promise < { resolution : string } > ;
3384
+ }
3385
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/playstation.js
3386
+ declare namespace msdk.device {
3387
+ function getDisplayInfoImmediate ( ) : Promise < { resolution : string } > ;
3388
+ }
3389
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/polyfill.js
3390
+ declare namespace window {
3391
+ let shakaMediaKeysPolyfill : boolean ;
3392
+ }
3393
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/prefixed_eme.js
3394
+ declare namespace ಠ_ಠ.clutz {
3395
+ class MediaKeyError {
3396
+ private noStructuralTyping_MediaKeyError : any;
3397
+ code : number ;
3398
+ systemCode : number ;
3399
+ }
3400
+ }
3401
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/prefixed_eme.js
3402
+ declare namespace ಠ_ಠ.clutz {
3403
+ class MediaKeyEvent extends Event {
3404
+ private noStructuralTyping_MediaKeyEvent : any;
3405
+ constructor (type : string , eventInitDict ? : object | null ) ;
3406
+ defaultURL : string ;
3407
+ errorCode : MediaKeyError | null ;
3408
+ initData : Uint8Array ;
3409
+ keySystem : string ;
3410
+ message : Uint8Array ;
3411
+ sessionId : string ;
3412
+ systemCode : number ;
3413
+ target : HTMLMediaElement ;
3414
+ }
3415
+ }
3416
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/abortable.js
3417
+ declare namespace shaka.extern {
3418
+ /**
3419
+ * A representation of an abortable operation. Note that these are not
3420
+ * cancelable. Cancelation implies undoing what has been done so far,
3421
+ * whereas aborting only means that further work is stopped.
3422
+ */
3423
+ interface IAbortableOperation < T > {
3424
+ /**
3425
+ * Can be called by anyone holding this object to abort the underlying
3426
+ * operation. This is not cancelation, and will not necessarily result in
3427
+ * any work being undone. abort() should return a Promise which is resolved
3428
+ * when the underlying operation has been aborted. The returned Promise
3429
+ * should never be rejected.
3430
+ */
3431
+ abort ( ) : Promise < any > ;
3432
+ finally (onFinal : (a : boolean ) => any ) : shaka.extern.IAbortableOperation < T > ;
3433
+ /**
3434
+ * A Promise which represents the underlying operation. It is resolved when
3435
+ * the operation is complete, and rejected if the operation fails or is
3436
+ * aborted. Aborted operations should be rejected with a shaka.util.Error
3437
+ * object using the error code OPERATION_ABORTED.
3438
+ */
3439
+ promise : Promise < T > ;
3440
+ }
3441
+ }
3442
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/abr_manager.js
3443
+ declare namespace shaka.extern {
3444
+ /**
3445
+ * An object which selects Streams from a set of possible choices. This also
3446
+ * watches for system changes to automatically adapt for the current streaming
3447
+ * requirements. For example, when the network slows down, this class is in
3448
+ * charge of telling the Player which streams to switch to in order to reduce
3449
+ * the required bandwidth.
3450
+ *
3451
+ * This class is given a set of streams to choose from when the Player starts
3452
+ * up. This class should store these and use them to make future decisions
3453
+ * about ABR. It is up to this class how those decisions are made. All the
3454
+ * Player will do is tell this class what streams to choose from.
3455
+ */
3456
+ interface AbrManager {
3457
+ /**
3458
+ * Chooses one variant to switch to. Called by the Player.
3459
+ * @param preferFastSwitching If not provided meant "avoid fast switching if possible".
3460
+ */
3461
+ chooseVariant (preferFastSwitching ? : boolean ) : shaka.extern.Variant ;
3462
+ /**
3463
+ * Sets the ABR configuration.
3464
+ *
3465
+ * It is the responsibility of the AbrManager implementation to implement the
3466
+ * restrictions behavior described in shaka.extern.AbrConfiguration.
3467
+ */
3468
+ configure (config : shaka.extern.AbrConfiguration ) : any ;
3469
+ /**
3470
+ * Disables automatic Stream suggestions. After this, the AbrManager may not
3471
+ * call switchCallback().
3472
+ */
3473
+ disable ( ) : any ;
3474
+ /**
3475
+ * Enables automatic Variant choices from the last ones passed to setVariants.
3476
+ * After this, the AbrManager may call switchCallback() at any time.
3477
+ */
3478
+ enable ( ) : any ;
3479
+ /**
3480
+ * Gets an estimate of the current bandwidth in bit/sec. This is used by the
3481
+ * Player to generate stats.
3482
+ */
3483
+ getBandwidthEstimate ( ) : number ;
3484
+ /**
3485
+ * Initializes the AbrManager.
3486
+ */
3487
+ init (switchCallback : shaka.extern.AbrManager.SwitchCallback ) : any ;
3488
+ /**
3489
+ * Updates manager playback rate.
3490
+ */
3491
+ playbackRateChanged (rate : number ) : any ;
3492
+ /**
3493
+ * Request that this object release all internal references.
3494
+ */
3495
+ release ( ) : any ;
3496
+ /**
3497
+ * Notifies the AbrManager that a segment has been downloaded (includes MP4
3498
+ * SIDX data, WebM Cues data, initialization segments, and media segments).
3499
+ * @param deltaTimeMs The duration, in milliseconds, that the request took to complete.
3500
+ * @param numBytes The total number of bytes transferred.
3501
+ * @param allowSwitch Indicate if the segment is allowed to switch to another stream.
3502
+ * @param request A reference to the request
3503
+ */
3504
+ segmentDownloaded (deltaTimeMs : number , numBytes : number , allowSwitch : boolean , request ? : shaka.extern.Request ) : any ;
3505
+ /**
3506
+ * Set CMSD manager.
3507
+ */
3508
+ setCmsdManager (cmsdManager : shaka.util.CmsdManager | null ) : any ;
3509
+ /**
3510
+ * Set media element.
3511
+ */
3512
+ setMediaElement (mediaElement : HTMLMediaElement | null ) : any ;
3513
+ /**
3514
+ * Updates manager's variants collection.
3515
+ */
3516
+ setVariants (variants : shaka.extern.Variant [] ) : any ;
3517
+ /**
3518
+ * Stops any background timers and frees any objects held by this instance.
3519
+ * This will only be called after a call to init.
3520
+ */
3521
+ stop ( ) : any ;
3522
+ /**
3523
+ * Notifies the ABR that it is a time to suggest new streams. This is used by
3524
+ * the Player when it finishes adding the last partial segment of a fast
3525
+ * switching stream.
3526
+ */
3527
+ trySuggestStreams ( ) : any ;
3528
+ }
3529
+ }
3530
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/abr_manager.js
3531
+ declare namespace shaka.extern.AbrManager {
3532
+ /**
3533
+ * A factory for creating the abr manager.
3534
+ */
3535
+ type Factory = ( ) => shaka.extern.AbrManager ;
3536
+ }
3537
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/abr_manager.js
3538
+ declare namespace shaka.extern.AbrManager {
3539
+ /**
3540
+ * A callback into the Player that should be called when the AbrManager decides
3541
+ * it's time to change to a different variant.
3542
+ *
3543
+ * The first argument is a variant to switch to.
3544
+ *
3545
+ * The second argument is an optional boolean. If true, all data will be removed
3546
+ * from the buffer, which will result in a buffering event. Unless a third
3547
+ * argument is passed.
3548
+ *
3549
+ * The third argument in an optional number that specifies how much data (in
3550
+ * seconds) should be retained when clearing the buffer. This can help achieve
3551
+ * a fast switch that doesn't involve a buffering event. A minimum of two video
3552
+ * segments should always be kept buffered to avoid temporary hiccups.
3553
+ */
3554
+ type SwitchCallback = (a : shaka.extern.Variant , b ? : boolean , c ? : number ) => any ;
3555
+ }
3556
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/ads.js
3557
+ declare namespace shaka.extern {
3558
+ type AdCuePoint = { end : number | null , start : number } ;
3559
+ }
3560
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/ads.js
3561
+ declare namespace shaka.extern {
3562
+ type AdsStats = { loadTimes : number [] , playedCompletely : number , skipped : number , started : number } ;
3563
+ }
3564
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/ads.js
3565
+ declare namespace shaka.extern {
3566
+ /**
3567
+ * Interface for Ad objects.
3568
+ */
3569
+ interface IAd extends shaka.util.IReleasable {
3570
+ canSkipNow ( ) : boolean ;
3571
+ getAdId ( ) : string ;
3572
+ getAdvertiserName ( ) : string ;
3573
+ getCreativeAdId ( ) : string ;
3574
+ getDescription ( ) : string ;
3575
+ getDuration ( ) : number ;
3576
+ getMediaUrl ( ) : string | null ;
3577
+ /**
3578
+ * Gets the minimum suggested duration. Defaults to being equivalent to
3579
+ * getDuration() for server-side ads.
3580
+ */
3581
+ getMinSuggestedDuration ( ) : number ;
3582
+ getPodIndex ( ) : number ;
3583
+ getPositionInSequence ( ) : number ;
3584
+ getRemainingTime ( ) : number ;
3585
+ getSequenceLength ( ) : number ;
3586
+ getTimeOffset ( ) : number ;
3587
+ getTimeUntilSkippable ( ) : number ;
3588
+ getTitle ( ) : string ;
3589
+ getVastMediaBitrate ( ) : number ;
3590
+ getVastMediaHeight ( ) : number ;
3591
+ getVastMediaWidth ( ) : number ;
3592
+ getVolume ( ) : number ;
3593
+ isLinear ( ) : boolean ;
3594
+ isMuted ( ) : boolean ;
3595
+ isPaused ( ) : boolean ;
3596
+ isSkippable ( ) : boolean ;
3597
+ pause ( ) : any ;
3598
+ play ( ) : any ;
3599
+ resize (width : number , height : number ) : any ;
3600
+ setMuted (muted : boolean ) : any ;
3601
+ setVolume (volume : number ) : any ;
3602
+ skip ( ) : any ;
3603
+ }
3604
+ }
3605
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/ads.js
3606
+ declare namespace shaka.extern {
3607
+ /**
3608
+ * An object that's responsible for all the ad-related logic
3609
+ * in the player.
3610
+ */
3611
+ interface IAdManager extends EventTarget {
3612
+ addMediaTailorTrackingUrl (url : string ) : any ;
3613
+ /**
3614
+ * Called by the Player to provide an updated configuration any time it
3615
+ * changes.
3616
+ * Must be called at least once before init*().
3617
+ */
3618
+ configure (config : shaka.extern.AdsConfiguration ) : any ;
3619
+ getCuePoints ( ) : shaka.extern.AdCuePoint [] ;
3620
+ getServerSideCuePoints ( ) : shaka.extern.AdCuePoint [] ;
3621
+ /**
3622
+ * Get statistics for the current playback session. If the player is not
3623
+ * playing content, this will return an empty stats object.
3624
+ */
3625
+ getStats ( ) : any ;
3626
+ initClientSide (adContainer : HTMLElement , video : HTMLMediaElement , adsRenderingSettings : google.ima.AdsRenderingSettings | null ) : any ;
3627
+ initMediaTailor (adContainer : HTMLElement , networkingEngine : shaka.net.NetworkingEngine , video : HTMLMediaElement ) : any ;
3628
+ initServerSide (adContainer : HTMLElement , video : HTMLMediaElement ) : any ;
3629
+ onAssetUnload ( ) : any ;
3630
+ onCueMetadataChange (value : shaka.extern.MetadataFrame ) : any ;
3631
+ onDashTimedMetadata (region : shaka.extern.TimelineRegionInfo ) : any ;
3632
+ onHlsTimedMetadata (metadata : shaka.extern.ID3Metadata , timestampOffset : number ) : any ;
3633
+ /**
3634
+ * Fired when the manifest is updated.
3635
+ */
3636
+ onManifestUpdated (isLive : boolean ) : any ;
3637
+ release ( ) : any ;
3638
+ replaceServerSideAdTagParameters (adTagParameters : object | null ) : any ;
3639
+ requestClientSideAds (imaRequest : google.ima.AdsRequest ) : any ;
3640
+ requestMediaTailorStream (url : string , adsParams : object | null , backupUrl ? : string ) : Promise < string > ;
3641
+ requestServerSideStream (imaRequest : google.ima.dai.api.StreamRequest , backupUrl ? : string ) : Promise < string > ;
3642
+ setLocale (locale : string ) : any ;
3643
+ updateClientSideAdsRenderingSettings (adsRenderingSettings : google.ima.AdsRenderingSettings ) : any ;
3644
+ }
3645
+ }
3646
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/ads.js
3647
+ declare namespace shaka.extern.IAdManager {
3648
+ /**
3649
+ * A factory for creating the ad manager.
3650
+ */
3651
+ type Factory = ( ) => shaka.extern.IAdManager ;
3652
+ }
3653
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3654
+ declare namespace shaka.extern {
3655
+ type CaptionDecoderPlugin = ( ) => shaka.extern.ICaptionDecoder ;
3656
+ }
3657
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3658
+ declare namespace shaka.extern {
3659
+ type CeaParserPlugin = ( ) => shaka.extern.ICeaParser ;
3660
+ }
3661
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3662
+ declare namespace shaka.extern {
3663
+ /**
3664
+ * Interface for decoding inband closed captions from packets.
3665
+ */
3666
+ interface ICaptionDecoder {
3667
+ /**
3668
+ * Clears the decoder state completely.
3669
+ * Should be used when an action renders the decoder state invalid,
3670
+ * e.g. unbuffered seeks.
3671
+ */
3672
+ clear ( ) : any ;
3673
+ /**
3674
+ * Decodes all currently extracted packets and then clears them.
3675
+ * This should be called once for a set of extracts (see comment on extract).
3676
+ */
3677
+ decode ( ) : shaka.extern.ICaptionDecoder.ClosedCaption [] ;
3678
+ /**
3679
+ * Extracts packets and prepares them for decoding. In a given media fragment,
3680
+ * all the caption packets found in its SEI messages should be extracted by
3681
+ * successive calls to extract(), followed by a single call to decode().
3682
+ * @param userDataSeiMessage This is a User Data registered by Rec.ITU-T T.35 SEI message. It is described in sections D.1.6 and D.2.6 of Rec. ITU-T H.264 (06/2019).
3683
+ * @param pts PTS when this packet was received, in seconds.
3684
+ */
3685
+ extract (userDataSeiMessage : Uint8Array , pts : number ) : any ;
3686
+ /**
3687
+ * Returns the streams that the CEA decoder found.
3688
+ */
3689
+ getStreams ( ) : string [] ;
3690
+ }
3691
+ }
3692
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3693
+ declare namespace shaka.extern.ICaptionDecoder {
3694
+ /**
3695
+ * Parsed Cue.
3696
+ */
3697
+ type ClosedCaption = { cue : shaka.text.Cue , stream : string } ;
3698
+ }
3699
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3700
+ declare namespace shaka.extern {
3701
+ /**
3702
+ * Interface for parsing inband closed caption data from MP4 streams.
3703
+ */
3704
+ interface ICeaParser {
3705
+ /**
3706
+ * Initializes the parser with init segment data.
3707
+ * @param initSegment init segment to parse.
3708
+ */
3709
+ init (initSegment : ArrayBuffer | ArrayBufferView ) : any ;
3710
+ /**
3711
+ * Parses the stream and extracts closed captions packets.
3712
+ * @param mediaSegment media segment to parse.
3713
+ */
3714
+ parse (mediaSegment : ArrayBuffer | ArrayBufferView ) : shaka.extern.ICeaParser.CaptionPacket [] ;
3715
+ }
3716
+ }
3717
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/cea.js
3718
+ declare namespace shaka.extern.ICeaParser {
3719
+ type CaptionPacket = { packet : Uint8Array , pts : number } ;
3720
+ }
3721
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/codecs.js
3722
+ declare namespace shaka.extern {
3723
+ type MPEG_PES = { data : Uint8Array , dts : number | null , nalus : shaka.extern.VideoNalu [] , packetLength : number , pts : number | null } ;
3724
+ }
3725
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/codecs.js
3726
+ declare namespace shaka.extern {
3727
+ type SpatialVideoInfo = { hfov : number | null , projection : string | null } ;
3728
+ }
3729
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/codecs.js
3730
+ declare namespace shaka.extern {
3731
+ type VideoNalu = { data : Uint8Array , fullData : Uint8Array , time : number | null , type : number } ;
3732
+ }
3733
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/error.js
3734
+ declare namespace shaka.extern {
3735
+ interface Error {
3736
+ category : shaka.util.Error.Category ;
3737
+ code : shaka.util.Error.Code ;
3738
+ data : any [] ;
3739
+ handled : boolean ;
3740
+ severity : shaka.util.Error.Severity ;
3741
+ }
3742
+ }
3743
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/error.js
3744
+ declare namespace shaka.extern {
3745
+ type RestrictionInfo = { hasAppRestrictions : boolean , missingKeys : string [] , restrictedKeyStatuses : string [] } ;
3746
+ }
3747
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3748
+ declare namespace shaka.extern {
3749
+ /**
3750
+ * Creates a SegmentIndex; returns a Promise that resolves after the
3751
+ * SegmentIndex has been created.
3752
+ */
3753
+ type CreateSegmentIndexFunction = ( ) => Promise < any > ;
3754
+ }
3755
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3756
+ declare namespace shaka.extern {
3757
+ type DrmInfo = { audioRobustness : string , distinctiveIdentifierRequired : boolean , encryptionScheme : string , initData : shaka.extern.InitDataOverride [] | null , keyIds : Set < string > | null , keySystem : string , licenseServerUri : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string } ;
3758
+ }
3759
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3760
+ declare namespace shaka.extern {
3761
+ /**
3762
+ * A function that fetches the crypto keys for AES-128.
3763
+ * Returns a promise that resolves when the keys have been fetched.
3764
+ */
3765
+ type FetchCryptoKeysFunction = ( ) => Promise < any > ;
3766
+ }
3767
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3768
+ declare namespace shaka.extern {
3769
+ type InitDataOverride = { initData : Uint8Array , initDataType : string , keyId : string | null } ;
3770
+ }
3771
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3772
+ declare namespace shaka.extern {
3773
+ type Manifest = { ignoreManifestTimestampsInSegmentsMode : boolean , imageStreams : shaka.extern.Stream [] , minBufferTime : number , offlineSessionIds : string [] , presentationTimeline : shaka.media.PresentationTimeline , sequenceMode : boolean , serviceDescription : shaka.extern.ServiceDescription | null , textStreams : shaka.extern.Stream [] , type : string , variants : shaka.extern.Variant [] } ;
3774
+ }
3775
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3776
+ declare namespace shaka.extern {
3777
+ type MssPrivateData = { codecPrivateData : string | null , duration : number , timescale : number } ;
3778
+ }
3779
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3780
+ declare namespace shaka.extern {
3781
+ type Period = { audioStreams : shaka.extern.Stream [] , id : string , imageStreams : shaka.extern.Stream [] , textStreams : shaka.extern.Stream [] , videoStreams : shaka.extern.Stream [] } ;
3782
+ }
3783
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3784
+ declare namespace shaka.extern {
3785
+ /**
3786
+ * SegmentIndex minimal API.
3787
+ */
3788
+ interface SegmentIndex {
3789
+ /**
3790
+ * Finds the position of the segment for the given time, in seconds, relative
3791
+ * to the start of the presentation. Returns the position of the segment
3792
+ * with the largest end time if more than one segment is known for the given
3793
+ * time.
3794
+ */
3795
+ find (time : number ) : number | null ;
3796
+ /**
3797
+ * Gets the SegmentReference for the segment at the given position.
3798
+ * @param position The position of the segment as returned by find().
3799
+ */
3800
+ get (position : number ) : shaka.media.SegmentReference | null ;
3801
+ /**
3802
+ * Gets number of already evicted segments.
3803
+ */
3804
+ getNumEvicted ( ) : number ;
3805
+ /**
3806
+ * Get number of references.
3807
+ */
3808
+ getNumReferences ( ) : number ;
3809
+ }
3810
+ }
3811
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3812
+ declare namespace shaka.extern {
3813
+ type ServiceDescription = { maxLatency : number | null , maxPlaybackRate : number | null , minLatency : number | null , minPlaybackRate : number | null } ;
3814
+ }
3815
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3816
+ declare namespace shaka.extern {
3817
+ type Stream = { accessibilityPurpose : shaka.media.ManifestParser.AccessibilityPurpose | null , audioSamplingRate : number | null , bandwidth ? : number , channelsCount : number | null , closeSegmentIndex ? : ( ) => any , closedCaptions : Map < string , string > | null , codecs : string , createSegmentIndex : shaka.extern.CreateSegmentIndexFunction , drmInfos : shaka.extern.DrmInfo [] , emsgSchemeIdUris : string [] | null , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , fullMimeTypes : Set < string > , groupId : string | null , hdr ? : string , height ? : number , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , matchedStreams ? : any [] , mimeType : string , mssPrivateData ? : shaka.extern.MssPrivateData , originalId : string | null , originalLanguage : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segmentIndex : shaka.media.SegmentIndex | null , spatialAudio : boolean , tilesLayout ? : string , trickModeVideo : any , type : string , videoLayout ? : string , width ? : number } ;
3818
+ }
3819
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3820
+ declare namespace shaka.extern {
3821
+ type Variant = { allowedByApplication : boolean , allowedByKeySystem : boolean , audio : shaka.extern.Stream | null , bandwidth : number , decodingInfos : ( any | null ) [] , disabledUntilTime : number , id : number , language : string , primary : boolean , video : shaka.extern.Stream | null } ;
3822
+ }
3823
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest.js
3824
+ declare namespace shaka.extern {
3825
+ type aesKey = { bitsKey : number , blockCipherMode : string , cryptoKey ? : webCrypto.CryptoKey | null , fetchKey ? : shaka.extern.CreateSegmentIndexFunction , firstMediaSequenceNumber : number , iv ? : Uint8Array } ;
3826
+ }
3827
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest_parser.js
3828
+ declare namespace shaka.extern {
3829
+ /**
3830
+ * Parses media manifests and handles manifest updates.
3831
+ *
3832
+ * Given a URI where the initial manifest is found, a parser will request the
3833
+ * manifest, parse it, and return the resulting Manifest object.
3834
+ *
3835
+ * If the manifest requires updates (e.g. for live media), the parser will use
3836
+ * background timers to update the same Manifest object.
3837
+ *
3838
+ * There are many ways for |start| and |stop| to be called. Implementations
3839
+ * should support all cases:
3840
+ *
3841
+ * BASIC
3842
+ * await parser.start(uri, playerInterface);
3843
+ * await parser.stop();
3844
+ *
3845
+ * INTERRUPTING
3846
+ * const p = parser.start(uri, playerInterface);
3847
+ * await parser.stop();
3848
+ * await p;
3849
+ *
3850
+ * |p| should be rejected with an OPERATION_ABORTED error.
3851
+ *
3852
+ * STOPPED BEFORE STARTING
3853
+ * await parser.stop();
3854
+ */
3855
+ interface ManifestParser {
3856
+ /**
3857
+ * Tells the parser that a location should be banned. This is called on
3858
+ * retry.
3859
+ */
3860
+ banLocation (uri : string ) : any ;
3861
+ /**
3862
+ * Called by the Player to provide an updated configuration any time the
3863
+ * configuration changes. Will be called at least once before start().
3864
+ */
3865
+ configure (config : shaka.extern.ManifestConfiguration ) : any ;
3866
+ /**
3867
+ * Tells the parser that the expiration time of an EME session has changed.
3868
+ * Implementing this is optional.
3869
+ */
3870
+ onExpirationUpdated (sessionId : string , expiration : number ) : any ;
3871
+ /**
3872
+ * Tells the parser that the initial variant has been chosen.
3873
+ */
3874
+ onInitialVariantChosen (variant : shaka.extern.Variant ) : any ;
3875
+ /**
3876
+ * Initialize and start the parser. When |start| resolves, it should return
3877
+ * the initial version of the manifest. |start| will only be called once. If
3878
+ * |stop| is called while |start| is pending, |start| should reject.
3879
+ * @param uri The URI of the manifest.
3880
+ * @param playerInterface The player interface contains the callbacks and members that the parser can use to communicate with the player and outside world.
3881
+ */
3882
+ start (uri : string , playerInterface : shaka.extern.ManifestParser.PlayerInterface ) : Promise < shaka.extern.Manifest > ;
3883
+ /**
3884
+ * Tell the parser that it must stop and free all internal resources as soon
3885
+ * as possible. Only once all internal resources are stopped and freed will
3886
+ * the promise resolve. Once stopped a parser will not be started again.
3887
+ *
3888
+ * The parser should support having |stop| called multiple times and the
3889
+ * promise should always resolve.
3890
+ */
3891
+ stop ( ) : Promise < any > ;
3892
+ /**
3893
+ * Tells the parser to do a manual manifest update. Implementing this is
3894
+ * optional. This is only called when 'emsg' boxes are present.
3895
+ */
3896
+ update ( ) : any ;
3897
+ }
3898
+ }
3899
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest_parser.js
3900
+ declare namespace shaka.extern.ManifestParser {
3901
+ /**
3902
+ * A factory for creating the manifest parser. This function is registered with
3903
+ * shaka.media.ManifestParser to create parser instances.
3904
+ */
3905
+ type Factory = ( ) => shaka.extern.ManifestParser ;
3906
+ }
3907
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/manifest_parser.js
3908
+ declare namespace shaka.extern.ManifestParser {
3909
+ type PlayerInterface = { enableLowLatencyMode : ( ) => any , filter : (a : shaka.extern.Manifest ) => Promise < any > , getBandwidthEstimate : ( ) => number , isAutoLowLatencyMode : ( ) => boolean , isLowLatencyMode : ( ) => boolean , makeTextStreamsForClosedCaptions : (a : shaka.extern.Manifest ) => any , networkingEngine : shaka.net.NetworkingEngine , newDrmInfo : (a : shaka.extern.Stream ) => any , onError : (a : shaka.util.Error ) => any , onEvent : shaka.util.EventManager.ListenerType , onManifestUpdated : ( ) => any , onTimelineRegionAdded : (a : shaka.extern.TimelineRegionInfo ) => any , updateDuration : ( ) => any } ;
3910
+ }
3911
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/mp4_parser.js
3912
+ declare namespace shaka.extern {
3913
+ type ParsedBox = { flags : number | null , has64BitSize : boolean , name : string , parser : shaka.util.Mp4Parser , partialOkay : boolean , reader : shaka.util.DataViewReader , size : number , start : number , version : number | null } ;
3914
+ }
3915
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3916
+ declare namespace shaka.extern {
3917
+ type HeadersReceived = (a : { [ key: string ]: string } ) => any ;
3918
+ }
3919
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3920
+ declare namespace shaka.extern {
3921
+ type ProgressUpdated = (a : number , b : number , c : number ) => any ;
3922
+ }
3923
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3924
+ declare namespace shaka.extern {
3925
+ type Request = { allowCrossSiteCredentials : boolean , body : ArrayBuffer | ArrayBufferView | null , contentType ? : string | null , drmInfo : shaka.extern.DrmInfo | null , headers : { [ key: string ]: string } , initData : Uint8Array | null , initDataType : string | null , licenseRequestType : string | null , method : string , packetNumber ? : number | null , requestStartTime ? : number | null , retryParameters : shaka.extern.RetryParameters , sessionId : string | null , streamDataCallback : ( (a : ArrayBuffer | ArrayBufferView ) => Promise < any > ) | null , timeToFirstByte ? : number | null , uris : string [] } ;
3926
+ }
3927
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3928
+ declare namespace shaka.extern {
3929
+ type RequestContext = { segment ? : shaka.media.SegmentReference | null , stream ? : shaka.extern.Stream , type ? : shaka.net.NetworkingEngine.AdvancedRequestType } ;
3930
+ }
3931
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3932
+ declare namespace shaka.extern {
3933
+ /**
3934
+ * Defines a filter for requests. This filter takes the request and modifies
3935
+ * it before it is sent to the scheme plugin.
3936
+ * The RequestType describes the basic type of the request (manifest, segment,
3937
+ * etc). The optional RequestContext will be provided where applicable to
3938
+ * provide additional information about the request. A request filter can run
3939
+ * asynchronously by returning a promise; in this case, the request will not be
3940
+ * sent until the promise is resolved.
3941
+ */
3942
+ type RequestFilter = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Request , c ? : shaka.extern.RequestContext ) => Promise < any > | void ;
3943
+ }
3944
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3945
+ declare namespace shaka.extern {
3946
+ type Response = { data : ArrayBuffer | ArrayBufferView , fromCache ? : boolean , headers : { [ key: string ]: string } , originalUri : string , status ? : number , timeMs ? : number , uri : string } ;
3947
+ }
3948
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3949
+ declare namespace shaka.extern {
3950
+ /**
3951
+ * Defines a filter for responses. This filter takes the response and modifies
3952
+ * it before it is returned.
3953
+ * The RequestType describes the basic type of the request (manifest, segment,
3954
+ * etc). The optional RequestContext will be provided where applicable to
3955
+ * provide additional information about the request. A response filter can run
3956
+ * asynchronously by returning a promise.
3957
+ */
3958
+ type ResponseFilter = (a : shaka.net.NetworkingEngine.RequestType , b : shaka.extern.Response , c ? : shaka.extern.RequestContext ) => Promise < any > | void ;
3959
+ }
3960
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3961
+ declare namespace shaka.extern {
3962
+ type RetryParameters = { backoffFactor : number , baseDelay : number , connectionTimeout : number , fuzzFactor : number , maxAttempts : number , stallTimeout : number , timeout : number } ;
3963
+ }
3964
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/net.js
3965
+ declare namespace shaka.extern {
3966
+ type SchemePlugin = (a : string , b : shaka.extern.Request , c : shaka.net.NetworkingEngine.RequestType , d : shaka.extern.ProgressUpdated , e : shaka.extern.HeadersReceived ) => shaka.extern.IAbortableOperation < shaka.extern.Response > ;
3967
+ }
3968
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
3969
+ declare namespace shaka.extern {
3970
+ type EmeSessionDB = { audioCapabilities : { contentType : string , robustness : string } [] , keySystem : string , licenseUri : string , serverCertificate : Uint8Array | null , sessionId : string , videoCapabilities : { contentType : string , robustness : string } [] } ;
3971
+ }
3972
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
3973
+ declare namespace shaka.extern {
3974
+ /**
3975
+ * Similar to storage cells (shaka.extern.StorageCell), an EmeSessionStorageCell
3976
+ * stores data persistently. This only stores the license's session info, not
3977
+ * the license itself. The license itself is stored using EME.
3978
+ */
3979
+ interface EmeSessionStorageCell {
3980
+ /**
3981
+ * Adds the given sessions to the store.
3982
+ */
3983
+ add (sessions : shaka.extern.EmeSessionDB [] ) : Promise < any > ;
3984
+ /**
3985
+ * Free all resources used by this cell. This won't affect the stored content.
3986
+ */
3987
+ destroy ( ) : Promise < any > ;
3988
+ /**
3989
+ * Gets the currently stored sessions.
3990
+ */
3991
+ getAll ( ) : Promise < shaka.extern.EmeSessionDB [] > ;
3992
+ /**
3993
+ * Removes the given session IDs from the store.
3994
+ */
3995
+ remove (sessionIds : string [] ) : Promise < any > ;
3996
+ }
3997
+ }
3998
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
3999
+ declare namespace shaka.extern {
4000
+ type ManifestDB = { appMetadata : object | null , creationTime : number , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , isIncomplete ? : boolean , originalManifestUri : string , sequenceMode ? : boolean , sessionIds : string [] , size : number , streams : shaka.extern.StreamDB [] , type ? : string } ;
4001
+ }
4002
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4003
+ declare namespace shaka.extern {
4004
+ type OfflineSupport = { basic : boolean , encrypted : { [ key: string ]: boolean } } ;
4005
+ }
4006
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4007
+ declare namespace shaka.extern {
4008
+ type SegmentDB = { appendWindowEnd : number , appendWindowStart : number , codecs : string | null , dataKey : number , endTime : number , initSegmentKey : number | null , mimeType : string | null , pendingInitSegmentRefId ? : string , pendingSegmentRefId ? : string , startTime : number , tilesLayout : string | null , timestampOffset : number } ;
4009
+ }
4010
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4011
+ declare namespace shaka.extern {
4012
+ type SegmentDataDB = { data : ArrayBuffer } ;
4013
+ }
4014
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4015
+ declare namespace shaka.extern {
4016
+ /**
4017
+ * An interface that defines access to collection of segments and manifests. All
4018
+ * methods are designed to be batched operations allowing the implementations to
4019
+ * optimize their operations based on how they store data.
4020
+ *
4021
+ * The storage cell is one of two exposed APIs used to control where and how
4022
+ * offline content is saved. The storage cell is responsible for converting
4023
+ * information between its internal structures and the external (library)
4024
+ * structures.
4025
+ */
4026
+ interface StorageCell {
4027
+ /**
4028
+ * Add a group of manifests. Will return a promise that resolves with a list
4029
+ * of keys for each manifest. If one manifest fails to be added, all manifests
4030
+ * should fail to be added.
4031
+ */
4032
+ addManifests (manifests : shaka.extern.ManifestDB [] ) : Promise < number [] > ;
4033
+ /**
4034
+ * Add a group of segments. Will return a promise that resolves with a list
4035
+ * of keys for each segment. If one segment fails to be added, all segments
4036
+ * should fail to be added.
4037
+ */
4038
+ addSegments (segments : shaka.extern.SegmentDataDB [] ) : Promise < number [] > ;
4039
+ /**
4040
+ * Free all resources used by this cell. This should not affect the stored
4041
+ * content.
4042
+ */
4043
+ destroy ( ) : Promise < any > ;
4044
+ /**
4045
+ * Get all manifests stored in this cell. Since manifests are small compared
4046
+ * to the asset they describe, it is assumed that it is feasible to have them
4047
+ * all in main memory at one time.
4048
+ */
4049
+ getAllManifests ( ) : Promise < Map < number , shaka.extern.ManifestDB > > ;
4050
+ /**
4051
+ * Get a group of manifests using their keys to identify them. If any key is
4052
+ * not found, the promise chain will be rejected.
4053
+ */
4054
+ getManifests (keys : number [] ) : Promise < shaka.extern.ManifestDB [] > ;
4055
+ /**
4056
+ * Get a group of segments using their keys to identify them. If any key is
4057
+ * not found, the promise chain will be rejected.
4058
+ */
4059
+ getSegments (keys : number [] ) : Promise < shaka.extern.SegmentDataDB [] > ;
4060
+ /**
4061
+ * Check if the cell can support new keys. If a cell has a fixed key space,
4062
+ * then all add-operations will fail as no new keys can be added. All
4063
+ * remove-operations and update-operations should still work.
4064
+ */
4065
+ hasFixedKeySpace ( ) : boolean ;
4066
+ /**
4067
+ * Remove a group of manifests using their keys to identify them. If a key
4068
+ * is not found, then that removal should be considered successful.
4069
+ * @param onRemove A callback for when a manifest is removed from the cell. The key of the manifest will be passed to the callback.
4070
+ */
4071
+ removeManifests (keys : number [] , onRemove : (a : number ) => any ) : Promise < any > ;
4072
+ /**
4073
+ * Remove a group of segments using their keys to identify them. If a key
4074
+ * is not found, then that removal should be considered successful.
4075
+ * @param onRemove A callback for when a segment is removed from the cell. The key of the segment will be passed to the callback.
4076
+ */
4077
+ removeSegments (keys : number [] , onRemove : (a : number ) => any ) : Promise < any > ;
4078
+ /**
4079
+ * Updates the given manifest, stored at the given key.
4080
+ */
4081
+ updateManifest (key : number , manifest : shaka.extern.ManifestDB ) : Promise < any > ;
4082
+ /**
4083
+ * Replace the expiration time of the manifest stored under |key| with
4084
+ * |newExpiration|. If no manifest is found under |key| then this should
4085
+ * act as a no-op.
4086
+ */
4087
+ updateManifestExpiration (key : number , expiration : number ) : Promise < any > ;
4088
+ }
4089
+ }
4090
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4091
+ declare namespace shaka.extern {
4092
+ /**
4093
+ * Storage mechanisms are one of two exported storage APIs. Storage mechanisms
4094
+ * are groups of storage cells (shaka.extern.StorageCell). Storage mechanisms
4095
+ * are responsible for managing the life cycle of resources shared between
4096
+ * storage cells in the same block.
4097
+ *
4098
+ * For example, a storage mechanism may manage a single database connection
4099
+ * while each cell would manage different tables in the database via the same
4100
+ * connection.
4101
+ */
4102
+ interface StorageMechanism {
4103
+ /**
4104
+ * Free all resources used by the storage mechanism and its cells. This should
4105
+ * not affect the stored content.
4106
+ */
4107
+ destroy ( ) : Promise < any > ;
4108
+ /**
4109
+ * Erase all content from storage and leave storage in an empty state. Erase
4110
+ * may be called with or without |init|. This allows for storage to be wiped
4111
+ * in case of a version mismatch.
4112
+ *
4113
+ * After calling |erase|, the mechanism will be in an initialized state.
4114
+ */
4115
+ erase ( ) : Promise < any > ;
4116
+ /**
4117
+ * Get a map of all the cells managed by the storage mechanism. Editing the
4118
+ * map should have no effect on the storage mechanism. The map key is the
4119
+ * cell's address in the mechanism and should be consistent between calls to
4120
+ * |getCells|.
4121
+ */
4122
+ getCells ( ) : Map < string , shaka.extern.StorageCell > ;
4123
+ /**
4124
+ * Get the current EME session storage cell.
4125
+ */
4126
+ getEmeSessionCell ( ) : shaka.extern.EmeSessionStorageCell ;
4127
+ /**
4128
+ * Initialize the storage mechanism for first use. This should only be called
4129
+ * once. Calling |init| multiple times has an undefined behaviour.
4130
+ */
4131
+ init ( ) : Promise < any > ;
4132
+ }
4133
+ }
4134
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4135
+ declare namespace shaka.extern {
4136
+ type StoredContent = { appMetadata : object | null , duration : number , expiration : number , isIncomplete : boolean , offlineUri : string | null , originalManifestUri : string , size : number , tracks : shaka.extern.TrackList } ;
4137
+ }
4138
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline.js
4139
+ declare namespace shaka.extern {
4140
+ type StreamDB = { audioSamplingRate : number | null , channelsCount : number | null , closedCaptions : Map < string , string > | null , codecs : string , encrypted : boolean , external : boolean , fastSwitching : boolean , forced : boolean , frameRate ? : number , groupId : string | null , hdr ? : string , height : number | null , id : number , keyIds : Set < string > , kind ? : string , label : string | null , language : string , mimeType : string , originalId : string | null , originalLanguage ? : string | null , pixelAspectRatio ? : string , primary : boolean , roles : string [] , segments : shaka.extern.SegmentDB [] , spatialAudio : boolean , tilesLayout ? : string , type : string , variantIds : number [] , videoLayout ? : string , width : number | null } ;
4141
+ }
4142
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v1.js
4143
+ declare namespace shaka.extern {
4144
+ type ManifestDBV1 = { appMetadata : object | null , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , key : number , originalManifestUri : string , periods : shaka.extern.PeriodDBV1 [] , sessionIds : string [] , size : number } ;
4145
+ }
4146
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v1.js
4147
+ declare namespace shaka.extern {
4148
+ type PeriodDBV1 = { startTime : number , streams : shaka.extern.StreamDBV1 [] } ;
4149
+ }
4150
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v1.js
4151
+ declare namespace shaka.extern {
4152
+ type SegmentDBV1 = { endTime : number , startTime : number , uri : string } ;
4153
+ }
4154
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v1.js
4155
+ declare namespace shaka.extern {
4156
+ type SegmentDataDBV1 = { data : ArrayBuffer , key : number } ;
4157
+ }
4158
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v1.js
4159
+ declare namespace shaka.extern {
4160
+ type StreamDBV1 = { codecs : string , contentType : string , encrypted : boolean , frameRate ? : number , height : number | null , id : number , initSegmentUri : string | null , keyId : string | null , kind ? : string , label : string | null , language : string , mimeType : string , presentationTimeOffset : number , primary : boolean , segments : shaka.extern.SegmentDBV1 [] , variantIds : number [] , width : number | null } ;
4161
+ }
4162
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v2.js
4163
+ declare namespace shaka.extern {
4164
+ type ManifestDBV2 = { appMetadata : object | null , drmInfo : shaka.extern.DrmInfo | null , duration : number , expiration : number , originalManifestUri : string , periods : shaka.extern.PeriodDBV2 [] , sessionIds : string [] , size : number } ;
4165
+ }
4166
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v2.js
4167
+ declare namespace shaka.extern {
4168
+ type PeriodDBV2 = { startTime : number , streams : shaka.extern.StreamDBV2 [] } ;
4169
+ }
4170
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v2.js
4171
+ declare namespace shaka.extern {
4172
+ type SegmentDBV2 = { dataKey : number , endTime : number , startTime : number } ;
4173
+ }
4174
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v2.js
4175
+ declare namespace shaka.extern {
4176
+ type SegmentDataDBV2 = { data : ArrayBuffer } ;
4177
+ }
4178
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/offline_compat_v2.js
4179
+ declare namespace shaka.extern {
4180
+ type StreamDBV2 = { codecs : string , contentType : string , encrypted : boolean , frameRate ? : number , height : number | null , id : number , initSegmentKey : number | null , keyId : string | null , kind ? : string , label : string | null , language : string , mimeType : string , originalId : string | null , pixelAspectRatio ? : string , presentationTimeOffset : number , primary : boolean , segments : shaka.extern.SegmentDBV2 [] , variantIds : number [] , width : number | null } ;
4181
+ }
4182
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4183
+ declare namespace shaka.extern {
4184
+ type AbrConfiguration = { advanced : shaka.extern.AdvancedAbrConfiguration , bandwidthDowngradeTarget : number , bandwidthUpgradeTarget : number , clearBufferSwitch : boolean , defaultBandwidthEstimate : number , enabled : boolean , ignoreDevicePixelRatio : boolean , restrictToElementSize : boolean , restrictToScreenSize : boolean , restrictions : shaka.extern.Restrictions , safeMarginSwitch : number , switchInterval : number , useNetworkInformation : boolean } ;
4185
+ }
4186
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4187
+ declare namespace shaka.extern {
4188
+ type AdsConfiguration = { customPlayheadTracker : boolean , skipPlayDetection : boolean } ;
4189
+ }
4190
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4191
+ declare namespace shaka.extern {
4192
+ type AdvancedAbrConfiguration = { fastHalfLife : number , minBytes : number , minTotalBytes : number , slowHalfLife : number } ;
4193
+ }
4194
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4195
+ declare namespace shaka.extern {
4196
+ type AdvancedDrmConfiguration = { audioRobustness : string , distinctiveIdentifierRequired : boolean , individualizationServer : string , persistentStateRequired : boolean , serverCertificate : Uint8Array | null , serverCertificateUri : string , sessionType : string , videoRobustness : string } ;
4197
+ }
4198
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4199
+ declare namespace shaka.extern {
4200
+ type BufferedInfo = { audio : shaka.extern.BufferedRange [] , text : shaka.extern.BufferedRange [] , total : shaka.extern.BufferedRange [] , video : shaka.extern.BufferedRange [] } ;
4201
+ }
4202
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4203
+ declare namespace shaka.extern {
4204
+ type BufferedRange = { end : number , start : number } ;
4205
+ }
4206
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4207
+ declare namespace shaka.extern {
4208
+ type Chapter = { endTime : number , id : string , startTime : number , title : string } ;
4209
+ }
4210
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4211
+ declare namespace shaka.extern {
4212
+ type CmcdConfiguration = { contentId : string , enabled : boolean , includeKeys : string [] , rtpSafetyFactor : number , sessionId : string , useHeaders : boolean } ;
4213
+ }
4214
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4215
+ declare namespace shaka.extern {
4216
+ type CmsdConfiguration = { applyMaximumSuggestedBitrate : boolean , enabled : boolean , estimatedThroughputWeightRatio : number } ;
4217
+ }
4218
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4219
+ declare namespace shaka.extern {
4220
+ type DashManifestConfiguration = { autoCorrectDrift : boolean , clockSyncUri : string , disableXlinkProcessing : boolean , enableAudioGroups : boolean , enableFastSwitching : boolean , ignoreDrmInfo : boolean , ignoreEmptyAdaptationSet : boolean , ignoreMaxSegmentDuration : boolean , ignoreMinBufferTime : boolean , ignoreSuggestedPresentationDelay : boolean , initialSegmentLimit : number , keySystemsByURI : { [ key: string ]: string } , manifestPreprocessor : (a : Element ) => any , manifestPreprocessorTXml : (a : shaka.extern.xml.Node ) => any , multiTypeVariantsAllowed : boolean , sequenceMode : boolean , updatePeriod : number , useStreamOnceInPeriodFlattening : boolean , xlinkFailGracefully : boolean } ;
4221
+ }
4222
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4223
+ declare namespace shaka.extern {
4224
+ type DrmConfiguration = { advanced : { [ key: string ]: shaka.extern.AdvancedDrmConfiguration } | null , clearKeys : { [ key: string ]: string } , delayLicenseRequestUntilPlayed : boolean , ignoreDuplicateInitData : boolean , initDataTransform ? : shaka.extern.InitDataTransform , keySystemsMapping : { [ key: string ]: string } , logLicenseExchange : boolean , minHdcpVersion : string , parseInbandPsshEnabled : boolean , persistentSessionOnlinePlayback : boolean , persistentSessionsMetadata : shaka.extern.PersistentSessionMetadata [] , preferredKeySystems : string [] , retryParameters : shaka.extern.RetryParameters , servers : { [ key: string ]: string } , updateExpirationTime : number } ;
4225
+ }
4226
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4227
+ declare namespace shaka.extern {
4228
+ type DrmSessionMetadata = { initData : Uint8Array | null , initDataType : string | null , sessionId : string , sessionType : string } ;
4229
+ }
4230
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4231
+ declare namespace shaka.extern {
4232
+ type DrmSupportType = { encryptionSchemes : string [] , persistentState : boolean } ;
4233
+ }
4234
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4235
+ declare namespace shaka.extern {
4236
+ type EmsgInfo = { endTime : number , eventDuration : number , id : number , messageData : Uint8Array | null , presentationTimeDelta : number , schemeIdUri : string , startTime : number , timescale : number , value : string } ;
4237
+ }
4238
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4239
+ declare namespace shaka.extern {
4240
+ type HlsManifestConfiguration = { allowLowLatencyByteRangeOptimization : boolean , defaultAudioCodec : string , defaultVideoCodec : string , disableCodecGuessing : boolean , ignoreImageStreamFailures : boolean , ignoreManifestProgramDateTime : boolean , ignoreManifestProgramDateTimeForTypes : string [] , ignoreManifestTimestampsInSegmentsMode : boolean , ignoreTextStreamFailures : boolean , liveSegmentsDelay : number , mediaPlaylistFullMimeType : string , sequenceMode : boolean , useSafariBehaviorForLive : boolean } ;
4241
+ }
4242
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4243
+ declare namespace shaka.extern {
4244
+ type ID3Metadata = { cueTime : number | null , data : Uint8Array , dts : number | null , frames : shaka.extern.MetadataFrame [] , pts : number | null } ;
4245
+ }
4246
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4247
+ declare namespace shaka.extern {
4248
+ type InitDataTransform = (a : Uint8Array , b : string , c : shaka.extern.DrmInfo | null ) => Uint8Array ;
4249
+ }
4250
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4251
+ declare namespace shaka.extern {
4252
+ type LanguageRole = { label : string | null , language : string , role : string } ;
4253
+ }
4254
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4255
+ declare namespace shaka.extern {
4256
+ type LcevcConfiguration = { drawLogo : boolean , dynamicPerformanceScaling : boolean , enabled : boolean , logLevel : number } ;
4257
+ }
4258
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4259
+ declare namespace shaka.extern {
4260
+ type ManifestConfiguration = { availabilityWindowOverride : number , dash : shaka.extern.DashManifestConfiguration , defaultPresentationDelay : number , disableAudio : boolean , disableText : boolean , disableThumbnails : boolean , disableVideo : boolean , hls : shaka.extern.HlsManifestConfiguration , mss : shaka.extern.MssManifestConfiguration , raiseFatalErrorOnManifestUpdateRequestFailure : boolean , retryParameters : shaka.extern.RetryParameters , segmentRelativeVttTiming : boolean } ;
4261
+ }
4262
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4263
+ declare namespace shaka.extern {
4264
+ type MediaQualityInfo = { audioSamplingRate : number | null , bandwidth : number , channelsCount : number | null , codecs : string , contentType : string , frameRate : number | null , height : number | null , mimeType : string | null , pixelAspectRatio : string | null , width : number | null } ;
4265
+ }
4266
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4267
+ declare namespace shaka.extern {
4268
+ type MediaSourceConfiguration = { addExtraFeaturesToSourceBuffer : (a : string ) => string , codecSwitchingStrategy : shaka.config.CodecSwitchingStrategy , forceTransmux : boolean , insertFakeEncryptionInInit : boolean , modifyCueCallback : shaka.extern.TextParser.ModifyCueCallback } ;
4269
+ }
4270
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4271
+ declare namespace shaka.extern {
4272
+ type MetadataFrame = { data : ArrayBuffer | null | string | number , description : string , key : string , mimeType : string | null , pictureType : number | null } ;
4273
+ }
4274
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4275
+ declare namespace shaka.extern {
4276
+ type MetadataRawFrame = { data : Uint8Array | null , size : number , type : string } ;
4277
+ }
4278
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4279
+ declare namespace shaka.extern {
4280
+ type MssManifestConfiguration = { keySystemsBySystemId : { [ key: string ]: string } , manifestPreprocessor : (a : Element ) => any , manifestPreprocessorTXml : (a : shaka.extern.xml.Node ) => any , sequenceMode : boolean } ;
4281
+ }
4282
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4283
+ declare namespace shaka.extern {
4284
+ type OfflineConfiguration = { downloadSizeCallback : (a : number ) => Promise < boolean > , numberOfParallelDownloads : number , progressCallback : (a : shaka.extern.StoredContent , b : number ) => any , trackSelectionCallback : (a : shaka.extern.TrackList ) => Promise < shaka.extern.TrackList > , usePersistentLicense : boolean } ;
4285
+ }
4286
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4287
+ declare namespace shaka.extern {
4288
+ type PersistentSessionMetadata = { initData : Uint8Array | null , initDataType : string | null , sessionId : string } ;
4289
+ }
4290
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4291
+ declare namespace shaka.extern {
4292
+ type PlayerConfiguration = { abr : shaka.extern.AbrConfiguration , abrFactory : shaka.extern.AbrManager.Factory , ads : shaka.extern.AdsConfiguration , autoShowText : shaka.config.AutoShowText , cmcd : shaka.extern.CmcdConfiguration , cmsd : shaka.extern.CmsdConfiguration , drm : shaka.extern.DrmConfiguration , lcevc : shaka.extern.LcevcConfiguration , manifest : shaka.extern.ManifestConfiguration , mediaSource : shaka.extern.MediaSourceConfiguration , offline : shaka.extern.OfflineConfiguration , playRangeEnd : number , playRangeStart : number , preferForcedSubs : boolean , preferSpatialAudio : boolean , preferredAudioChannelCount : number , preferredAudioCodecs : string [] , preferredAudioLabel : string , preferredAudioLanguage : string , preferredDecodingAttributes : string [] , preferredTextLanguage : string , preferredTextRole : string , preferredVariantRole : string , preferredVideoCodecs : string [] , preferredVideoHdrLevel : string , preferredVideoLabel : string , preferredVideoLayout : string , restrictions : shaka.extern.Restrictions , streaming : shaka.extern.StreamingConfiguration , textDisplayFactory : shaka.extern.TextDisplayer.Factory , textDisplayer : shaka.extern.TextDisplayerConfiguration } ;
4293
+ }
4294
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4295
+ declare namespace shaka.extern {
4296
+ type ProducerReferenceTime = { programStartDate : Date | null , wallClockTime : number } ;
4297
+ }
4298
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4299
+ declare namespace shaka.extern {
4300
+ type Restrictions = { maxBandwidth : number , maxFrameRate : number , maxHeight : number , maxPixels : number , maxWidth : number , minBandwidth : number , minFrameRate : number , minHeight : number , minPixels : number , minWidth : number } ;
4301
+ }
4302
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4303
+ declare namespace shaka.extern {
4304
+ type StateChange = { duration : number , state : string , timestamp : number } ;
4305
+ }
4306
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4307
+ declare namespace shaka.extern {
4308
+ type Stats = { bufferingTime : number , bytesDownloaded : number , completionPercent : number , corruptedFrames : number , decodedFrames : number , drmTimeSeconds : number , droppedFrames : number , estimatedBandwidth : number , gapsJumped : number , height : number , licenseTime : number , liveLatency : number , loadLatency : number , manifestTimeSeconds : number , maxSegmentDuration : number , pauseTime : number , playTime : number , stallsDetected : number , stateHistory : shaka.extern.StateChange [] , streamBandwidth : number , switchHistory : shaka.extern.TrackChoice [] , width : number } ;
4309
+ }
4310
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4311
+ declare namespace shaka.extern {
4312
+ type StreamingConfiguration = { allowMediaSourceRecoveries : boolean , alwaysStreamText : boolean , autoLowLatencyMode : boolean , bufferBehind : number , bufferingGoal : number , disableAudioPrefetch : boolean , disableTextPrefetch : boolean , disableVideoPrefetch : boolean , dispatchAllEmsgBoxes : boolean , durationBackoff : number , evictionGoal : number , failureCallback : (a : shaka.util.Error ) => any , forceHTTPS : boolean , gapDetectionThreshold : number , gapJumpTimerTime : number , ignoreTextStreamFailures : boolean , inaccurateManifestTolerance : number , infiniteLiveStreamDuration : boolean , liveSync : boolean , liveSyncMaxLatency : number , liveSyncMinLatency : number , liveSyncMinPlaybackRate : number , liveSyncPanicMode : boolean , liveSyncPanicThreshold : number , liveSyncPlaybackRate : number , lowLatencyMode : boolean , maxDisabledTime : number , minTimeBetweenRecoveries : number , observeQualityChanges : boolean , parsePrftBox : boolean , preferNativeHls : boolean , prefetchAudioLanguages : string [] , rebufferingGoal : number , retryParameters : shaka.extern.RetryParameters , safeSeekOffset : number , segmentPrefetchLimit : number , stallEnabled : boolean , stallSkip : number , stallThreshold : number , startAtSegmentBoundary : boolean , updateIntervalSeconds : number , useNativeHlsForFairPlay : boolean , useNativeHlsOnSafari : boolean , vodDynamicPlaybackRate : boolean , vodDynamicPlaybackRateBufferRatio : number , vodDynamicPlaybackRateLowBufferRate : number } ;
4313
+ }
4314
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4315
+ declare namespace shaka.extern {
4316
+ type SupportType = { drm : { [ key: string ]: shaka.extern.DrmSupportType | null } , manifest : { [ key: string ]: boolean } , media : { [ key: string ]: boolean } } ;
4317
+ }
4318
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4319
+ declare namespace shaka.extern {
4320
+ type TextDisplayerConfiguration = { captionsUpdatePeriod : number } ;
4321
+ }
4322
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4323
+ declare namespace shaka.extern {
4324
+ type Thumbnail = { duration : number , height : number , imageHeight : number , imageWidth : number , positionX : number , positionY : number , segment : shaka.media.SegmentReference | null , sprite : boolean , startTime : number , uris : string [] , width : number } ;
4325
+ }
4326
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4327
+ declare namespace shaka.extern {
4328
+ type TimelineRegionInfo = { endTime : number , eventElement : Element | null , eventNode : shaka.extern.xml.Node | null , id : string , schemeIdUri : string , startTime : number , value : string } ;
4329
+ }
4330
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4331
+ declare namespace shaka.extern {
4332
+ type Track = { accessibilityPurpose : shaka.media.ManifestParser.AccessibilityPurpose | null , active : boolean , audioBandwidth : number | null , audioCodec : string | null , audioId : number | null , audioMimeType : string | null , audioRoles : string [] | null , audioSamplingRate : number | null , bandwidth : number , channelsCount : number | null , codecs : string | null , forced : boolean , frameRate : number | null , hdr : string | null , height : number | null , id : number , kind : string | null , label : string | null , language : string , mimeType : string | null , originalAudioId : string | null , originalImageId : string | null , originalLanguage : string | null , originalTextId : string | null , originalVideoId : string | null , pixelAspectRatio : string | null , primary : boolean , roles : string [] , spatialAudio : boolean , tilesLayout : string | null , type : string , videoBandwidth : number | null , videoCodec : string | null , videoId : number | null , videoLayout : string | null , videoMimeType : string | null , width : number | null } ;
4333
+ }
4334
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4335
+ declare namespace shaka.extern {
4336
+ type TrackChoice = { bandwidth : number | null , fromAdaptation : boolean , id : number , timestamp : number , type : string } ;
4337
+ }
4338
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4339
+ declare namespace shaka.extern {
4340
+ type TrackList = shaka.extern.Track [] ;
4341
+ }
4342
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/player.js
4343
+ declare namespace shaka.extern.xml {
4344
+ type Node = { attributes : { [ key: string ]: string } , children : any [] , parent : any , tagName : string } ;
4345
+ }
4346
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4347
+ declare namespace shaka.extern {
4348
+ interface TextDisplayer extends shaka.util.IDestroyable {
4349
+ /**
4350
+ * Append given text cues to the list of cues to be displayed.
4351
+ * @param cues Text cues to be appended.
4352
+ */
4353
+ append (cues : shaka.text.Cue [] ) : any ;
4354
+ /**
4355
+ * Sets the TextDisplayer configuration.
4356
+ */
4357
+ configure (config : shaka.extern.TextDisplayerConfiguration ) : any ;
4358
+ destroy ( ) : Promise < any > ;
4359
+ /**
4360
+ * Returns true if text is currently visible.
4361
+ */
4362
+ isTextVisible ( ) : boolean ;
4363
+ /**
4364
+ * Remove all cues that are fully contained by the given time range (relative
4365
+ * to the presentation). <code>endTime</code> will be greater to equal to
4366
+ * <code>startTime</code>. <code>remove</code> should only return
4367
+ * <code>false</code> if the displayer has been destroyed. If the displayer
4368
+ * has not been destroyed <code>remove</code> should return <code>true</code>.
4369
+ */
4370
+ remove (startTime : number , endTime : number ) : boolean ;
4371
+ /**
4372
+ * Set text visibility.
4373
+ */
4374
+ setTextVisibility (on : boolean ) : any ;
4375
+ }
4376
+ }
4377
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4378
+ declare namespace shaka.extern.TextDisplayer {
4379
+ /**
4380
+ * A factory for creating a TextDisplayer.
4381
+ */
4382
+ type Factory = ( ) => shaka.extern.TextDisplayer ;
4383
+ }
4384
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4385
+ declare namespace shaka.extern {
4386
+ /**
4387
+ * An interface for plugins that parse text tracks.
4388
+ */
4389
+ interface TextParser {
4390
+ /**
4391
+ * Parse an initialization segment. Some formats do not have init
4392
+ * segments so this won't always be called.
4393
+ * @param data The data that makes up the init segment.
4394
+ */
4395
+ parseInit (data : Uint8Array ) : any ;
4396
+ /**
4397
+ * Parse a media segment and return the cues that make up the segment.
4398
+ * @param data The next section of buffer.
4399
+ * @param timeContext The time information that should be used to adjust the times values for each cue.
4400
+ * @param uri The media uri.
4401
+ */
4402
+ parseMedia (data : Uint8Array , timeContext : shaka.extern.TextParser.TimeContext , uri : string | undefined | null ) : shaka.text.Cue [] ;
4403
+ /**
4404
+ * Notifies the manifest type.
4405
+ */
4406
+ setManifestType (manifestType : string ) : any ;
4407
+ /**
4408
+ * Notifies the stream if the manifest is in sequence mode or not.
4409
+ */
4410
+ setSequenceMode (sequenceMode : boolean ) : any ;
4411
+ }
4412
+ }
4413
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4414
+ declare namespace shaka.extern.TextParser {
4415
+ /**
4416
+ * A callback used for editing cues before appending.
4417
+ * Provides the cue, the URI of the captions file the cue was parsed from, and
4418
+ * the time context that was used when generating that cue.
4419
+ * You can edit the cue object passed in.
4420
+ */
4421
+ type ModifyCueCallback = (a : shaka.text.Cue , b : string | null , c : shaka.extern.TextParser.TimeContext ) => any ;
4422
+ }
4423
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4424
+ declare namespace shaka.extern.TextParser {
4425
+ /**
4426
+ * A collection of time offsets used to adjust text cue times.
4427
+ */
4428
+ type TimeContext = { periodStart : number , segmentEnd : number , segmentStart : number , vttOffset : number } ;
4429
+ }
4430
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/text.js
4431
+ declare namespace shaka.extern {
4432
+ type TextParserPlugin = ( ) => shaka.extern.TextParser ;
4433
+ }
4434
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/transmuxer.js
4435
+ declare namespace shaka.extern {
4436
+ /**
4437
+ * An interface for transmuxer plugins.
4438
+ */
4439
+ interface Transmuxer {
4440
+ /**
4441
+ * For any stream, convert its codecs to MP4 codecs.
4442
+ */
4443
+ convertCodecs (contentType : string , mimeType : string ) : string ;
4444
+ /**
4445
+ * Destroy
4446
+ */
4447
+ destroy ( ) : any ;
4448
+ /**
4449
+ * Returns the original mimetype of the transmuxer.
4450
+ */
4451
+ getOriginalMimeType ( ) : string ;
4452
+ /**
4453
+ * Check if the mime type and the content type is supported.
4454
+ */
4455
+ isSupported (mimeType : string , contentType ? : string ) : boolean ;
4456
+ /**
4457
+ * Transmux a input data to MP4.
4458
+ * @param reference The segment reference, or null for init segments
4459
+ */
4460
+ transmux (data : ArrayBuffer | ArrayBufferView , stream : shaka.extern.Stream , reference : shaka.media.SegmentReference | null , duration : number , contentType : string ) : Promise < Uint8Array > ;
4461
+ }
4462
+ }
4463
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/shaka/transmuxer.js
4464
+ declare namespace shaka.extern {
4465
+ type TransmuxerPlugin = ( ) => shaka.extern.Transmuxer ;
4466
+ }
4467
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/tippy.js
4468
+ declare namespace ಠ_ಠ.clutz {
4469
+ /**
4470
+ * This is the subset of this method that we use in our demo code.
4471
+ */
4472
+ function tippy (element : Element , config : object ) : any ;
4473
+ }
4474
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/tizen.js
4475
+ declare namespace webapis.productinfo {
4476
+ function is8KPanelSupported ( ) : boolean ;
4477
+ }
4478
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/tizen.js
4479
+ declare namespace webapis.productinfo {
4480
+ function isUdPanelSupported ( ) : boolean ;
4481
+ }
4482
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/tizen.js
4483
+ declare namespace webapis.systeminfo {
4484
+ function getMaxVideoResolution ( ) : { height : number , width : number } ;
4485
+ }
4486
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/webkitmediakeys.js
4487
+ declare namespace ಠ_ಠ.clutz {
4488
+ class WebKitMediaKeyError {
4489
+ private noStructuralTyping_WebKitMediaKeyError : any;
4490
+ code : number ;
4491
+ systemCode : number ;
4492
+ static MEDIA_KEYERR_CLIENT : number ;
4493
+ static MEDIA_KEYERR_DOMAIN : number ;
4494
+ static MEDIA_KEYERR_HARDWARECHANGE : number ;
4495
+ static MEDIA_KEYERR_OUTPUT : number ;
4496
+ static MEDIA_KEYERR_SERVICE : number ;
4497
+ static MEDIA_KEYERR_UNKNOWN : number ;
4498
+ }
4499
+ }
4500
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/webkitmediakeys.js
4501
+ declare namespace ಠ_ಠ.clutz {
4502
+ interface WebKitMediaKeySession extends EventTarget {
4503
+ addEventListener (type : any , listener : any , useCapture : any ) : any ;
4504
+ close ( ) : any ;
4505
+ dispatchEvent (evt : any ) : any ;
4506
+ error : WebKitMediaKeyError | null ;
4507
+ removeEventListener (type : any , listener : any , useCapture : any ) : any ;
4508
+ sessionId : string ;
4509
+ update (message : Uint8Array | null ) : any ;
4510
+ }
4511
+ }
4512
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/webkitmediakeys.js
4513
+ declare namespace ಠ_ಠ.clutz {
4514
+ class WebKitMediaKeys {
4515
+ private noStructuralTyping_WebKitMediaKeys : any;
4516
+ constructor (keySystem : string ) ;
4517
+ createSession (contentType : string , initData : Uint8Array | null ) : WebKitMediaKeySession ;
4518
+ static isTypeSupported (keySystem : string , contentType : string ) : boolean ;
4519
+ }
4520
+ }
4521
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/webos.js
4522
+ declare namespace PalmSystem {
4523
+ let deviceInfo : string ;
4524
+ }
4525
+ // Generated from /Users/kocharli/Work/repositories/shaka-player-main/externs/xbox.js
4526
+ declare namespace Windows.Media.Protection {
4527
+ enum ProtectionCapabilityResult {
4528
+ maybe = 'Maybe' ,
4529
+ notSupported = 'NotSupported' ,
4530
+ probably = 'Probably' ,
4531
+ }
4532
+ }