shaka-player 3.1.5 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +129 -6
- package/README.md +4 -4
- package/build/types/polyfill +1 -0
- package/demo/common/asset.js +9 -7
- package/demo/common/assets.js +10 -1
- package/demo/common/message_ids.js +2 -1
- package/demo/config.js +5 -2
- package/demo/index.html +1 -1
- package/demo/locales/en.json +2 -1
- package/demo/locales/source.json +8 -4
- package/demo/main.js +2 -1
- package/dist/demo.compiled.debug.js +14 -14
- package/dist/demo.compiled.debug.map +2 -2
- package/dist/demo.compiled.js +14 -14
- package/dist/demo.compiled.map +2 -2
- package/dist/deps.js +21 -20
- package/dist/locales.js +30 -30
- package/dist/receiver.compiled.debug.js +8 -8
- package/dist/receiver.compiled.debug.map +2 -2
- package/dist/receiver.compiled.js +8 -8
- package/dist/receiver.compiled.map +2 -2
- package/dist/shaka-player.compiled.d.ts +63 -10
- package/dist/shaka-player.compiled.debug.d.ts +63 -10
- package/dist/shaka-player.compiled.debug.externs.js +786 -716
- package/dist/shaka-player.compiled.debug.js +563 -534
- package/dist/shaka-player.compiled.debug.map +4 -4
- package/dist/shaka-player.compiled.externs.js +786 -716
- package/dist/shaka-player.compiled.js +820 -809
- package/dist/shaka-player.compiled.map +4 -4
- package/dist/shaka-player.ui.d.ts +63 -10
- package/dist/shaka-player.ui.debug.d.ts +63 -10
- package/dist/shaka-player.ui.debug.externs.js +542 -472
- package/dist/shaka-player.ui.debug.js +594 -566
- package/dist/shaka-player.ui.debug.map +4 -4
- package/dist/shaka-player.ui.externs.js +542 -472
- package/dist/shaka-player.ui.js +938 -927
- package/dist/shaka-player.ui.map +4 -4
- package/docs/tutorials/ui.md +5 -5
- package/externs/aria.js +6 -0
- package/externs/shaka/ads.js +24 -1
- package/externs/shaka/manifest.js +6 -1
- package/externs/shaka/offline.js +5 -0
- package/externs/shaka/player.js +61 -9
- package/externs/shaka/text.js +10 -10
- package/externs/texttrack.js +3 -0
- package/lib/ads/ad_manager.js +16 -15
- package/lib/ads/client_side_ad_manager.js +6 -2
- package/lib/ads/server_side_ad_manager.js +19 -2
- package/lib/cast/cast_proxy.js +8 -0
- package/lib/cast/cast_utils.js +6 -1
- package/lib/cea/cea608_data_channel.js +56 -56
- package/lib/cea/cea608_memory.js +33 -33
- package/lib/cea/cea708_service.js +43 -43
- package/lib/cea/cea708_window.js +38 -38
- package/lib/cea/cea_decoder.js +13 -14
- package/lib/cea/cea_utils.js +23 -23
- package/lib/cea/dtvcc_packet_builder.js +7 -7
- package/lib/cea/i_caption_decoder.js +2 -3
- package/lib/cea/i_cea_parser.js +2 -2
- package/lib/cea/mp4_cea_parser.js +6 -6
- package/lib/dash/dash_parser.js +5 -0
- package/lib/hls/hls_parser.js +159 -12
- package/lib/media/closed_caption_parser.js +1 -2
- package/lib/media/drm_engine.js +162 -192
- package/lib/media/segment_index.js +4 -1
- package/lib/media/segment_reference.js +37 -2
- package/lib/media/streaming_engine.js +6 -6
- package/lib/net/networking_engine.js +1 -0
- package/lib/offline/download_manager.js +1 -2
- package/lib/offline/indexeddb/v1_storage_cell.js +1 -0
- package/lib/offline/indexeddb/v2_storage_cell.js +1 -0
- package/lib/offline/manifest_converter.js +3 -1
- package/lib/offline/storage.js +12 -14
- package/lib/player.js +426 -149
- package/lib/polyfill/aria.js +82 -0
- package/lib/routing/walker.js +2 -3
- package/lib/text/srt_text_parser.js +4 -4
- package/lib/text/text_engine.js +2 -2
- package/lib/text/vtt_text_parser.js +2 -2
- package/lib/text/web_vtt_generator.js +55 -12
- package/lib/util/error.js +6 -0
- package/lib/util/manifest_parser_utils.js +1 -0
- package/lib/util/mp4_box_parsers.js +20 -20
- package/lib/util/multi_map.js +8 -0
- package/lib/util/player_configuration.js +13 -1
- package/lib/util/stream_utils.js +168 -88
- package/lib/util/xml_utils.js +31 -12
- package/package.json +1 -1
- package/roadmap.md +24 -22
- package/shaka-player.uncompiled.js +1 -0
- package/test/cast/cast_utils_unit.js +1 -0
- package/test/cea/cea608_memory_unit.js +1 -1
- package/test/cea/cea708_service_unit.js +8 -8
- package/test/cea/cea708_window_unit.js +6 -6
- package/test/cea/cea_decoder_unit.js +1 -1
- package/test/cea/dtvcc_packet_builder_unit.js +2 -2
- package/test/dash/dash_parser_manifest_unit.js +43 -1
- package/test/hls/hls_parser_unit.js +250 -0
- package/test/media/drm_engine_integration.js +86 -12
- package/test/media/drm_engine_unit.js +310 -450
- package/test/offline/manifest_convert_unit.js +2 -0
- package/test/offline/storage_integration.js +9 -19
- package/test/player_integration.js +85 -0
- package/test/player_src_equals_integration.js +85 -0
- package/test/player_unit.js +25 -37
- package/test/test/assets/chapters.srt +11 -0
- package/test/test/assets/chapters.vtt +10 -0
- package/test/test/assets/chapters2.vtt +10 -0
- package/test/test/util/cea_utils.js +12 -12
- package/test/test/util/fake_ad_manager.js +7 -0
- package/test/test/util/manifest_generator.js +2 -0
- package/test/test/util/manifest_parser_util.js +3 -1
- package/test/text/web_vtt_generator_unit.js +81 -7
- package/test/util/stream_utils_unit.js +118 -10
- package/ui/airplay_button.js +1 -1
- package/ui/audio_language_selection.js +2 -5
- package/ui/cast_button.js +4 -6
- package/ui/constants.js +0 -3
- package/ui/fast_forward_button.js +2 -3
- package/ui/fullscreen_button.js +1 -3
- package/ui/language_utils.js +1 -1
- package/ui/loop_button.js +1 -3
- package/ui/mute_button.js +1 -3
- package/ui/overflow_menu.js +2 -3
- package/ui/pip_button.js +5 -7
- package/ui/playback_rate_selection.js +3 -6
- package/ui/presentation_time.js +1 -3
- package/ui/resolution_selection.js +4 -7
- package/ui/rewind_button.js +2 -3
- package/ui/seek_bar.js +2 -4
- package/ui/spacer.js +1 -1
- package/ui/text_selection.js +8 -11
- package/ui/ui_utils.js +1 -1
- package/ui/volume_bar.js +1 -3
|
@@ -34,553 +34,6 @@ shaka.text = {};
|
|
|
34
34
|
/** @const */
|
|
35
35
|
shaka.util = {};
|
|
36
36
|
|
|
37
|
-
/**
|
|
38
|
-
* @summary A set of BufferSource utility functions.
|
|
39
|
-
*/
|
|
40
|
-
shaka.util.BufferUtils = class {
|
|
41
|
-
/**
|
|
42
|
-
* Compare two buffers for equality. For buffers of different types, this
|
|
43
|
-
* compares the underlying buffers as binary data.
|
|
44
|
-
* @param {?BufferSource} arr1
|
|
45
|
-
* @param {?BufferSource} arr2
|
|
46
|
-
* @return {boolean}
|
|
47
|
-
*/
|
|
48
|
-
static equal(arr1, arr2) {}
|
|
49
|
-
/**
|
|
50
|
-
* Gets an ArrayBuffer that contains the data from the given TypedArray. Note
|
|
51
|
-
* this will allocate a new ArrayBuffer if the object is a partial view of
|
|
52
|
-
* the data.
|
|
53
|
-
* @param {!BufferSource} view
|
|
54
|
-
* @return {!ArrayBuffer}
|
|
55
|
-
*/
|
|
56
|
-
static toArrayBuffer(view) {}
|
|
57
|
-
/**
|
|
58
|
-
* Creates a new Uint8Array view on the same buffer. This clamps the values
|
|
59
|
-
* to be within the same view (i.e. you can't use this to move past the end
|
|
60
|
-
* of the view, even if the underlying buffer is larger). However, you can
|
|
61
|
-
* pass a negative offset to access the data before the view.
|
|
62
|
-
* @param {BufferSource} data
|
|
63
|
-
* @param {number=} offset The offset from the beginning of this data's view
|
|
64
|
-
* to start the new view at.
|
|
65
|
-
* @param {number=} length The byte length of the new view.
|
|
66
|
-
* @return {!Uint8Array}
|
|
67
|
-
*/
|
|
68
|
-
static toUint8(data, offset, length) {}
|
|
69
|
-
/**
|
|
70
|
-
* Creates a DataView over the given buffer.
|
|
71
|
-
* @see toUint8
|
|
72
|
-
* @param {BufferSource} buffer
|
|
73
|
-
* @param {number=} offset
|
|
74
|
-
* @param {number=} length
|
|
75
|
-
* @return {!DataView}
|
|
76
|
-
*/
|
|
77
|
-
static toDataView(buffer, offset, length) {}
|
|
78
|
-
};
|
|
79
|
-
/**
|
|
80
|
-
* @summary
|
|
81
|
-
* Describes an error that happened.
|
|
82
|
-
* @description
|
|
83
|
-
* This uses numerical codes to describe
|
|
84
|
-
* which error happened.
|
|
85
|
-
* Some error are caused by errors from the browser. In these cases, the error
|
|
86
|
-
* object is provided as part of the <code>data</code> field. System codes come
|
|
87
|
-
* from the browser and may or may not be documented. Here are some places
|
|
88
|
-
* where the errors may be documented:
|
|
89
|
-
* <ul>
|
|
90
|
-
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
|
|
91
|
-
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
|
|
92
|
-
* <li><a href="https://hresult.info">Edge/PlayReady errors</a>
|
|
93
|
-
* </ul>
|
|
94
|
-
* @implements {shaka.extern.Error}
|
|
95
|
-
* @extends {Error}
|
|
96
|
-
*/
|
|
97
|
-
shaka.util.Error = class {
|
|
98
|
-
/**
|
|
99
|
-
* @param {shaka.util.Error.Severity} severity
|
|
100
|
-
* @param {shaka.util.Error.Category} category
|
|
101
|
-
* @param {shaka.util.Error.Code} code
|
|
102
|
-
* @param {...*} varArgs
|
|
103
|
-
*/
|
|
104
|
-
constructor(severity, category, code, ...varArgs) {}
|
|
105
|
-
};
|
|
106
|
-
/**
|
|
107
|
-
* @override
|
|
108
|
-
*/
|
|
109
|
-
shaka.util.Error.prototype.severity;
|
|
110
|
-
/**
|
|
111
|
-
* @override
|
|
112
|
-
*/
|
|
113
|
-
shaka.util.Error.prototype.category;
|
|
114
|
-
/**
|
|
115
|
-
* @override
|
|
116
|
-
*/
|
|
117
|
-
shaka.util.Error.prototype.code;
|
|
118
|
-
/**
|
|
119
|
-
* @override
|
|
120
|
-
*/
|
|
121
|
-
shaka.util.Error.prototype.data;
|
|
122
|
-
/**
|
|
123
|
-
* @override
|
|
124
|
-
*/
|
|
125
|
-
shaka.util.Error.prototype.handled;
|
|
126
|
-
/**
|
|
127
|
-
* @enum {number}
|
|
128
|
-
*/
|
|
129
|
-
shaka.util.Error.Severity = {
|
|
130
|
-
'RECOVERABLE': 1,
|
|
131
|
-
'CRITICAL': 2
|
|
132
|
-
};
|
|
133
|
-
/**
|
|
134
|
-
* @enum {number}
|
|
135
|
-
*/
|
|
136
|
-
shaka.util.Error.Category = {
|
|
137
|
-
'NETWORK': 1,
|
|
138
|
-
'TEXT': 2,
|
|
139
|
-
'MEDIA': 3,
|
|
140
|
-
'MANIFEST': 4,
|
|
141
|
-
'STREAMING': 5,
|
|
142
|
-
'DRM': 6,
|
|
143
|
-
'PLAYER': 7,
|
|
144
|
-
'CAST': 8,
|
|
145
|
-
'STORAGE': 9,
|
|
146
|
-
'ADS': 10
|
|
147
|
-
};
|
|
148
|
-
/**
|
|
149
|
-
* @enum {number}
|
|
150
|
-
*/
|
|
151
|
-
shaka.util.Error.Code = {
|
|
152
|
-
'UNSUPPORTED_SCHEME': 1000,
|
|
153
|
-
'BAD_HTTP_STATUS': 1001,
|
|
154
|
-
'HTTP_ERROR': 1002,
|
|
155
|
-
'TIMEOUT': 1003,
|
|
156
|
-
'MALFORMED_DATA_URI': 1004,
|
|
157
|
-
'REQUEST_FILTER_ERROR': 1006,
|
|
158
|
-
'RESPONSE_FILTER_ERROR': 1007,
|
|
159
|
-
'MALFORMED_TEST_URI': 1008,
|
|
160
|
-
'UNEXPECTED_TEST_REQUEST': 1009,
|
|
161
|
-
'ATTEMPTS_EXHAUSTED': 1010,
|
|
162
|
-
'INVALID_TEXT_HEADER': 2000,
|
|
163
|
-
'INVALID_TEXT_CUE': 2001,
|
|
164
|
-
'UNABLE_TO_DETECT_ENCODING': 2003,
|
|
165
|
-
'BAD_ENCODING': 2004,
|
|
166
|
-
'INVALID_XML': 2005,
|
|
167
|
-
'INVALID_MP4_TTML': 2007,
|
|
168
|
-
'INVALID_MP4_VTT': 2008,
|
|
169
|
-
'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
|
|
170
|
-
'INVALID_MP4_CEA': 2010,
|
|
171
|
-
'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
|
|
172
|
-
'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
|
|
173
|
-
'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
|
|
174
|
-
'MISSING_TEXT_PLUGIN': 2014,
|
|
175
|
-
'BUFFER_READ_OUT_OF_BOUNDS': 3000,
|
|
176
|
-
'JS_INTEGER_OVERFLOW': 3001,
|
|
177
|
-
'EBML_OVERFLOW': 3002,
|
|
178
|
-
'EBML_BAD_FLOATING_POINT_SIZE': 3003,
|
|
179
|
-
'MP4_SIDX_WRONG_BOX_TYPE': 3004,
|
|
180
|
-
'MP4_SIDX_INVALID_TIMESCALE': 3005,
|
|
181
|
-
'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
|
|
182
|
-
'WEBM_CUES_ELEMENT_MISSING': 3007,
|
|
183
|
-
'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
|
|
184
|
-
'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
|
|
185
|
-
'WEBM_INFO_ELEMENT_MISSING': 3010,
|
|
186
|
-
'WEBM_DURATION_ELEMENT_MISSING': 3011,
|
|
187
|
-
'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
|
|
188
|
-
'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
|
|
189
|
-
'MEDIA_SOURCE_OPERATION_FAILED': 3014,
|
|
190
|
-
'MEDIA_SOURCE_OPERATION_THREW': 3015,
|
|
191
|
-
'VIDEO_ERROR': 3016,
|
|
192
|
-
'QUOTA_EXCEEDED_ERROR': 3017,
|
|
193
|
-
'TRANSMUXING_FAILED': 3018,
|
|
194
|
-
'CONTENT_TRANSFORMATION_FAILED': 3019,
|
|
195
|
-
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
|
|
196
|
-
'DASH_INVALID_XML': 4001,
|
|
197
|
-
'DASH_NO_SEGMENT_INFO': 4002,
|
|
198
|
-
'DASH_EMPTY_ADAPTATION_SET': 4003,
|
|
199
|
-
'DASH_EMPTY_PERIOD': 4004,
|
|
200
|
-
'DASH_WEBM_MISSING_INIT': 4005,
|
|
201
|
-
'DASH_UNSUPPORTED_CONTAINER': 4006,
|
|
202
|
-
'DASH_PSSH_BAD_ENCODING': 4007,
|
|
203
|
-
'DASH_NO_COMMON_KEY_SYSTEM': 4008,
|
|
204
|
-
'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
|
|
205
|
-
'DASH_CONFLICTING_KEY_IDS': 4010,
|
|
206
|
-
'RESTRICTIONS_CANNOT_BE_MET': 4012,
|
|
207
|
-
'HLS_PLAYLIST_HEADER_MISSING': 4015,
|
|
208
|
-
'INVALID_HLS_TAG': 4016,
|
|
209
|
-
'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
|
|
210
|
-
'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
|
|
211
|
-
'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
|
|
212
|
-
'HLS_MASTER_PLAYLIST_NOT_PROVIDED': 4022,
|
|
213
|
-
'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
|
|
214
|
-
'HLS_REQUIRED_TAG_MISSING': 4024,
|
|
215
|
-
'HLS_COULD_NOT_GUESS_CODECS': 4025,
|
|
216
|
-
'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
|
|
217
|
-
'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
|
|
218
|
-
'DASH_XLINK_DEPTH_LIMIT': 4028,
|
|
219
|
-
'HLS_COULD_NOT_PARSE_SEGMENT_START_TIME': 4030,
|
|
220
|
-
'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
|
|
221
|
-
'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
|
|
222
|
-
'HLS_AES_128_ENCRYPTION_NOT_SUPPORTED': 4034,
|
|
223
|
-
'HLS_INTERNAL_SKIP_STREAM': 4035,
|
|
224
|
-
'NO_VARIANTS': 4036,
|
|
225
|
-
'PERIOD_FLATTENING_FAILED': 4037,
|
|
226
|
-
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
227
|
-
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
228
|
-
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
229
|
-
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
230
|
-
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
231
|
-
'FAILED_TO_CREATE_CDM': 6002,
|
|
232
|
-
'FAILED_TO_ATTACH_TO_VIDEO': 6003,
|
|
233
|
-
'INVALID_SERVER_CERTIFICATE': 6004,
|
|
234
|
-
'FAILED_TO_CREATE_SESSION': 6005,
|
|
235
|
-
'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
|
|
236
|
-
'LICENSE_REQUEST_FAILED': 6007,
|
|
237
|
-
'LICENSE_RESPONSE_REJECTED': 6008,
|
|
238
|
-
'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
|
|
239
|
-
'NO_LICENSE_SERVER_GIVEN': 6012,
|
|
240
|
-
'OFFLINE_SESSION_REMOVED': 6013,
|
|
241
|
-
'EXPIRED': 6014,
|
|
242
|
-
'SERVER_CERTIFICATE_REQUIRED': 6015,
|
|
243
|
-
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
244
|
-
'LOAD_INTERRUPTED': 7000,
|
|
245
|
-
'OPERATION_ABORTED': 7001,
|
|
246
|
-
'NO_VIDEO_ELEMENT': 7002,
|
|
247
|
-
'OBJECT_DESTROYED': 7003,
|
|
248
|
-
'CONTENT_NOT_LOADED': 7004,
|
|
249
|
-
'CAST_API_UNAVAILABLE': 8000,
|
|
250
|
-
'NO_CAST_RECEIVERS': 8001,
|
|
251
|
-
'ALREADY_CASTING': 8002,
|
|
252
|
-
'UNEXPECTED_CAST_ERROR': 8003,
|
|
253
|
-
'CAST_CANCELED_BY_USER': 8004,
|
|
254
|
-
'CAST_CONNECTION_TIMED_OUT': 8005,
|
|
255
|
-
'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
|
|
256
|
-
'STORAGE_NOT_SUPPORTED': 9000,
|
|
257
|
-
'INDEXED_DB_ERROR': 9001,
|
|
258
|
-
'DEPRECATED_OPERATION_ABORTED': 9002,
|
|
259
|
-
'REQUESTED_ITEM_NOT_FOUND': 9003,
|
|
260
|
-
'MALFORMED_OFFLINE_URI': 9004,
|
|
261
|
-
'CANNOT_STORE_LIVE_OFFLINE': 9005,
|
|
262
|
-
'NO_INIT_DATA_FOR_OFFLINE': 9007,
|
|
263
|
-
'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
|
|
264
|
-
'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
|
|
265
|
-
'KEY_NOT_FOUND': 9012,
|
|
266
|
-
'MISSING_STORAGE_CELL': 9013,
|
|
267
|
-
'STORAGE_LIMIT_REACHED': 9014,
|
|
268
|
-
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
|
|
269
|
-
'CS_IMA_SDK_MISSING': 10000,
|
|
270
|
-
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
271
|
-
'SS_IMA_SDK_MISSING': 10002,
|
|
272
|
-
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
273
|
-
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
|
|
274
|
-
};
|
|
275
|
-
/**
|
|
276
|
-
* @namespace shaka.util.StringUtils
|
|
277
|
-
* @summary A set of string utility functions.
|
|
278
|
-
*/
|
|
279
|
-
shaka.util.StringUtils = class {
|
|
280
|
-
/**
|
|
281
|
-
* Creates a string from the given buffer as UTF-8 encoding.
|
|
282
|
-
* @param {?BufferSource} data
|
|
283
|
-
* @return {string}
|
|
284
|
-
*/
|
|
285
|
-
static fromUTF8(data) {}
|
|
286
|
-
/**
|
|
287
|
-
* Creates a string from the given buffer as UTF-16 encoding.
|
|
288
|
-
* @param {?BufferSource} data
|
|
289
|
-
* @param {boolean} littleEndian
|
|
290
|
-
true to read little endian, false to read big.
|
|
291
|
-
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
292
|
-
* expect invalid input. If noThrow is true and the data has an odd
|
|
293
|
-
* length,it will be truncated.
|
|
294
|
-
* @return {string}
|
|
295
|
-
*/
|
|
296
|
-
static fromUTF16(data, littleEndian, noThrow) {}
|
|
297
|
-
/**
|
|
298
|
-
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
299
|
-
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
300
|
-
* @param {?BufferSource} data
|
|
301
|
-
* @return {string}
|
|
302
|
-
*/
|
|
303
|
-
static fromBytesAutoDetect(data) {}
|
|
304
|
-
/**
|
|
305
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
306
|
-
* @param {string} str
|
|
307
|
-
* @return {!ArrayBuffer}
|
|
308
|
-
*/
|
|
309
|
-
static toUTF8(str) {}
|
|
310
|
-
/**
|
|
311
|
-
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
312
|
-
* @param {string} str
|
|
313
|
-
* @param {boolean} littleEndian
|
|
314
|
-
* @return {!ArrayBuffer}
|
|
315
|
-
*/
|
|
316
|
-
static toUTF16(str, littleEndian) {}
|
|
317
|
-
/**
|
|
318
|
-
* Resets the fromCharCode method's implementation.
|
|
319
|
-
* For debug use.
|
|
320
|
-
*/
|
|
321
|
-
static resetFromCharCode() {}
|
|
322
|
-
};
|
|
323
|
-
/**
|
|
324
|
-
* @summary DataViewReader abstracts a DataView object.
|
|
325
|
-
*/
|
|
326
|
-
shaka.util.DataViewReader = class {
|
|
327
|
-
/**
|
|
328
|
-
* @param {BufferSource} data
|
|
329
|
-
* @param {shaka.util.DataViewReader.Endianness} endianness The endianness.
|
|
330
|
-
*/
|
|
331
|
-
constructor(data, endianness) {}
|
|
332
|
-
/**
|
|
333
|
-
* @return {boolean} True if the reader has more data, false otherwise.
|
|
334
|
-
*/
|
|
335
|
-
hasMoreData() {}
|
|
336
|
-
/**
|
|
337
|
-
* Gets the current byte position.
|
|
338
|
-
* @return {number}
|
|
339
|
-
*/
|
|
340
|
-
getPosition() {}
|
|
341
|
-
/**
|
|
342
|
-
* Gets the byte length of the DataView.
|
|
343
|
-
* @return {number}
|
|
344
|
-
*/
|
|
345
|
-
getLength() {}
|
|
346
|
-
/**
|
|
347
|
-
* Reads an unsigned 8 bit integer, and advances the reader.
|
|
348
|
-
* @return {number} The integer.
|
|
349
|
-
*/
|
|
350
|
-
readUint8() {}
|
|
351
|
-
/**
|
|
352
|
-
* Reads an unsigned 16 bit integer, and advances the reader.
|
|
353
|
-
* @return {number} The integer.
|
|
354
|
-
*/
|
|
355
|
-
readUint16() {}
|
|
356
|
-
/**
|
|
357
|
-
* Reads an unsigned 32 bit integer, and advances the reader.
|
|
358
|
-
* @return {number} The integer.
|
|
359
|
-
*/
|
|
360
|
-
readUint32() {}
|
|
361
|
-
/**
|
|
362
|
-
* Reads a signed 32 bit integer, and advances the reader.
|
|
363
|
-
* @return {number} The integer.
|
|
364
|
-
*/
|
|
365
|
-
readInt32() {}
|
|
366
|
-
/**
|
|
367
|
-
* Reads an unsigned 64 bit integer, and advances the reader.
|
|
368
|
-
* @return {number} The integer.
|
|
369
|
-
*/
|
|
370
|
-
readUint64() {}
|
|
371
|
-
/**
|
|
372
|
-
* Reads the specified number of raw bytes.
|
|
373
|
-
* @param {number} bytes The number of bytes to read.
|
|
374
|
-
* @return {!Uint8Array}
|
|
375
|
-
*/
|
|
376
|
-
readBytes(bytes) {}
|
|
377
|
-
/**
|
|
378
|
-
* Skips the specified number of bytes.
|
|
379
|
-
* @param {number} bytes The number of bytes to skip.
|
|
380
|
-
*/
|
|
381
|
-
skip(bytes) {}
|
|
382
|
-
/**
|
|
383
|
-
* Rewinds the specified number of bytes.
|
|
384
|
-
* @param {number} bytes The number of bytes to rewind.
|
|
385
|
-
*/
|
|
386
|
-
rewind(bytes) {}
|
|
387
|
-
/**
|
|
388
|
-
* Seeks to a specified position.
|
|
389
|
-
* @param {number} position The desired byte position within the DataView.
|
|
390
|
-
*/
|
|
391
|
-
seek(position) {}
|
|
392
|
-
/**
|
|
393
|
-
* Keeps reading until it reaches a byte that equals to zero. The text is
|
|
394
|
-
* assumed to be UTF-8.
|
|
395
|
-
* @return {string}
|
|
396
|
-
*/
|
|
397
|
-
readTerminatedString() {}
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* Endianness.
|
|
401
|
-
* @enum {number}
|
|
402
|
-
*/
|
|
403
|
-
shaka.util.DataViewReader.Endianness = {
|
|
404
|
-
'BIG_ENDIAN': 0,
|
|
405
|
-
'LITTLE_ENDIAN': 1
|
|
406
|
-
};
|
|
407
|
-
/**
|
|
408
|
-
*/
|
|
409
|
-
shaka.util.Mp4Parser = class {
|
|
410
|
-
/** */
|
|
411
|
-
constructor() {}
|
|
412
|
-
/**
|
|
413
|
-
* Declare a box type as a Box.
|
|
414
|
-
* @param {string} type
|
|
415
|
-
* @param {!shaka.util.Mp4Parser.CallbackType} definition
|
|
416
|
-
* @return {!shaka.util.Mp4Parser}
|
|
417
|
-
*/
|
|
418
|
-
box(type, definition) {}
|
|
419
|
-
/**
|
|
420
|
-
* Declare a box type as a Full Box.
|
|
421
|
-
* @param {string} type
|
|
422
|
-
* @param {!shaka.util.Mp4Parser.CallbackType} definition
|
|
423
|
-
* @return {!shaka.util.Mp4Parser}
|
|
424
|
-
*/
|
|
425
|
-
fullBox(type, definition) {}
|
|
426
|
-
/**
|
|
427
|
-
* Stop parsing. Useful for extracting information from partial segments and
|
|
428
|
-
* avoiding an out-of-bounds error once you find what you are looking for.
|
|
429
|
-
*/
|
|
430
|
-
stop() {}
|
|
431
|
-
/**
|
|
432
|
-
* Parse the given data using the added callbacks.
|
|
433
|
-
* @param {!BufferSource} data
|
|
434
|
-
* @param {boolean=} partialOkay If true, allow reading partial payloads
|
|
435
|
-
* from some boxes. If the goal is a child box, we can sometimes find it
|
|
436
|
-
* without enough data to find all child boxes.
|
|
437
|
-
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
|
|
438
|
-
* box is detected.
|
|
439
|
-
*/
|
|
440
|
-
parse(data, partialOkay, stopOnPartial) {}
|
|
441
|
-
/**
|
|
442
|
-
* Parse the next box on the current level.
|
|
443
|
-
* @param {number} absStart The absolute start position in the original
|
|
444
|
-
* byte array.
|
|
445
|
-
* @param {!shaka.util.DataViewReader} reader
|
|
446
|
-
* @param {boolean=} partialOkay If true, allow reading partial payloads
|
|
447
|
-
* from some boxes. If the goal is a child box, we can sometimes find it
|
|
448
|
-
* without enough data to find all child boxes.
|
|
449
|
-
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
|
|
450
|
-
* box is detected.
|
|
451
|
-
*/
|
|
452
|
-
parseNext(absStart, reader, partialOkay, stopOnPartial) {}
|
|
453
|
-
/**
|
|
454
|
-
* A callback that tells the Mp4 parser to treat the body of a box as a series
|
|
455
|
-
* of boxes. The number of boxes is limited by the size of the parent box.
|
|
456
|
-
* @param {!shaka.extern.ParsedBox} box
|
|
457
|
-
*/
|
|
458
|
-
static children(box) {}
|
|
459
|
-
/**
|
|
460
|
-
* A callback that tells the Mp4 parser to treat the body of a box as a sample
|
|
461
|
-
* description. A sample description box has a fixed number of children. The
|
|
462
|
-
* number of children is represented by a 4 byte unsigned integer. Each child
|
|
463
|
-
* is a box.
|
|
464
|
-
* @param {!shaka.extern.ParsedBox} box
|
|
465
|
-
*/
|
|
466
|
-
static sampleDescription(box) {}
|
|
467
|
-
/**
|
|
468
|
-
* Create a callback that tells the Mp4 parser to treat the body of a box as a
|
|
469
|
-
* binary blob and to parse the body's contents using the provided callback.
|
|
470
|
-
* @param {function(!Uint8Array)} callback
|
|
471
|
-
* @return {!shaka.util.Mp4Parser.CallbackType}
|
|
472
|
-
*/
|
|
473
|
-
static allData(callback) {}
|
|
474
|
-
/**
|
|
475
|
-
* Convert an integer type from a box into an ascii string name.
|
|
476
|
-
* Useful for debugging.
|
|
477
|
-
* @param {number} type The type of the box, a uint32.
|
|
478
|
-
* @return {string}
|
|
479
|
-
*/
|
|
480
|
-
static typeToString(type) {}
|
|
481
|
-
/**
|
|
482
|
-
* Find the header size of the box.
|
|
483
|
-
* Useful for modifying boxes in place or finding the exact offset of a field.
|
|
484
|
-
* @param {shaka.extern.ParsedBox} box
|
|
485
|
-
* @return {number}
|
|
486
|
-
*/
|
|
487
|
-
static headerSize(box) {}
|
|
488
|
-
};
|
|
489
|
-
/**
|
|
490
|
-
* @typedef {function(!shaka.extern.ParsedBox)}
|
|
491
|
-
*/
|
|
492
|
-
shaka.util.Mp4Parser.CallbackType;
|
|
493
|
-
/**
|
|
494
|
-
* A timer allows a single function to be executed at a later time or at
|
|
495
|
-
* regular intervals.
|
|
496
|
-
* @final
|
|
497
|
-
*/
|
|
498
|
-
shaka.util.Timer = class {
|
|
499
|
-
/**
|
|
500
|
-
* Create a new timer. A timer is committed to a single callback function.
|
|
501
|
-
* While there is no technical reason to do this, it is far easier to
|
|
502
|
-
* understand and use timers when they are connected to one functional idea.
|
|
503
|
-
* @param {function()} onTick
|
|
504
|
-
*/
|
|
505
|
-
constructor(onTick) {}
|
|
506
|
-
/**
|
|
507
|
-
* Have the timer call |onTick| now.
|
|
508
|
-
* @return {!shaka.util.Timer}
|
|
509
|
-
*/
|
|
510
|
-
tickNow() {}
|
|
511
|
-
/**
|
|
512
|
-
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
513
|
-
* called first.
|
|
514
|
-
* @param {number} seconds
|
|
515
|
-
* @return {!shaka.util.Timer}
|
|
516
|
-
*/
|
|
517
|
-
tickAfter(seconds) {}
|
|
518
|
-
/**
|
|
519
|
-
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
520
|
-
* @param {number} seconds
|
|
521
|
-
* @return {!shaka.util.Timer}
|
|
522
|
-
*/
|
|
523
|
-
tickEvery(seconds) {}
|
|
524
|
-
/**
|
|
525
|
-
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
526
|
-
* after calling |stop|.
|
|
527
|
-
*/
|
|
528
|
-
stop() {}
|
|
529
|
-
};
|
|
530
|
-
/**
|
|
531
|
-
* @summary A set of Uint8Array utility functions.
|
|
532
|
-
*/
|
|
533
|
-
shaka.util.Uint8ArrayUtils = class {
|
|
534
|
-
/**
|
|
535
|
-
* Compare two Uint8Arrays for equality.
|
|
536
|
-
* @param {Uint8Array} arr1
|
|
537
|
-
* @param {Uint8Array} arr2
|
|
538
|
-
* @return {boolean}
|
|
539
|
-
* @deprecated
|
|
540
|
-
*/
|
|
541
|
-
static equal(arr1, arr2) {}
|
|
542
|
-
/**
|
|
543
|
-
* Convert a buffer to a base64 string. The output will be standard
|
|
544
|
-
* alphabet as opposed to base64url safe alphabet.
|
|
545
|
-
* @param {BufferSource} data
|
|
546
|
-
* @return {string}
|
|
547
|
-
*/
|
|
548
|
-
static toStandardBase64(data) {}
|
|
549
|
-
/**
|
|
550
|
-
* Convert a buffer to a base64 string. The output will always use the
|
|
551
|
-
* alternate encoding/alphabet also known as "base64url".
|
|
552
|
-
* @param {BufferSource} data
|
|
553
|
-
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
554
|
-
* Defaults to true.
|
|
555
|
-
* @return {string}
|
|
556
|
-
*/
|
|
557
|
-
static toBase64(data, padding) {}
|
|
558
|
-
/**
|
|
559
|
-
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
560
|
-
* alphabet or the alternate "base64url" alphabet.
|
|
561
|
-
* @param {string} str
|
|
562
|
-
* @return {!Uint8Array}
|
|
563
|
-
*/
|
|
564
|
-
static fromBase64(str) {}
|
|
565
|
-
/**
|
|
566
|
-
* Convert a hex string to a Uint8Array.
|
|
567
|
-
* @param {string} str
|
|
568
|
-
* @return {!Uint8Array}
|
|
569
|
-
*/
|
|
570
|
-
static fromHex(str) {}
|
|
571
|
-
/**
|
|
572
|
-
* Convert a buffer to a hex string.
|
|
573
|
-
* @param {BufferSource} data
|
|
574
|
-
* @return {string}
|
|
575
|
-
*/
|
|
576
|
-
static toHex(data) {}
|
|
577
|
-
/**
|
|
578
|
-
* Concatenate buffers.
|
|
579
|
-
* @param {...BufferSource} varArgs
|
|
580
|
-
* @return {!Uint8Array}
|
|
581
|
-
*/
|
|
582
|
-
static concat(...varArgs) {}
|
|
583
|
-
};
|
|
584
37
|
/**
|
|
585
38
|
* @implements {shaka.extern.Cue}
|
|
586
39
|
*/
|
|
@@ -841,113 +294,454 @@ shaka.text.Cue.fontStyle = {
|
|
|
841
294
|
/**
|
|
842
295
|
* @enum {string}
|
|
843
296
|
*/
|
|
844
|
-
shaka.text.Cue.textDecoration = {
|
|
845
|
-
'UNDERLINE': 'underline',
|
|
846
|
-
'LINE_THROUGH': 'lineThrough',
|
|
847
|
-
'OVERLINE': 'overline'
|
|
297
|
+
shaka.text.Cue.textDecoration = {
|
|
298
|
+
'UNDERLINE': 'underline',
|
|
299
|
+
'LINE_THROUGH': 'lineThrough',
|
|
300
|
+
'OVERLINE': 'overline'
|
|
301
|
+
};
|
|
302
|
+
/**
|
|
303
|
+
* @implements {shaka.extern.CueRegion}
|
|
304
|
+
* @struct
|
|
305
|
+
*/
|
|
306
|
+
shaka.text.CueRegion = class {
|
|
307
|
+
/** */
|
|
308
|
+
constructor() {}
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* @override
|
|
312
|
+
*/
|
|
313
|
+
shaka.text.CueRegion.prototype.id;
|
|
314
|
+
/**
|
|
315
|
+
* @override
|
|
316
|
+
*/
|
|
317
|
+
shaka.text.CueRegion.prototype.viewportAnchorX;
|
|
318
|
+
/**
|
|
319
|
+
* @override
|
|
320
|
+
*/
|
|
321
|
+
shaka.text.CueRegion.prototype.viewportAnchorY;
|
|
322
|
+
/**
|
|
323
|
+
* @override
|
|
324
|
+
*/
|
|
325
|
+
shaka.text.CueRegion.prototype.regionAnchorX;
|
|
326
|
+
/**
|
|
327
|
+
* @override
|
|
328
|
+
*/
|
|
329
|
+
shaka.text.CueRegion.prototype.regionAnchorY;
|
|
330
|
+
/**
|
|
331
|
+
* @override
|
|
332
|
+
*/
|
|
333
|
+
shaka.text.CueRegion.prototype.width;
|
|
334
|
+
/**
|
|
335
|
+
* @override
|
|
336
|
+
*/
|
|
337
|
+
shaka.text.CueRegion.prototype.height;
|
|
338
|
+
/**
|
|
339
|
+
* @override
|
|
340
|
+
*/
|
|
341
|
+
shaka.text.CueRegion.prototype.heightUnits;
|
|
342
|
+
/**
|
|
343
|
+
* @override
|
|
344
|
+
*/
|
|
345
|
+
shaka.text.CueRegion.prototype.widthUnits;
|
|
346
|
+
/**
|
|
347
|
+
* @override
|
|
348
|
+
*/
|
|
349
|
+
shaka.text.CueRegion.prototype.viewportAnchorUnits;
|
|
350
|
+
/**
|
|
351
|
+
* @override
|
|
352
|
+
*/
|
|
353
|
+
shaka.text.CueRegion.prototype.scroll;
|
|
354
|
+
/**
|
|
355
|
+
* @enum {number}
|
|
356
|
+
*/
|
|
357
|
+
shaka.text.CueRegion.units = {
|
|
358
|
+
'PX': 0,
|
|
359
|
+
'PERCENTAGE': 1,
|
|
360
|
+
'LINES': 2
|
|
361
|
+
};
|
|
362
|
+
/**
|
|
363
|
+
* @enum {string}
|
|
364
|
+
*/
|
|
365
|
+
shaka.text.CueRegion.scrollMode = {
|
|
366
|
+
'NONE': '',
|
|
367
|
+
'UP': 'up'
|
|
368
|
+
};
|
|
369
|
+
/**
|
|
370
|
+
* @summary A set of BufferSource utility functions.
|
|
371
|
+
*/
|
|
372
|
+
shaka.util.BufferUtils = class {
|
|
373
|
+
/**
|
|
374
|
+
* Compare two buffers for equality. For buffers of different types, this
|
|
375
|
+
* compares the underlying buffers as binary data.
|
|
376
|
+
* @param {?BufferSource} arr1
|
|
377
|
+
* @param {?BufferSource} arr2
|
|
378
|
+
* @return {boolean}
|
|
379
|
+
*/
|
|
380
|
+
static equal(arr1, arr2) {}
|
|
381
|
+
/**
|
|
382
|
+
* Gets an ArrayBuffer that contains the data from the given TypedArray. Note
|
|
383
|
+
* this will allocate a new ArrayBuffer if the object is a partial view of
|
|
384
|
+
* the data.
|
|
385
|
+
* @param {!BufferSource} view
|
|
386
|
+
* @return {!ArrayBuffer}
|
|
387
|
+
*/
|
|
388
|
+
static toArrayBuffer(view) {}
|
|
389
|
+
/**
|
|
390
|
+
* Creates a new Uint8Array view on the same buffer. This clamps the values
|
|
391
|
+
* to be within the same view (i.e. you can't use this to move past the end
|
|
392
|
+
* of the view, even if the underlying buffer is larger). However, you can
|
|
393
|
+
* pass a negative offset to access the data before the view.
|
|
394
|
+
* @param {BufferSource} data
|
|
395
|
+
* @param {number=} offset The offset from the beginning of this data's view
|
|
396
|
+
* to start the new view at.
|
|
397
|
+
* @param {number=} length The byte length of the new view.
|
|
398
|
+
* @return {!Uint8Array}
|
|
399
|
+
*/
|
|
400
|
+
static toUint8(data, offset, length) {}
|
|
401
|
+
/**
|
|
402
|
+
* Creates a DataView over the given buffer.
|
|
403
|
+
* @see toUint8
|
|
404
|
+
* @param {BufferSource} buffer
|
|
405
|
+
* @param {number=} offset
|
|
406
|
+
* @param {number=} length
|
|
407
|
+
* @return {!DataView}
|
|
408
|
+
*/
|
|
409
|
+
static toDataView(buffer, offset, length) {}
|
|
410
|
+
};
|
|
411
|
+
/**
|
|
412
|
+
* An interface to standardize how objects are destroyed.
|
|
413
|
+
* @interface
|
|
414
|
+
*/
|
|
415
|
+
shaka.util.IDestroyable = class {
|
|
416
|
+
/**
|
|
417
|
+
* Request that this object be destroyed, releasing all resources and shutting
|
|
418
|
+
* down all operations. Returns a Promise which is resolved when destruction
|
|
419
|
+
* is complete. This Promise should never be rejected.
|
|
420
|
+
* @return {!Promise}
|
|
421
|
+
*/
|
|
422
|
+
destroy() {}
|
|
423
|
+
};
|
|
424
|
+
/**
|
|
425
|
+
*/
|
|
426
|
+
shaka.dependencies = class {
|
|
427
|
+
/**
|
|
428
|
+
* Registers a new dependency.
|
|
429
|
+
* @param {shaka.dependencies.Allowed} key which is used for retrieving a
|
|
430
|
+
* dependency
|
|
431
|
+
* @param {?} dep a dependency
|
|
432
|
+
*/
|
|
433
|
+
static add(key, dep) {}
|
|
434
|
+
/**
|
|
435
|
+
* Check if we have a dependency for the key.
|
|
436
|
+
* @param {shaka.dependencies.Allowed} key key
|
|
437
|
+
* @return {boolean}
|
|
438
|
+
*/
|
|
439
|
+
static has(key) {}
|
|
440
|
+
};
|
|
441
|
+
/**
|
|
442
|
+
* @enum {string}
|
|
443
|
+
*/
|
|
444
|
+
shaka.dependencies.Allowed = {
|
|
445
|
+
muxjs: 'muxjs'
|
|
848
446
|
};
|
|
849
447
|
/**
|
|
850
|
-
* @
|
|
851
|
-
*
|
|
448
|
+
* @summary
|
|
449
|
+
* Describes an error that happened.
|
|
450
|
+
* @description
|
|
451
|
+
* This uses numerical codes to describe
|
|
452
|
+
* which error happened.
|
|
453
|
+
* Some error are caused by errors from the browser. In these cases, the error
|
|
454
|
+
* object is provided as part of the <code>data</code> field. System codes come
|
|
455
|
+
* from the browser and may or may not be documented. Here are some places
|
|
456
|
+
* where the errors may be documented:
|
|
457
|
+
* <ul>
|
|
458
|
+
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/API/MediaError">MediaError</a>
|
|
459
|
+
* <li><a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Status">HTTP Codes</a>
|
|
460
|
+
* <li><a href="https://hresult.info">Edge/PlayReady errors</a>
|
|
461
|
+
* </ul>
|
|
462
|
+
* @implements {shaka.extern.Error}
|
|
463
|
+
* @extends {Error}
|
|
852
464
|
*/
|
|
853
|
-
shaka.
|
|
854
|
-
/**
|
|
855
|
-
|
|
465
|
+
shaka.util.Error = class {
|
|
466
|
+
/**
|
|
467
|
+
* @param {shaka.util.Error.Severity} severity
|
|
468
|
+
* @param {shaka.util.Error.Category} category
|
|
469
|
+
* @param {shaka.util.Error.Code} code
|
|
470
|
+
* @param {...*} varArgs
|
|
471
|
+
*/
|
|
472
|
+
constructor(severity, category, code, ...varArgs) {}
|
|
856
473
|
};
|
|
857
474
|
/**
|
|
858
475
|
* @override
|
|
859
476
|
*/
|
|
860
|
-
shaka.
|
|
861
|
-
/**
|
|
862
|
-
* @override
|
|
863
|
-
*/
|
|
864
|
-
shaka.text.CueRegion.prototype.viewportAnchorX;
|
|
865
|
-
/**
|
|
866
|
-
* @override
|
|
867
|
-
*/
|
|
868
|
-
shaka.text.CueRegion.prototype.viewportAnchorY;
|
|
869
|
-
/**
|
|
870
|
-
* @override
|
|
871
|
-
*/
|
|
872
|
-
shaka.text.CueRegion.prototype.regionAnchorX;
|
|
873
|
-
/**
|
|
874
|
-
* @override
|
|
875
|
-
*/
|
|
876
|
-
shaka.text.CueRegion.prototype.regionAnchorY;
|
|
877
|
-
/**
|
|
878
|
-
* @override
|
|
879
|
-
*/
|
|
880
|
-
shaka.text.CueRegion.prototype.width;
|
|
477
|
+
shaka.util.Error.prototype.severity;
|
|
881
478
|
/**
|
|
882
479
|
* @override
|
|
883
480
|
*/
|
|
884
|
-
shaka.
|
|
481
|
+
shaka.util.Error.prototype.category;
|
|
885
482
|
/**
|
|
886
483
|
* @override
|
|
887
484
|
*/
|
|
888
|
-
shaka.
|
|
485
|
+
shaka.util.Error.prototype.code;
|
|
889
486
|
/**
|
|
890
487
|
* @override
|
|
891
488
|
*/
|
|
892
|
-
shaka.
|
|
489
|
+
shaka.util.Error.prototype.data;
|
|
893
490
|
/**
|
|
894
491
|
* @override
|
|
895
492
|
*/
|
|
896
|
-
shaka.
|
|
493
|
+
shaka.util.Error.prototype.handled;
|
|
897
494
|
/**
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
shaka.
|
|
495
|
+
* @enum {number}
|
|
496
|
+
*/
|
|
497
|
+
shaka.util.Error.Severity = {
|
|
498
|
+
'RECOVERABLE': 1,
|
|
499
|
+
'CRITICAL': 2
|
|
500
|
+
};
|
|
901
501
|
/**
|
|
902
502
|
* @enum {number}
|
|
903
503
|
*/
|
|
904
|
-
shaka.
|
|
905
|
-
'
|
|
906
|
-
'
|
|
907
|
-
'
|
|
504
|
+
shaka.util.Error.Category = {
|
|
505
|
+
'NETWORK': 1,
|
|
506
|
+
'TEXT': 2,
|
|
507
|
+
'MEDIA': 3,
|
|
508
|
+
'MANIFEST': 4,
|
|
509
|
+
'STREAMING': 5,
|
|
510
|
+
'DRM': 6,
|
|
511
|
+
'PLAYER': 7,
|
|
512
|
+
'CAST': 8,
|
|
513
|
+
'STORAGE': 9,
|
|
514
|
+
'ADS': 10
|
|
908
515
|
};
|
|
909
516
|
/**
|
|
910
|
-
* @enum {
|
|
517
|
+
* @enum {number}
|
|
911
518
|
*/
|
|
912
|
-
shaka.
|
|
913
|
-
'
|
|
914
|
-
'
|
|
519
|
+
shaka.util.Error.Code = {
|
|
520
|
+
'UNSUPPORTED_SCHEME': 1000,
|
|
521
|
+
'BAD_HTTP_STATUS': 1001,
|
|
522
|
+
'HTTP_ERROR': 1002,
|
|
523
|
+
'TIMEOUT': 1003,
|
|
524
|
+
'MALFORMED_DATA_URI': 1004,
|
|
525
|
+
'REQUEST_FILTER_ERROR': 1006,
|
|
526
|
+
'RESPONSE_FILTER_ERROR': 1007,
|
|
527
|
+
'MALFORMED_TEST_URI': 1008,
|
|
528
|
+
'UNEXPECTED_TEST_REQUEST': 1009,
|
|
529
|
+
'ATTEMPTS_EXHAUSTED': 1010,
|
|
530
|
+
'INVALID_TEXT_HEADER': 2000,
|
|
531
|
+
'INVALID_TEXT_CUE': 2001,
|
|
532
|
+
'UNABLE_TO_DETECT_ENCODING': 2003,
|
|
533
|
+
'BAD_ENCODING': 2004,
|
|
534
|
+
'INVALID_XML': 2005,
|
|
535
|
+
'INVALID_MP4_TTML': 2007,
|
|
536
|
+
'INVALID_MP4_VTT': 2008,
|
|
537
|
+
'UNABLE_TO_EXTRACT_CUE_START_TIME': 2009,
|
|
538
|
+
'INVALID_MP4_CEA': 2010,
|
|
539
|
+
'TEXT_COULD_NOT_GUESS_MIME_TYPE': 2011,
|
|
540
|
+
'CANNOT_ADD_EXTERNAL_TEXT_TO_SRC_EQUALS': 2012,
|
|
541
|
+
'TEXT_ONLY_WEBVTT_SRC_EQUALS': 2013,
|
|
542
|
+
'MISSING_TEXT_PLUGIN': 2014,
|
|
543
|
+
'BUFFER_READ_OUT_OF_BOUNDS': 3000,
|
|
544
|
+
'JS_INTEGER_OVERFLOW': 3001,
|
|
545
|
+
'EBML_OVERFLOW': 3002,
|
|
546
|
+
'EBML_BAD_FLOATING_POINT_SIZE': 3003,
|
|
547
|
+
'MP4_SIDX_WRONG_BOX_TYPE': 3004,
|
|
548
|
+
'MP4_SIDX_INVALID_TIMESCALE': 3005,
|
|
549
|
+
'MP4_SIDX_TYPE_NOT_SUPPORTED': 3006,
|
|
550
|
+
'WEBM_CUES_ELEMENT_MISSING': 3007,
|
|
551
|
+
'WEBM_EBML_HEADER_ELEMENT_MISSING': 3008,
|
|
552
|
+
'WEBM_SEGMENT_ELEMENT_MISSING': 3009,
|
|
553
|
+
'WEBM_INFO_ELEMENT_MISSING': 3010,
|
|
554
|
+
'WEBM_DURATION_ELEMENT_MISSING': 3011,
|
|
555
|
+
'WEBM_CUE_TRACK_POSITIONS_ELEMENT_MISSING': 3012,
|
|
556
|
+
'WEBM_CUE_TIME_ELEMENT_MISSING': 3013,
|
|
557
|
+
'MEDIA_SOURCE_OPERATION_FAILED': 3014,
|
|
558
|
+
'MEDIA_SOURCE_OPERATION_THREW': 3015,
|
|
559
|
+
'VIDEO_ERROR': 3016,
|
|
560
|
+
'QUOTA_EXCEEDED_ERROR': 3017,
|
|
561
|
+
'TRANSMUXING_FAILED': 3018,
|
|
562
|
+
'CONTENT_TRANSFORMATION_FAILED': 3019,
|
|
563
|
+
'UNABLE_TO_GUESS_MANIFEST_TYPE': 4000,
|
|
564
|
+
'DASH_INVALID_XML': 4001,
|
|
565
|
+
'DASH_NO_SEGMENT_INFO': 4002,
|
|
566
|
+
'DASH_EMPTY_ADAPTATION_SET': 4003,
|
|
567
|
+
'DASH_EMPTY_PERIOD': 4004,
|
|
568
|
+
'DASH_WEBM_MISSING_INIT': 4005,
|
|
569
|
+
'DASH_UNSUPPORTED_CONTAINER': 4006,
|
|
570
|
+
'DASH_PSSH_BAD_ENCODING': 4007,
|
|
571
|
+
'DASH_NO_COMMON_KEY_SYSTEM': 4008,
|
|
572
|
+
'DASH_MULTIPLE_KEY_IDS_NOT_SUPPORTED': 4009,
|
|
573
|
+
'DASH_CONFLICTING_KEY_IDS': 4010,
|
|
574
|
+
'RESTRICTIONS_CANNOT_BE_MET': 4012,
|
|
575
|
+
'HLS_PLAYLIST_HEADER_MISSING': 4015,
|
|
576
|
+
'INVALID_HLS_TAG': 4016,
|
|
577
|
+
'HLS_INVALID_PLAYLIST_HIERARCHY': 4017,
|
|
578
|
+
'DASH_DUPLICATE_REPRESENTATION_ID': 4018,
|
|
579
|
+
'HLS_MULTIPLE_MEDIA_INIT_SECTIONS_FOUND': 4020,
|
|
580
|
+
'HLS_MASTER_PLAYLIST_NOT_PROVIDED': 4022,
|
|
581
|
+
'HLS_REQUIRED_ATTRIBUTE_MISSING': 4023,
|
|
582
|
+
'HLS_REQUIRED_TAG_MISSING': 4024,
|
|
583
|
+
'HLS_COULD_NOT_GUESS_CODECS': 4025,
|
|
584
|
+
'HLS_KEYFORMATS_NOT_SUPPORTED': 4026,
|
|
585
|
+
'DASH_UNSUPPORTED_XLINK_ACTUATE': 4027,
|
|
586
|
+
'DASH_XLINK_DEPTH_LIMIT': 4028,
|
|
587
|
+
'HLS_COULD_NOT_PARSE_SEGMENT_START_TIME': 4030,
|
|
588
|
+
'CONTENT_UNSUPPORTED_BY_BROWSER': 4032,
|
|
589
|
+
'CANNOT_ADD_EXTERNAL_TEXT_TO_LIVE_STREAM': 4033,
|
|
590
|
+
'HLS_AES_128_ENCRYPTION_NOT_SUPPORTED': 4034,
|
|
591
|
+
'HLS_INTERNAL_SKIP_STREAM': 4035,
|
|
592
|
+
'NO_VARIANTS': 4036,
|
|
593
|
+
'PERIOD_FLATTENING_FAILED': 4037,
|
|
594
|
+
'INCONSISTENT_DRM_ACROSS_PERIODS': 4038,
|
|
595
|
+
'HLS_VARIABLE_NOT_FOUND': 4039,
|
|
596
|
+
'STREAMING_ENGINE_STARTUP_INVALID_STATE': 5006,
|
|
597
|
+
'NO_RECOGNIZED_KEY_SYSTEMS': 6000,
|
|
598
|
+
'REQUESTED_KEY_SYSTEM_CONFIG_UNAVAILABLE': 6001,
|
|
599
|
+
'FAILED_TO_CREATE_CDM': 6002,
|
|
600
|
+
'FAILED_TO_ATTACH_TO_VIDEO': 6003,
|
|
601
|
+
'INVALID_SERVER_CERTIFICATE': 6004,
|
|
602
|
+
'FAILED_TO_CREATE_SESSION': 6005,
|
|
603
|
+
'FAILED_TO_GENERATE_LICENSE_REQUEST': 6006,
|
|
604
|
+
'LICENSE_REQUEST_FAILED': 6007,
|
|
605
|
+
'LICENSE_RESPONSE_REJECTED': 6008,
|
|
606
|
+
'ENCRYPTED_CONTENT_WITHOUT_DRM_INFO': 6010,
|
|
607
|
+
'NO_LICENSE_SERVER_GIVEN': 6012,
|
|
608
|
+
'OFFLINE_SESSION_REMOVED': 6013,
|
|
609
|
+
'EXPIRED': 6014,
|
|
610
|
+
'SERVER_CERTIFICATE_REQUIRED': 6015,
|
|
611
|
+
'INIT_DATA_TRANSFORM_ERROR': 6016,
|
|
612
|
+
'SERVER_CERTIFICATE_REQUEST_FAILED': 6017,
|
|
613
|
+
'LOAD_INTERRUPTED': 7000,
|
|
614
|
+
'OPERATION_ABORTED': 7001,
|
|
615
|
+
'NO_VIDEO_ELEMENT': 7002,
|
|
616
|
+
'OBJECT_DESTROYED': 7003,
|
|
617
|
+
'CONTENT_NOT_LOADED': 7004,
|
|
618
|
+
'CAST_API_UNAVAILABLE': 8000,
|
|
619
|
+
'NO_CAST_RECEIVERS': 8001,
|
|
620
|
+
'ALREADY_CASTING': 8002,
|
|
621
|
+
'UNEXPECTED_CAST_ERROR': 8003,
|
|
622
|
+
'CAST_CANCELED_BY_USER': 8004,
|
|
623
|
+
'CAST_CONNECTION_TIMED_OUT': 8005,
|
|
624
|
+
'CAST_RECEIVER_APP_UNAVAILABLE': 8006,
|
|
625
|
+
'STORAGE_NOT_SUPPORTED': 9000,
|
|
626
|
+
'INDEXED_DB_ERROR': 9001,
|
|
627
|
+
'DEPRECATED_OPERATION_ABORTED': 9002,
|
|
628
|
+
'REQUESTED_ITEM_NOT_FOUND': 9003,
|
|
629
|
+
'MALFORMED_OFFLINE_URI': 9004,
|
|
630
|
+
'CANNOT_STORE_LIVE_OFFLINE': 9005,
|
|
631
|
+
'NO_INIT_DATA_FOR_OFFLINE': 9007,
|
|
632
|
+
'LOCAL_PLAYER_INSTANCE_REQUIRED': 9008,
|
|
633
|
+
'NEW_KEY_OPERATION_NOT_SUPPORTED': 9011,
|
|
634
|
+
'KEY_NOT_FOUND': 9012,
|
|
635
|
+
'MISSING_STORAGE_CELL': 9013,
|
|
636
|
+
'STORAGE_LIMIT_REACHED': 9014,
|
|
637
|
+
'DOWNLOAD_SIZE_CALLBACK_ERROR': 9015,
|
|
638
|
+
'CS_IMA_SDK_MISSING': 10000,
|
|
639
|
+
'CS_AD_MANAGER_NOT_INITIALIZED': 10001,
|
|
640
|
+
'SS_IMA_SDK_MISSING': 10002,
|
|
641
|
+
'SS_AD_MANAGER_NOT_INITIALIZED': 10003,
|
|
642
|
+
'CURRENT_DAI_REQUEST_NOT_FINISHED': 10004
|
|
915
643
|
};
|
|
916
644
|
/**
|
|
917
|
-
*
|
|
918
|
-
* @
|
|
645
|
+
* @namespace shaka.util.StringUtils
|
|
646
|
+
* @summary A set of string utility functions.
|
|
919
647
|
*/
|
|
920
|
-
shaka.util.
|
|
648
|
+
shaka.util.StringUtils = class {
|
|
649
|
+
/**
|
|
650
|
+
* Creates a string from the given buffer as UTF-8 encoding.
|
|
651
|
+
* @param {?BufferSource} data
|
|
652
|
+
* @return {string}
|
|
653
|
+
*/
|
|
654
|
+
static fromUTF8(data) {}
|
|
655
|
+
/**
|
|
656
|
+
* Creates a string from the given buffer as UTF-16 encoding.
|
|
657
|
+
* @param {?BufferSource} data
|
|
658
|
+
* @param {boolean} littleEndian
|
|
659
|
+
true to read little endian, false to read big.
|
|
660
|
+
* @param {boolean=} noThrow true to avoid throwing in cases where we may
|
|
661
|
+
* expect invalid input. If noThrow is true and the data has an odd
|
|
662
|
+
* length,it will be truncated.
|
|
663
|
+
* @return {string}
|
|
664
|
+
*/
|
|
665
|
+
static fromUTF16(data, littleEndian, noThrow) {}
|
|
666
|
+
/**
|
|
667
|
+
* Creates a string from the given buffer, auto-detecting the encoding that is
|
|
668
|
+
* being used. If it cannot detect the encoding, it will throw an exception.
|
|
669
|
+
* @param {?BufferSource} data
|
|
670
|
+
* @return {string}
|
|
671
|
+
*/
|
|
672
|
+
static fromBytesAutoDetect(data) {}
|
|
673
|
+
/**
|
|
674
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-8 encoding.
|
|
675
|
+
* @param {string} str
|
|
676
|
+
* @return {!ArrayBuffer}
|
|
677
|
+
*/
|
|
678
|
+
static toUTF8(str) {}
|
|
921
679
|
/**
|
|
922
|
-
*
|
|
923
|
-
*
|
|
924
|
-
*
|
|
925
|
-
* @return {!
|
|
680
|
+
* Creates a ArrayBuffer from the given string, converting to UTF-16 encoding.
|
|
681
|
+
* @param {string} str
|
|
682
|
+
* @param {boolean} littleEndian
|
|
683
|
+
* @return {!ArrayBuffer}
|
|
926
684
|
*/
|
|
927
|
-
|
|
685
|
+
static toUTF16(str, littleEndian) {}
|
|
686
|
+
/**
|
|
687
|
+
* Resets the fromCharCode method's implementation.
|
|
688
|
+
* For debug use.
|
|
689
|
+
*/
|
|
690
|
+
static resetFromCharCode() {}
|
|
928
691
|
};
|
|
929
692
|
/**
|
|
693
|
+
* @summary A set of Uint8Array utility functions.
|
|
930
694
|
*/
|
|
931
|
-
shaka.
|
|
695
|
+
shaka.util.Uint8ArrayUtils = class {
|
|
932
696
|
/**
|
|
933
|
-
*
|
|
934
|
-
* @param {
|
|
935
|
-
*
|
|
936
|
-
* @
|
|
697
|
+
* Compare two Uint8Arrays for equality.
|
|
698
|
+
* @param {Uint8Array} arr1
|
|
699
|
+
* @param {Uint8Array} arr2
|
|
700
|
+
* @return {boolean}
|
|
701
|
+
* @deprecated
|
|
937
702
|
*/
|
|
938
|
-
static
|
|
703
|
+
static equal(arr1, arr2) {}
|
|
939
704
|
/**
|
|
940
|
-
*
|
|
941
|
-
*
|
|
942
|
-
* @
|
|
705
|
+
* Convert a buffer to a base64 string. The output will be standard
|
|
706
|
+
* alphabet as opposed to base64url safe alphabet.
|
|
707
|
+
* @param {BufferSource} data
|
|
708
|
+
* @return {string}
|
|
943
709
|
*/
|
|
944
|
-
static
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
710
|
+
static toStandardBase64(data) {}
|
|
711
|
+
/**
|
|
712
|
+
* Convert a buffer to a base64 string. The output will always use the
|
|
713
|
+
* alternate encoding/alphabet also known as "base64url".
|
|
714
|
+
* @param {BufferSource} data
|
|
715
|
+
* @param {boolean=} padding If true, pad the output with equals signs.
|
|
716
|
+
* Defaults to true.
|
|
717
|
+
* @return {string}
|
|
718
|
+
*/
|
|
719
|
+
static toBase64(data, padding) {}
|
|
720
|
+
/**
|
|
721
|
+
* Convert a base64 string to a Uint8Array. Accepts either the standard
|
|
722
|
+
* alphabet or the alternate "base64url" alphabet.
|
|
723
|
+
* @param {string} str
|
|
724
|
+
* @return {!Uint8Array}
|
|
725
|
+
*/
|
|
726
|
+
static fromBase64(str) {}
|
|
727
|
+
/**
|
|
728
|
+
* Convert a hex string to a Uint8Array.
|
|
729
|
+
* @param {string} str
|
|
730
|
+
* @return {!Uint8Array}
|
|
731
|
+
*/
|
|
732
|
+
static fromHex(str) {}
|
|
733
|
+
/**
|
|
734
|
+
* Convert a buffer to a hex string.
|
|
735
|
+
* @param {BufferSource} data
|
|
736
|
+
* @return {string}
|
|
737
|
+
*/
|
|
738
|
+
static toHex(data) {}
|
|
739
|
+
/**
|
|
740
|
+
* Concatenate buffers.
|
|
741
|
+
* @param {...BufferSource} varArgs
|
|
742
|
+
* @return {!Uint8Array}
|
|
743
|
+
*/
|
|
744
|
+
static concat(...varArgs) {}
|
|
951
745
|
};
|
|
952
746
|
/**
|
|
953
747
|
* @summary Manages text parsers and cues.
|
|
@@ -975,70 +769,42 @@ shaka.text.TextEngine = class {
|
|
|
975
769
|
destroy() {}
|
|
976
770
|
};
|
|
977
771
|
/**
|
|
978
|
-
*
|
|
979
|
-
*
|
|
980
|
-
*
|
|
981
|
-
* @interface
|
|
982
|
-
*/
|
|
983
|
-
shaka.util.IReleasable = class {
|
|
984
|
-
/**
|
|
985
|
-
* Request that this object release all internal references.
|
|
986
|
-
*/
|
|
987
|
-
release() {}
|
|
988
|
-
};
|
|
989
|
-
/**
|
|
990
|
-
* @summary
|
|
991
|
-
* An EventManager maintains a collection of "event
|
|
992
|
-
* bindings" between event targets and event listeners.
|
|
993
|
-
* @implements {shaka.util.IReleasable}
|
|
772
|
+
* A timer allows a single function to be executed at a later time or at
|
|
773
|
+
* regular intervals.
|
|
774
|
+
* @final
|
|
994
775
|
*/
|
|
995
|
-
shaka.util.
|
|
996
|
-
/** */
|
|
997
|
-
constructor() {}
|
|
776
|
+
shaka.util.Timer = class {
|
|
998
777
|
/**
|
|
999
|
-
*
|
|
1000
|
-
*
|
|
778
|
+
* Create a new timer. A timer is committed to a single callback function.
|
|
779
|
+
* While there is no technical reason to do this, it is far easier to
|
|
780
|
+
* understand and use timers when they are connected to one functional idea.
|
|
781
|
+
* @param {function()} onTick
|
|
1001
782
|
*/
|
|
1002
|
-
|
|
783
|
+
constructor(onTick) {}
|
|
1003
784
|
/**
|
|
1004
|
-
*
|
|
1005
|
-
* @
|
|
1006
|
-
* @param {string} type The event type.
|
|
1007
|
-
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1008
|
-
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1009
|
-
* specifies characteristics about the event listener.
|
|
1010
|
-
* The passive option, if true, indicates that this function will never
|
|
1011
|
-
* call preventDefault(), which improves scrolling performance.
|
|
785
|
+
* Have the timer call |onTick| now.
|
|
786
|
+
* @return {!shaka.util.Timer}
|
|
1012
787
|
*/
|
|
1013
|
-
|
|
788
|
+
tickNow() {}
|
|
1014
789
|
/**
|
|
1015
|
-
*
|
|
1016
|
-
*
|
|
1017
|
-
* @param {
|
|
1018
|
-
* @
|
|
1019
|
-
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1020
|
-
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1021
|
-
* specifies characteristics about the event listener.
|
|
1022
|
-
* The passive option, if true, indicates that this function will never
|
|
1023
|
-
* call preventDefault(), which improves scrolling performance.
|
|
790
|
+
* Have the timer call |onTick| after |seconds| has elapsed unless |stop| is
|
|
791
|
+
* called first.
|
|
792
|
+
* @param {number} seconds
|
|
793
|
+
* @return {!shaka.util.Timer}
|
|
1024
794
|
*/
|
|
1025
|
-
|
|
795
|
+
tickAfter(seconds) {}
|
|
1026
796
|
/**
|
|
1027
|
-
*
|
|
1028
|
-
* @param {
|
|
1029
|
-
* @
|
|
1030
|
-
* @param {shaka.util.EventManager.ListenerType=} listener The event listener.
|
|
797
|
+
* Have the timer call |onTick| every |seconds| until |stop| is called.
|
|
798
|
+
* @param {number} seconds
|
|
799
|
+
* @return {!shaka.util.Timer}
|
|
1031
800
|
*/
|
|
1032
|
-
|
|
801
|
+
tickEvery(seconds) {}
|
|
1033
802
|
/**
|
|
1034
|
-
*
|
|
803
|
+
* Stop the timer and clear the previous behaviour. The timer is still usable
|
|
804
|
+
* after calling |stop|.
|
|
1035
805
|
*/
|
|
1036
|
-
|
|
806
|
+
stop() {}
|
|
1037
807
|
};
|
|
1038
|
-
/**
|
|
1039
|
-
* @typedef {function(!Event)}
|
|
1040
|
-
*/
|
|
1041
|
-
shaka.util.EventManager.ListenerType;
|
|
1042
808
|
/**
|
|
1043
809
|
* @summary
|
|
1044
810
|
* <p>
|
|
@@ -1350,54 +1116,120 @@ shaka.net.NetworkingEngine.NumBytesRemainingClass = class {
|
|
|
1350
1116
|
/**
|
|
1351
1117
|
* Constructor
|
|
1352
1118
|
*/
|
|
1353
|
-
constructor() {}
|
|
1354
|
-
};
|
|
1355
|
-
/**
|
|
1356
|
-
* A pending network request. This can track the current progress of the
|
|
1357
|
-
* download, and allows the request to be aborted if the network is slow.
|
|
1358
|
-
* @implements {shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
1359
|
-
* @extends {shaka.util.AbortableOperation}
|
|
1360
|
-
*/
|
|
1361
|
-
shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOperation {
|
|
1119
|
+
constructor() {}
|
|
1120
|
+
};
|
|
1121
|
+
/**
|
|
1122
|
+
* A pending network request. This can track the current progress of the
|
|
1123
|
+
* download, and allows the request to be aborted if the network is slow.
|
|
1124
|
+
* @implements {shaka.extern.IAbortableOperation.<shaka.extern.Response>}
|
|
1125
|
+
* @extends {shaka.util.AbortableOperation}
|
|
1126
|
+
*/
|
|
1127
|
+
shaka.net.NetworkingEngine.PendingRequest = class extends shaka.util.AbortableOperation {
|
|
1128
|
+
/**
|
|
1129
|
+
* @param {!Promise} promise
|
|
1130
|
+
* A Promise which represents the underlying operation. It is resolved
|
|
1131
|
+
* when the operation is complete, and rejected if the operation fails or
|
|
1132
|
+
* is aborted. Aborted operations should be rejected with a
|
|
1133
|
+
* shaka.util.Error object using the error code OPERATION_ABORTED.
|
|
1134
|
+
* @param {function():!Promise} onAbort
|
|
1135
|
+
* Will be called by this object to abort the underlying operation. This
|
|
1136
|
+
* is not cancelation, and will not necessarily result in any work being
|
|
1137
|
+
* undone. abort() should return a Promise which is resolved when the
|
|
1138
|
+
* underlying operation has been aborted. The returned Promise should
|
|
1139
|
+
* never be rejected.
|
|
1140
|
+
* @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
|
|
1141
|
+
* numBytesRemainingObj
|
|
1142
|
+
*/
|
|
1143
|
+
constructor(promise, onAbort, numBytesRemainingObj) {}
|
|
1144
|
+
};
|
|
1145
|
+
/**
|
|
1146
|
+
* Request types. Allows a filter to decide which requests to read/alter.
|
|
1147
|
+
* @enum {number}
|
|
1148
|
+
*/
|
|
1149
|
+
shaka.net.NetworkingEngine.RequestType = {
|
|
1150
|
+
'MANIFEST': 0,
|
|
1151
|
+
'SEGMENT': 1,
|
|
1152
|
+
'LICENSE': 2,
|
|
1153
|
+
'APP': 3,
|
|
1154
|
+
'TIMING': 4,
|
|
1155
|
+
'SERVER_CERTIFICATE': 5
|
|
1156
|
+
};
|
|
1157
|
+
/**
|
|
1158
|
+
* Priority level for network scheme plugins.
|
|
1159
|
+
* If multiple plugins are provided for the same scheme, only the
|
|
1160
|
+
* highest-priority one is used.
|
|
1161
|
+
* @enum {number}
|
|
1162
|
+
*/
|
|
1163
|
+
shaka.net.NetworkingEngine.PluginPriority = {
|
|
1164
|
+
'FALLBACK': 1,
|
|
1165
|
+
'PREFERRED': 2,
|
|
1166
|
+
'APPLICATION': 3
|
|
1167
|
+
};
|
|
1168
|
+
/**
|
|
1169
|
+
* An interface to standardize how objects release internal references
|
|
1170
|
+
* synchronously. If an object needs to asynchronously release references, then
|
|
1171
|
+
* it should use 'shaka.util.IDestroyable'.
|
|
1172
|
+
* @interface
|
|
1173
|
+
*/
|
|
1174
|
+
shaka.util.IReleasable = class {
|
|
1175
|
+
/**
|
|
1176
|
+
* Request that this object release all internal references.
|
|
1177
|
+
*/
|
|
1178
|
+
release() {}
|
|
1179
|
+
};
|
|
1180
|
+
/**
|
|
1181
|
+
* @summary
|
|
1182
|
+
* An EventManager maintains a collection of "event
|
|
1183
|
+
* bindings" between event targets and event listeners.
|
|
1184
|
+
* @implements {shaka.util.IReleasable}
|
|
1185
|
+
*/
|
|
1186
|
+
shaka.util.EventManager = class {
|
|
1187
|
+
/** */
|
|
1188
|
+
constructor() {}
|
|
1189
|
+
/**
|
|
1190
|
+
* Detaches all event listeners.
|
|
1191
|
+
* @override
|
|
1192
|
+
*/
|
|
1193
|
+
release() {}
|
|
1194
|
+
/**
|
|
1195
|
+
* Attaches an event listener to an event target.
|
|
1196
|
+
* @param {EventTarget} target The event target.
|
|
1197
|
+
* @param {string} type The event type.
|
|
1198
|
+
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1199
|
+
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1200
|
+
* specifies characteristics about the event listener.
|
|
1201
|
+
* The passive option, if true, indicates that this function will never
|
|
1202
|
+
* call preventDefault(), which improves scrolling performance.
|
|
1203
|
+
*/
|
|
1204
|
+
listen(target, type, listener, options) {}
|
|
1205
|
+
/**
|
|
1206
|
+
* Attaches an event listener to an event target. The listener will be
|
|
1207
|
+
* removed when the first instance of the event is fired.
|
|
1208
|
+
* @param {EventTarget} target The event target.
|
|
1209
|
+
* @param {string} type The event type.
|
|
1210
|
+
* @param {shaka.util.EventManager.ListenerType} listener The event listener.
|
|
1211
|
+
* @param {(boolean|!AddEventListenerOptions)=} options An object that
|
|
1212
|
+
* specifies characteristics about the event listener.
|
|
1213
|
+
* The passive option, if true, indicates that this function will never
|
|
1214
|
+
* call preventDefault(), which improves scrolling performance.
|
|
1215
|
+
*/
|
|
1216
|
+
listenOnce(target, type, listener, options) {}
|
|
1217
|
+
/**
|
|
1218
|
+
* Detaches an event listener from an event target.
|
|
1219
|
+
* @param {EventTarget} target The event target.
|
|
1220
|
+
* @param {string} type The event type.
|
|
1221
|
+
* @param {shaka.util.EventManager.ListenerType=} listener The event listener.
|
|
1222
|
+
*/
|
|
1223
|
+
unlisten(target, type, listener) {}
|
|
1362
1224
|
/**
|
|
1363
|
-
*
|
|
1364
|
-
* A Promise which represents the underlying operation. It is resolved
|
|
1365
|
-
* when the operation is complete, and rejected if the operation fails or
|
|
1366
|
-
* is aborted. Aborted operations should be rejected with a
|
|
1367
|
-
* shaka.util.Error object using the error code OPERATION_ABORTED.
|
|
1368
|
-
* @param {function():!Promise} onAbort
|
|
1369
|
-
* Will be called by this object to abort the underlying operation. This
|
|
1370
|
-
* is not cancelation, and will not necessarily result in any work being
|
|
1371
|
-
* undone. abort() should return a Promise which is resolved when the
|
|
1372
|
-
* underlying operation has been aborted. The returned Promise should
|
|
1373
|
-
* never be rejected.
|
|
1374
|
-
* @param {shaka.net.NetworkingEngine.NumBytesRemainingClass}
|
|
1375
|
-
* numBytesRemainingObj
|
|
1225
|
+
* Detaches all event listeners from all targets.
|
|
1376
1226
|
*/
|
|
1377
|
-
|
|
1378
|
-
};
|
|
1379
|
-
/**
|
|
1380
|
-
* Request types. Allows a filter to decide which requests to read/alter.
|
|
1381
|
-
* @enum {number}
|
|
1382
|
-
*/
|
|
1383
|
-
shaka.net.NetworkingEngine.RequestType = {
|
|
1384
|
-
'MANIFEST': 0,
|
|
1385
|
-
'SEGMENT': 1,
|
|
1386
|
-
'LICENSE': 2,
|
|
1387
|
-
'APP': 3,
|
|
1388
|
-
'TIMING': 4
|
|
1227
|
+
removeAll() {}
|
|
1389
1228
|
};
|
|
1390
1229
|
/**
|
|
1391
|
-
*
|
|
1392
|
-
* If multiple plugins are provided for the same scheme, only the
|
|
1393
|
-
* highest-priority one is used.
|
|
1394
|
-
* @enum {number}
|
|
1230
|
+
* @typedef {function(!Event)}
|
|
1395
1231
|
*/
|
|
1396
|
-
shaka.
|
|
1397
|
-
'FALLBACK': 1,
|
|
1398
|
-
'PREFERRED': 2,
|
|
1399
|
-
'APPLICATION': 3
|
|
1400
|
-
};
|
|
1232
|
+
shaka.util.EventManager.ListenerType;
|
|
1401
1233
|
/**
|
|
1402
1234
|
* @summary A set of FairPlay utility functions.
|
|
1403
1235
|
*/
|
|
@@ -1451,6 +1283,176 @@ shaka.media.ManifestParser = class {
|
|
|
1451
1283
|
*/
|
|
1452
1284
|
static unregisterParserByMime(mimeType) {}
|
|
1453
1285
|
};
|
|
1286
|
+
/**
|
|
1287
|
+
* @summary DataViewReader abstracts a DataView object.
|
|
1288
|
+
*/
|
|
1289
|
+
shaka.util.DataViewReader = class {
|
|
1290
|
+
/**
|
|
1291
|
+
* @param {BufferSource} data
|
|
1292
|
+
* @param {shaka.util.DataViewReader.Endianness} endianness The endianness.
|
|
1293
|
+
*/
|
|
1294
|
+
constructor(data, endianness) {}
|
|
1295
|
+
/**
|
|
1296
|
+
* @return {boolean} True if the reader has more data, false otherwise.
|
|
1297
|
+
*/
|
|
1298
|
+
hasMoreData() {}
|
|
1299
|
+
/**
|
|
1300
|
+
* Gets the current byte position.
|
|
1301
|
+
* @return {number}
|
|
1302
|
+
*/
|
|
1303
|
+
getPosition() {}
|
|
1304
|
+
/**
|
|
1305
|
+
* Gets the byte length of the DataView.
|
|
1306
|
+
* @return {number}
|
|
1307
|
+
*/
|
|
1308
|
+
getLength() {}
|
|
1309
|
+
/**
|
|
1310
|
+
* Reads an unsigned 8 bit integer, and advances the reader.
|
|
1311
|
+
* @return {number} The integer.
|
|
1312
|
+
*/
|
|
1313
|
+
readUint8() {}
|
|
1314
|
+
/**
|
|
1315
|
+
* Reads an unsigned 16 bit integer, and advances the reader.
|
|
1316
|
+
* @return {number} The integer.
|
|
1317
|
+
*/
|
|
1318
|
+
readUint16() {}
|
|
1319
|
+
/**
|
|
1320
|
+
* Reads an unsigned 32 bit integer, and advances the reader.
|
|
1321
|
+
* @return {number} The integer.
|
|
1322
|
+
*/
|
|
1323
|
+
readUint32() {}
|
|
1324
|
+
/**
|
|
1325
|
+
* Reads a signed 32 bit integer, and advances the reader.
|
|
1326
|
+
* @return {number} The integer.
|
|
1327
|
+
*/
|
|
1328
|
+
readInt32() {}
|
|
1329
|
+
/**
|
|
1330
|
+
* Reads an unsigned 64 bit integer, and advances the reader.
|
|
1331
|
+
* @return {number} The integer.
|
|
1332
|
+
*/
|
|
1333
|
+
readUint64() {}
|
|
1334
|
+
/**
|
|
1335
|
+
* Reads the specified number of raw bytes.
|
|
1336
|
+
* @param {number} bytes The number of bytes to read.
|
|
1337
|
+
* @return {!Uint8Array}
|
|
1338
|
+
*/
|
|
1339
|
+
readBytes(bytes) {}
|
|
1340
|
+
/**
|
|
1341
|
+
* Skips the specified number of bytes.
|
|
1342
|
+
* @param {number} bytes The number of bytes to skip.
|
|
1343
|
+
*/
|
|
1344
|
+
skip(bytes) {}
|
|
1345
|
+
/**
|
|
1346
|
+
* Rewinds the specified number of bytes.
|
|
1347
|
+
* @param {number} bytes The number of bytes to rewind.
|
|
1348
|
+
*/
|
|
1349
|
+
rewind(bytes) {}
|
|
1350
|
+
/**
|
|
1351
|
+
* Seeks to a specified position.
|
|
1352
|
+
* @param {number} position The desired byte position within the DataView.
|
|
1353
|
+
*/
|
|
1354
|
+
seek(position) {}
|
|
1355
|
+
/**
|
|
1356
|
+
* Keeps reading until it reaches a byte that equals to zero. The text is
|
|
1357
|
+
* assumed to be UTF-8.
|
|
1358
|
+
* @return {string}
|
|
1359
|
+
*/
|
|
1360
|
+
readTerminatedString() {}
|
|
1361
|
+
};
|
|
1362
|
+
/**
|
|
1363
|
+
* Endianness.
|
|
1364
|
+
* @enum {number}
|
|
1365
|
+
*/
|
|
1366
|
+
shaka.util.DataViewReader.Endianness = {
|
|
1367
|
+
'BIG_ENDIAN': 0,
|
|
1368
|
+
'LITTLE_ENDIAN': 1
|
|
1369
|
+
};
|
|
1370
|
+
/**
|
|
1371
|
+
*/
|
|
1372
|
+
shaka.util.Mp4Parser = class {
|
|
1373
|
+
/** */
|
|
1374
|
+
constructor() {}
|
|
1375
|
+
/**
|
|
1376
|
+
* Declare a box type as a Box.
|
|
1377
|
+
* @param {string} type
|
|
1378
|
+
* @param {!shaka.util.Mp4Parser.CallbackType} definition
|
|
1379
|
+
* @return {!shaka.util.Mp4Parser}
|
|
1380
|
+
*/
|
|
1381
|
+
box(type, definition) {}
|
|
1382
|
+
/**
|
|
1383
|
+
* Declare a box type as a Full Box.
|
|
1384
|
+
* @param {string} type
|
|
1385
|
+
* @param {!shaka.util.Mp4Parser.CallbackType} definition
|
|
1386
|
+
* @return {!shaka.util.Mp4Parser}
|
|
1387
|
+
*/
|
|
1388
|
+
fullBox(type, definition) {}
|
|
1389
|
+
/**
|
|
1390
|
+
* Stop parsing. Useful for extracting information from partial segments and
|
|
1391
|
+
* avoiding an out-of-bounds error once you find what you are looking for.
|
|
1392
|
+
*/
|
|
1393
|
+
stop() {}
|
|
1394
|
+
/**
|
|
1395
|
+
* Parse the given data using the added callbacks.
|
|
1396
|
+
* @param {!BufferSource} data
|
|
1397
|
+
* @param {boolean=} partialOkay If true, allow reading partial payloads
|
|
1398
|
+
* from some boxes. If the goal is a child box, we can sometimes find it
|
|
1399
|
+
* without enough data to find all child boxes.
|
|
1400
|
+
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
|
|
1401
|
+
* box is detected.
|
|
1402
|
+
*/
|
|
1403
|
+
parse(data, partialOkay, stopOnPartial) {}
|
|
1404
|
+
/**
|
|
1405
|
+
* Parse the next box on the current level.
|
|
1406
|
+
* @param {number} absStart The absolute start position in the original
|
|
1407
|
+
* byte array.
|
|
1408
|
+
* @param {!shaka.util.DataViewReader} reader
|
|
1409
|
+
* @param {boolean=} partialOkay If true, allow reading partial payloads
|
|
1410
|
+
* from some boxes. If the goal is a child box, we can sometimes find it
|
|
1411
|
+
* without enough data to find all child boxes.
|
|
1412
|
+
* @param {boolean=} stopOnPartial If true, stop reading if an incomplete
|
|
1413
|
+
* box is detected.
|
|
1414
|
+
*/
|
|
1415
|
+
parseNext(absStart, reader, partialOkay, stopOnPartial) {}
|
|
1416
|
+
/**
|
|
1417
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a series
|
|
1418
|
+
* of boxes. The number of boxes is limited by the size of the parent box.
|
|
1419
|
+
* @param {!shaka.extern.ParsedBox} box
|
|
1420
|
+
*/
|
|
1421
|
+
static children(box) {}
|
|
1422
|
+
/**
|
|
1423
|
+
* A callback that tells the Mp4 parser to treat the body of a box as a sample
|
|
1424
|
+
* description. A sample description box has a fixed number of children. The
|
|
1425
|
+
* number of children is represented by a 4 byte unsigned integer. Each child
|
|
1426
|
+
* is a box.
|
|
1427
|
+
* @param {!shaka.extern.ParsedBox} box
|
|
1428
|
+
*/
|
|
1429
|
+
static sampleDescription(box) {}
|
|
1430
|
+
/**
|
|
1431
|
+
* Create a callback that tells the Mp4 parser to treat the body of a box as a
|
|
1432
|
+
* binary blob and to parse the body's contents using the provided callback.
|
|
1433
|
+
* @param {function(!Uint8Array)} callback
|
|
1434
|
+
* @return {!shaka.util.Mp4Parser.CallbackType}
|
|
1435
|
+
*/
|
|
1436
|
+
static allData(callback) {}
|
|
1437
|
+
/**
|
|
1438
|
+
* Convert an integer type from a box into an ascii string name.
|
|
1439
|
+
* Useful for debugging.
|
|
1440
|
+
* @param {number} type The type of the box, a uint32.
|
|
1441
|
+
* @return {string}
|
|
1442
|
+
*/
|
|
1443
|
+
static typeToString(type) {}
|
|
1444
|
+
/**
|
|
1445
|
+
* Find the header size of the box.
|
|
1446
|
+
* Useful for modifying boxes in place or finding the exact offset of a field.
|
|
1447
|
+
* @param {shaka.extern.ParsedBox} box
|
|
1448
|
+
* @return {number}
|
|
1449
|
+
*/
|
|
1450
|
+
static headerSize(box) {}
|
|
1451
|
+
};
|
|
1452
|
+
/**
|
|
1453
|
+
* @typedef {function(!shaka.extern.ParsedBox)}
|
|
1454
|
+
*/
|
|
1455
|
+
shaka.util.Mp4Parser.CallbackType;
|
|
1454
1456
|
/**
|
|
1455
1457
|
* Creates an InitSegmentReference, which provides the location to an
|
|
1456
1458
|
* initialization segment.
|
|
@@ -1521,9 +1523,17 @@ shaka.media.SegmentReference = class {
|
|
|
1521
1523
|
* presentation. Any content from after this time will be removed by
|
|
1522
1524
|
* MediaSource.
|
|
1523
1525
|
* @param {!Array.<!shaka.media.SegmentReference>=} partialReferences
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1526
|
+
* A list of SegmentReferences for the partial segments.
|
|
1527
|
+
* @param {?string=} tilesLayout
|
|
1528
|
+
* The value is a grid-item-dimension consisting of two positive decimal
|
|
1529
|
+
* integers in the format: column-x-row ('4x3'). It describes the
|
|
1530
|
+
* arrangement of Images in a Grid. The minimum valid LAYOUT is '1x1'.
|
|
1531
|
+
* @param {?number=} tileDuration
|
|
1532
|
+
* The explicit duration of an individual tile within the tiles grid.
|
|
1533
|
+
* If not provided, the duration should be automatically calculated based on
|
|
1534
|
+
* the duration of the reference.
|
|
1535
|
+
*/
|
|
1536
|
+
constructor(startTime, endTime, uris, startByte, endByte, initSegmentReference, timestampOffset, appendWindowStart, appendWindowEnd, partialReferences, tilesLayout, tileDuration) {}
|
|
1527
1537
|
/**
|
|
1528
1538
|
* Creates and returns the URIs of the resource containing the segment.
|
|
1529
1539
|
* @return {!Array.<string>}
|
|
@@ -1552,6 +1562,17 @@ shaka.media.SegmentReference = class {
|
|
|
1552
1562
|
* @return {?number}
|
|
1553
1563
|
*/
|
|
1554
1564
|
getEndByte() {}
|
|
1565
|
+
/**
|
|
1566
|
+
* Returns the segment's tiles layout. Only defined in image segments.
|
|
1567
|
+
* @return {?string}
|
|
1568
|
+
*/
|
|
1569
|
+
getTilesLayout() {}
|
|
1570
|
+
/**
|
|
1571
|
+
* Returns the segment's explicit tile duration.
|
|
1572
|
+
* Only defined in image segments.
|
|
1573
|
+
* @return {?number}
|
|
1574
|
+
*/
|
|
1575
|
+
getTileDuration() {}
|
|
1555
1576
|
};
|
|
1556
1577
|
/**
|
|
1557
1578
|
* PresentationTimeline.
|
|
@@ -2173,6 +2194,11 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2173
2194
|
* @return {shaka.extern.PlayerConfiguration}
|
|
2174
2195
|
*/
|
|
2175
2196
|
getConfiguration() {}
|
|
2197
|
+
/**
|
|
2198
|
+
* Returns the ratio of video length buffered compared to buffering Goal
|
|
2199
|
+
* @return {number}
|
|
2200
|
+
*/
|
|
2201
|
+
getBufferFullness() {}
|
|
2176
2202
|
/**
|
|
2177
2203
|
* Reset configuration to default.
|
|
2178
2204
|
*/
|
|
@@ -2235,6 +2261,10 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2235
2261
|
* @return {{start: number, end: number}}
|
|
2236
2262
|
*/
|
|
2237
2263
|
seekRange() {}
|
|
2264
|
+
/**
|
|
2265
|
+
* Go to live in a live stream.
|
|
2266
|
+
*/
|
|
2267
|
+
goToLive() {}
|
|
2238
2268
|
/**
|
|
2239
2269
|
* Get the key system currently used by EME. If EME is not being used, this
|
|
2240
2270
|
* will return an empty string. If the player has not loaded content, this
|
|
@@ -2416,6 +2446,17 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2416
2446
|
* @return {boolean}
|
|
2417
2447
|
*/
|
|
2418
2448
|
isTextTrackVisible() {}
|
|
2449
|
+
/**
|
|
2450
|
+
* Return a list of chapters tracks.
|
|
2451
|
+
* @return {!Array.<shaka.extern.Track>}
|
|
2452
|
+
*/
|
|
2453
|
+
getChaptersTracks() {}
|
|
2454
|
+
/**
|
|
2455
|
+
* This returns the list of chapters.
|
|
2456
|
+
* @param {string} language
|
|
2457
|
+
* @return {!Array.<shaka.extern.Chapter>}
|
|
2458
|
+
*/
|
|
2459
|
+
getChapters(language) {}
|
|
2419
2460
|
/**
|
|
2420
2461
|
* Enable or disable the text displayer. If the player is in an unloaded
|
|
2421
2462
|
* state, the request will be applied next time content is loaded.
|
|
@@ -2479,6 +2520,16 @@ shaka.Player = class extends shaka.util.FakeEventTarget {
|
|
|
2479
2520
|
* @return {!Promise.<shaka.extern.Track>}
|
|
2480
2521
|
*/
|
|
2481
2522
|
addTextTrackAsync(uri, language, kind, mimeType, codec, label, forced) {}
|
|
2523
|
+
/**
|
|
2524
|
+
* Adds the given chapters track to the loaded manifest. <code>load()</code>
|
|
2525
|
+
* must resolve before calling. The presentation must have a duration.
|
|
2526
|
+
* This returns the created track.
|
|
2527
|
+
* @param {string} uri
|
|
2528
|
+
* @param {string} language
|
|
2529
|
+
* @param {string=} mimeType
|
|
2530
|
+
* @return {!Promise.<shaka.extern.Track>}
|
|
2531
|
+
*/
|
|
2532
|
+
addChaptersTrack(uri, language, mimeType) {}
|
|
2482
2533
|
/**
|
|
2483
2534
|
* Set the maximum resolution that the platform's hardware can handle.
|
|
2484
2535
|
* This will be called automatically by <code>shaka.cast.CastReceiver</code>
|
|
@@ -2751,6 +2802,11 @@ shaka.ads.AdManager = class extends shaka.util.FakeEventTarget {
|
|
|
2751
2802
|
* @override
|
|
2752
2803
|
*/
|
|
2753
2804
|
replaceServerSideAdTagParameters(adTagParameters) {}
|
|
2805
|
+
/**
|
|
2806
|
+
* @return {!Array.<!shaka.extern.AdCuePoint>}
|
|
2807
|
+
* @override
|
|
2808
|
+
*/
|
|
2809
|
+
getServerSideCuePoints() {}
|
|
2754
2810
|
/**
|
|
2755
2811
|
* @return {shaka.extern.AdsStats}
|
|
2756
2812
|
* @override
|
|
@@ -3366,6 +3422,20 @@ shaka.polyfill = class {
|
|
|
3366
3422
|
*/
|
|
3367
3423
|
static register(polyfill, priority) {}
|
|
3368
3424
|
};
|
|
3425
|
+
/**
|
|
3426
|
+
* @summary A polyfill to add support for the ARIAMixin interface mixin, for
|
|
3427
|
+
* browsers that do not implement it (e.g. Firefox).
|
|
3428
|
+
* Note that IE also does not support ARIAMixin, but this polyfill does not work
|
|
3429
|
+
* for that platform, as it relies on getters and setters.
|
|
3430
|
+
* @see https://w3c.github.io/aria/#ARIAMixin
|
|
3431
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element
|
|
3432
|
+
*/
|
|
3433
|
+
shaka.polyfill.Aria = class {
|
|
3434
|
+
/**
|
|
3435
|
+
* Install the polyfill if needed.
|
|
3436
|
+
*/
|
|
3437
|
+
static install() {}
|
|
3438
|
+
};
|
|
3369
3439
|
/**
|
|
3370
3440
|
* @summary A polyfill to add support for EncryptionScheme queries in EME.
|
|
3371
3441
|
* @see https://wicg.github.io/encrypted-media-encryption-scheme/
|
|
@@ -3634,8 +3704,8 @@ shaka.text.SrtTextParser = class {
|
|
|
3634
3704
|
parseMedia(data, time) {}
|
|
3635
3705
|
/**
|
|
3636
3706
|
* Convert a SRT format to WebVTT
|
|
3637
|
-
* @param {
|
|
3638
|
-
* @return {
|
|
3707
|
+
* @param {string} data
|
|
3708
|
+
* @return {string}
|
|
3639
3709
|
*/
|
|
3640
3710
|
static srt2webvtt(data) {}
|
|
3641
3711
|
};
|