google-closure-compiler 20250412.0.0-nightly → 20250413.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (131) hide show
  1. package/README.md +5 -30
  2. package/cli.js +3 -4
  3. package/externs/browser/decorators.js +276 -0
  4. package/externs/browser/deprecated.js +58 -0
  5. package/externs/browser/es6_proxy.js +143 -0
  6. package/externs/browser/fetchapi.js +449 -0
  7. package/externs/browser/fido.js +94 -0
  8. package/externs/browser/flash.js +226 -0
  9. package/externs/browser/gecko_css.js +126 -0
  10. package/externs/browser/gecko_dom.js +479 -0
  11. package/externs/browser/gecko_event.js +86 -0
  12. package/externs/browser/gecko_xml.js +73 -0
  13. package/externs/browser/google_legacy.js +31 -0
  14. package/externs/browser/html5.js +6647 -0
  15. package/externs/browser/ie_css.js +270 -0
  16. package/externs/browser/ie_dom.js +1232 -0
  17. package/externs/browser/ie_event.js +310 -0
  18. package/externs/browser/ie_vml.js +77 -0
  19. package/externs/browser/intersection_observer.js +178 -0
  20. package/externs/browser/intl.js +602 -0
  21. package/externs/browser/iphone.js +204 -0
  22. package/externs/browser/mediakeys.js +305 -0
  23. package/externs/browser/mediasource.js +155 -0
  24. package/externs/browser/nonstandard_anim_timing.js +97 -0
  25. package/externs/browser/nonstandard_audio.js +82 -0
  26. package/externs/browser/nonstandard_console.js +75 -0
  27. package/externs/browser/nonstandard_fileapi.js +1066 -0
  28. package/externs/browser/nonstandard_indexeddb.js +78 -0
  29. package/externs/browser/nonstandard_navigation_timing.js +38 -0
  30. package/externs/browser/nonstandard_selection.js +80 -0
  31. package/externs/browser/page_visibility.js +28 -0
  32. package/externs/browser/streamsapi.js +593 -0
  33. package/externs/browser/svg.js +10016 -0
  34. package/externs/browser/url.js +202 -0
  35. package/externs/browser/v8.js +134 -0
  36. package/externs/browser/w3c_abort.js +89 -0
  37. package/externs/browser/w3c_anim_timing.js +49 -0
  38. package/externs/browser/w3c_aria_mixin.js +286 -0
  39. package/externs/browser/w3c_audio.js +1660 -0
  40. package/externs/browser/w3c_batterystatus.js +85 -0
  41. package/externs/browser/w3c_clipboard.js +74 -0
  42. package/externs/browser/w3c_clipboardevent.js +47 -0
  43. package/externs/browser/w3c_composition_event.js +93 -0
  44. package/externs/browser/w3c_css.js +3790 -0
  45. package/externs/browser/w3c_css3d.js +199 -0
  46. package/externs/browser/w3c_device_sensor_event.js +122 -0
  47. package/externs/browser/w3c_dom1.js +1160 -0
  48. package/externs/browser/w3c_dom2.js +3151 -0
  49. package/externs/browser/w3c_dom3.js +555 -0
  50. package/externs/browser/w3c_dom4.js +289 -0
  51. package/externs/browser/w3c_elementtraversal.js +116 -0
  52. package/externs/browser/w3c_event.js +607 -0
  53. package/externs/browser/w3c_event3.js +77 -0
  54. package/externs/browser/w3c_eventsource.js +110 -0
  55. package/externs/browser/w3c_fileapi.js +302 -0
  56. package/externs/browser/w3c_gamepad.js +113 -0
  57. package/externs/browser/w3c_geolocation.js +130 -0
  58. package/externs/browser/w3c_geometry1.js +899 -0
  59. package/externs/browser/w3c_indexeddb.js +771 -0
  60. package/externs/browser/w3c_keyboardlock.js +47 -0
  61. package/externs/browser/w3c_mediacapabilities.js +206 -0
  62. package/externs/browser/w3c_midi.js +301 -0
  63. package/externs/browser/w3c_navigation.js +72 -0
  64. package/externs/browser/w3c_navigation_timing.js +437 -0
  65. package/externs/browser/w3c_netinfo.js +85 -0
  66. package/externs/browser/w3c_payment_request.js +401 -0
  67. package/externs/browser/w3c_permissions.js +112 -0
  68. package/externs/browser/w3c_permissions_policy.js +78 -0
  69. package/externs/browser/w3c_pointer_events.js +163 -0
  70. package/externs/browser/w3c_pointerlock.js +63 -0
  71. package/externs/browser/w3c_range.js +284 -0
  72. package/externs/browser/w3c_referrer_policy.js +36 -0
  73. package/externs/browser/w3c_requestidlecallback.js +76 -0
  74. package/externs/browser/w3c_rtc.js +3882 -0
  75. package/externs/browser/w3c_screen_orientation.js +53 -0
  76. package/externs/browser/w3c_screen_wake_lock.js +58 -0
  77. package/externs/browser/w3c_selection.js +209 -0
  78. package/externs/browser/w3c_selectors.js +113 -0
  79. package/externs/browser/w3c_serviceworker.js +739 -0
  80. package/externs/browser/w3c_speech.js +426 -0
  81. package/externs/browser/w3c_touch_event.js +296 -0
  82. package/externs/browser/w3c_trusted_types.js +142 -0
  83. package/externs/browser/w3c_vibration.js +38 -0
  84. package/externs/browser/w3c_webcodecs.js +1473 -0
  85. package/externs/browser/w3c_webcrypto.js +839 -0
  86. package/externs/browser/w3c_worklets.js +54 -0
  87. package/externs/browser/w3c_xml.js +533 -0
  88. package/externs/browser/web_animations.js +452 -0
  89. package/externs/browser/web_app_manifest.js +50 -0
  90. package/externs/browser/webassembly.js +223 -0
  91. package/externs/browser/webgl.js +3409 -0
  92. package/externs/browser/webgl2.js +2727 -0
  93. package/externs/browser/webgl2_compute.js +1609 -0
  94. package/externs/browser/webkit_css.js +456 -0
  95. package/externs/browser/webkit_dom.js +118 -0
  96. package/externs/browser/webkit_event.js +46 -0
  97. package/externs/browser/webkit_notifications.js +258 -0
  98. package/externs/browser/webkit_usercontent.js +55 -0
  99. package/externs/browser/weblocksapi.js +125 -0
  100. package/externs/browser/webstorage.js +171 -0
  101. package/externs/browser/whatwg_bitmap_context.js +37 -0
  102. package/externs/browser/whatwg_console.js +152 -0
  103. package/externs/browser/whatwg_encoding.js +99 -0
  104. package/externs/browser/whatwg_file_system.js +296 -0
  105. package/externs/browser/wicg_attribution_reporting.js +42 -0
  106. package/externs/browser/wicg_compression_stream.js +60 -0
  107. package/externs/browser/wicg_constructable_stylesheets.js +60 -0
  108. package/externs/browser/wicg_entries.js +169 -0
  109. package/externs/browser/wicg_file_handling.js +41 -0
  110. package/externs/browser/wicg_file_system_access.js +191 -0
  111. package/externs/browser/wicg_floc.js +41 -0
  112. package/externs/browser/wicg_ink.js +89 -0
  113. package/externs/browser/wicg_resizeobserver.js +100 -0
  114. package/externs/browser/wicg_scheduler.js +62 -0
  115. package/externs/browser/wicg_trust_token.js +89 -0
  116. package/externs/browser/wicg_uach.js +100 -0
  117. package/externs/browser/window.js +190 -0
  118. package/externs/es3.js +2716 -0
  119. package/externs/es5.js +284 -0
  120. package/externs/es6.js +2554 -0
  121. package/externs/es6_collections.js +323 -0
  122. package/index.js +13 -16
  123. package/lib/grunt/index.js +71 -92
  124. package/lib/grunt/vinyl-stream.js +12 -18
  125. package/lib/gulp/concat-to-json.js +30 -18
  126. package/lib/gulp/index.js +174 -181
  127. package/lib/gulp/json-to-vinyl.js +8 -8
  128. package/lib/node/{closure-compiler.js → index.js} +27 -51
  129. package/lib/utils.js +16 -14
  130. package/package.json +19 -16
  131. package/lib/logger.js +0 -89
@@ -0,0 +1,1473 @@
1
+ /*
2
+ * Copyright 2022 The Closure Compiler Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ /**
18
+ * @fileoverview Definitions for W3C's Web Codecs API.
19
+ * @see https://www.w3.org/TR/webcodecs/
20
+ * @externs
21
+ */
22
+
23
+
24
+ /**
25
+ * @constructor
26
+ * @param {!VideoColorSpaceInit|undefined} init
27
+ * @see https://www.w3.org/TR/webcodecs/#videocolorspace
28
+ */
29
+ function VideoColorSpace(init) {}
30
+
31
+ /**
32
+ * @const {!VideoColorPrimaries|null}
33
+ */
34
+ VideoColorSpace.prototype.primaries;
35
+
36
+ /**
37
+ * @const {!VideoTransferCharacteristics|null}
38
+ */
39
+ VideoColorSpace.prototype.transfer;
40
+
41
+ /**
42
+ * @const {!VideoMatrixCoefficients|null}
43
+ */
44
+ VideoColorSpace.prototype.matrix;
45
+
46
+ /**
47
+ * @const {boolean|null}
48
+ */
49
+ VideoColorSpace.prototype.fullRange;
50
+
51
+ /**
52
+ * @override
53
+ * @return {!VideoColorSpaceInit}
54
+ */
55
+ VideoColorSpace.prototype.toJSON = function() {};
56
+
57
+ /**
58
+ * @interface
59
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videocolorspaceinit
60
+ */
61
+ function VideoColorSpaceInit() {}
62
+
63
+ /**
64
+ * @type {!VideoColorPrimaries|undefined}
65
+ */
66
+ VideoColorSpaceInit.prototype.primaries;
67
+
68
+ /**
69
+ * @type {!VideoTransferCharacteristics|undefined}
70
+ */
71
+ VideoColorSpaceInit.prototype.transfer;
72
+
73
+ /**
74
+ * @type {!VideoMatrixCoefficients|undefined}
75
+ */
76
+ VideoColorSpaceInit.prototype.matrix;
77
+
78
+ /**
79
+ * @type {boolean|undefined}
80
+ */
81
+ VideoColorSpaceInit.prototype.fullRange;
82
+
83
+
84
+ /**
85
+ * @typedef {string}
86
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-alphaoption
87
+ * Valid values are "keep" and "discard".
88
+ */
89
+ var AlphaOption;
90
+
91
+ /**
92
+ * @typedef {!Object}
93
+ * Currently an empty list.
94
+ * Note - using a non-standard name to avoid collision with
95
+ * requestVideoFramCallback's VideoFrameMetadata type.
96
+ * @see https://w3c.github.io/webcodecs/video_frame_metadata_registry.html
97
+ */
98
+ var WebCodecsVideoFrameMetadata;
99
+
100
+ /**
101
+ * @record
102
+ * @struct
103
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videoframeinit
104
+ */
105
+ var VideoFrameInit;
106
+
107
+ /** @type {!AlphaOption|undefined} */
108
+ VideoFrameInit.prototype.alpha;
109
+
110
+ /** @type {number|undefined} */
111
+ VideoFrameInit.prototype.displayHeight;
112
+
113
+ /** @type {number|undefined} */
114
+ VideoFrameInit.prototype.displayWidth;
115
+
116
+ /** @type {number|undefined} */
117
+ VideoFrameInit.prototype.duration;
118
+
119
+ /** @type {number|undefined} */
120
+ VideoFrameInit.prototype.timestamp;
121
+
122
+ /** @type {!DOMRectInit|undefined} */
123
+ VideoFrameInit.prototype.visibleRect;
124
+
125
+ /** @type {!WebCodecsVideoFrameMetadata|undefined} */
126
+ VideoFrameInit.prototype.metadata;
127
+
128
+ /**
129
+ * @record
130
+ * @struct
131
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-planelayout
132
+ */
133
+ var PlaneLayout;
134
+
135
+ /** @type {number} */
136
+ PlaneLayout.prototype.offset;
137
+
138
+ /** @type {number} */
139
+ PlaneLayout.prototype.stride;
140
+
141
+ /**
142
+ * @typedef {string}
143
+ * @see https://www.w3.org/TR/webcodecs/#pixel-format
144
+ */
145
+ var VideoPixelFormat;
146
+
147
+ /**
148
+ * @record
149
+ * @struct
150
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videoframeinit
151
+ */
152
+ var VideoFrameBufferInit;
153
+
154
+ /** @type {number} */
155
+ VideoFrameBufferInit.prototype.codedHeight;
156
+
157
+ /** @type {number} */
158
+ VideoFrameBufferInit.prototype.codedWidth;
159
+
160
+ /** @type {!VideoColorSpaceInit|undefined} */
161
+ VideoFrameBufferInit.prototype.colorSpace;
162
+
163
+ /** @type {number|undefined} */
164
+ VideoFrameBufferInit.prototype.displayHeight;
165
+
166
+ /** @type {number|undefined} */
167
+ VideoFrameBufferInit.prototype.displayWidth;
168
+
169
+ /** @type {number|undefined} */
170
+ VideoFrameBufferInit.prototype.duration;
171
+
172
+ /** @type {string} */
173
+ VideoFrameBufferInit.prototype.format;
174
+
175
+ /** @type {!Array<!PlaneLayout>|undefined} */
176
+ VideoFrameBufferInit.prototype.layout;
177
+
178
+ /** @type {number} */
179
+ VideoFrameBufferInit.prototype.timestamp;
180
+
181
+ /** @type {!DOMRectInit|undefined} */
182
+ VideoFrameBufferInit.prototype.visibleRect;
183
+
184
+ /**
185
+ * @param {!CanvasImageSource|!AllowSharedBufferSource} imageOrData
186
+ * @param {!VideoFrameInit|!VideoFrameBufferInit} init
187
+ * @constructor
188
+ * @see https://www.w3.org/TR/webcodecs/#videoframe-constructors
189
+ */
190
+ function VideoFrame(imageOrData, init) {}
191
+
192
+ /** @const {?VideoPixelFormat} */
193
+ VideoFrame.prototype.format;
194
+
195
+ /** @const {number} */
196
+ VideoFrame.prototype.codedWidth;
197
+
198
+ /** @const {number} */
199
+ VideoFrame.prototype.codedHeight;
200
+
201
+ /** @const {?DOMRectReadOnly} */
202
+ VideoFrame.prototype.codedRect;
203
+
204
+ /** @const {?DOMRectReadOnly} */
205
+ VideoFrame.prototype.visibleRect;
206
+
207
+ /** @const {number} */
208
+ VideoFrame.prototype.displayWidth;
209
+
210
+ /** @const {number} */
211
+ VideoFrame.prototype.displayHeight;
212
+
213
+ /** @const {?number} */
214
+ VideoFrame.prototype.duration;
215
+
216
+ /** @const {number} */
217
+ VideoFrame.prototype.timestamp;
218
+
219
+ /** @const {!VideoColorSpace} */
220
+ VideoFrame.prototype.colorSpace;
221
+
222
+ /**
223
+ * @param {!VideoFrameCopyToOptions=} options
224
+ * @return {number}
225
+ */
226
+ VideoFrame.prototype.allocationSize = function(options) {};
227
+
228
+ /** @return {!VideoFrame} */
229
+ VideoFrame.prototype.clone = function() {};
230
+
231
+ /** */
232
+ VideoFrame.prototype.close = function() {};
233
+
234
+ /**
235
+ * @param {!AllowSharedBufferSource} destination
236
+ * @param {!VideoFrameCopyToOptions=} options
237
+ * @return {!Promise<!Array<!PlaneLayout>>}
238
+ */
239
+ VideoFrame.prototype.copyTo = function(destination, options) {};
240
+
241
+ /** @return {!WebCodecsVideoFrameMetadata} */
242
+ VideoFrame.prototype.metadata = function() {};
243
+
244
+ /**
245
+ * @record
246
+ * @struct
247
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videoframecopytooptions
248
+ */
249
+ var VideoFrameCopyToOptions;
250
+
251
+ /** @type {!PredefinedColorSpace|undefined} */
252
+ VideoFrameCopyToOptions.prototype.colorSpace;
253
+
254
+ /** @type {!VideoPixelFormat|undefined} */
255
+ VideoFrameCopyToOptions.prototype.format;
256
+
257
+ /** @type {!Array<!PlaneLayout>|undefined} */
258
+ VideoFrameCopyToOptions.prototype.layout;
259
+
260
+ /** @type {!DOMRectInit|undefined} */
261
+ VideoFrameCopyToOptions.prototype.rect;
262
+
263
+ /**
264
+ * @param {!VideoFrameCopyToOptions=} options
265
+ * @return {number}
266
+ */
267
+ VideoFrame.prototype.allocationSize = function(options) {};
268
+
269
+ /**
270
+ * @param {!BufferSource} destination
271
+ * @param {!VideoFrameCopyToOptions=} options
272
+ * @return {!Promise<!Array<!PlaneLayout>>}
273
+ */
274
+ VideoFrame.prototype.copyTo = function(destination, options) {};
275
+
276
+ /**
277
+ * @return {!VideoFrame}
278
+ */
279
+ VideoFrame.prototype.clone = function() {};
280
+
281
+ VideoFrame.prototype.close = function() {};
282
+
283
+
284
+ /**
285
+ * @record
286
+ * @struct
287
+ * @see https://www.w3.org/TR/webcodecs-avc-codec-registration/#avc-encoder-config
288
+ */
289
+ function AvcEncoderConfig() {}
290
+
291
+ /** @type {!AvcBitstreamFormat|undefined} */
292
+ AvcEncoderConfig.prototype.format;
293
+
294
+ /**
295
+ * @record
296
+ * @struct
297
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-encodedvideochunkinit
298
+ */
299
+ function EncodedVideoChunkInit() {}
300
+
301
+ /** @type {!AllowSharedBufferSource} */
302
+ EncodedVideoChunkInit.prototype.data;
303
+
304
+ /** @type {number|undefined} */
305
+ EncodedVideoChunkInit.prototype.duration;
306
+
307
+ /** @type {number} */
308
+ EncodedVideoChunkInit.prototype.timestamp;
309
+
310
+ /** @type {string} */
311
+ EncodedVideoChunkInit.prototype.type;
312
+
313
+
314
+ /**
315
+ * @record
316
+ * @struct
317
+ * @see https://www.w3.org/TR/webcodecs/#callbackdef-encodedvideochunkoutputcallback
318
+ */
319
+ function EncodedVideoChunkOutputCallback() {}
320
+
321
+
322
+ /**
323
+ * @record
324
+ * @struct
325
+ * @see https://www.w3.org/TR/webcodecs/#encoded-video-chunk-metadata
326
+ */
327
+ function EncodedVideoChunkMetadata() {}
328
+
329
+ /** @type {!VideoDecoderConfig|undefined} */
330
+ EncodedVideoChunkMetadata.prototype.decoderConfig;
331
+
332
+ /** @type {number|undefined} */
333
+ EncodedVideoChunkMetadata.prototype.temporalLayerId;
334
+
335
+
336
+ /**
337
+ * @record
338
+ * @struct
339
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videodecoderconfig
340
+ */
341
+ function VideoDecoderConfig() {}
342
+
343
+ /** @type {string} */
344
+ VideoDecoderConfig.prototype.codec;
345
+
346
+ /** @type {number|undefined} */
347
+ VideoDecoderConfig.prototype.codedHeight;
348
+
349
+ /** @type {number|undefined} */
350
+ VideoDecoderConfig.prototype.codedWidth;
351
+
352
+ /** @type {!VideoColorSpaceInit|undefined} */
353
+ VideoDecoderConfig.prototype.colorSpace;
354
+
355
+ /** @type {!AllowSharedBufferSource|undefined} */
356
+ VideoDecoderConfig.prototype.description;
357
+
358
+ /** @type {number|undefined} */
359
+ VideoDecoderConfig.prototype.displayAspectHeight;
360
+
361
+ /** @type {number|undefined} */
362
+ VideoDecoderConfig.prototype.displayAspectWidth;
363
+
364
+ /** @type {!HardwareAcceleration|undefined} */
365
+ VideoDecoderConfig.prototype.hardwareAcceleration;
366
+
367
+ /** @type {boolean|undefined} */
368
+ VideoDecoderConfig.prototype.optimizeForLatency;
369
+
370
+
371
+ /**
372
+ * @record
373
+ * @struct
374
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videodecoderinit
375
+ */
376
+ function VideoDecoderInit() {}
377
+
378
+ /** @type {!WebCodecsErrorCallback} */
379
+ VideoDecoderInit.prototype.error;
380
+
381
+ /** @type {!VideoFrameOutputCallback} */
382
+ VideoDecoderInit.prototype.output;
383
+
384
+
385
+ /**
386
+ * @record
387
+ * @struct
388
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videodecodersupport
389
+ */
390
+ function VideoDecoderSupport() {}
391
+
392
+ /** @type {!VideoDecoderConfig|undefined} */
393
+ VideoDecoderSupport.prototype.config;
394
+
395
+ /** @type {boolean|undefined} */
396
+ VideoDecoderSupport.prototype.supported;
397
+
398
+ /**
399
+ * Available only in secure contexts.
400
+ * @param {!VideoDecoderInit} init
401
+ * @constructor
402
+ * @see https://www.w3.org/TR/webcodecs/#videodecoder-constructors
403
+ */
404
+ function VideoDecoder(init) {}
405
+
406
+ /**
407
+ * @param {!VideoDecoderConfig} config
408
+ * @return {!Promise<!VideoDecoderSupport>}
409
+ * @see https://www.w3.org/TR/webcodecs/#dom-videodecoder-isconfigsupported
410
+ */
411
+ VideoDecoder.isConfigSupported = function(config) {};
412
+
413
+ /** @const {number} */
414
+ VideoDecoder.prototype.decodeQueueSize;
415
+
416
+ /** @type {function(!Event)|undefined} */
417
+ VideoDecoder.prototype.ondequeue;
418
+
419
+ /** @const {!CodecState} */
420
+ VideoDecoder.prototype.state;
421
+
422
+ /** */
423
+ VideoDecoder.prototype.close = function() {};
424
+
425
+ /** @param {!VideoDecoderConfig} config */
426
+ VideoDecoder.prototype.configure = function(config) {};
427
+
428
+ /** @param {!EncodedVideoChunk} chunk */
429
+ VideoDecoder.prototype.decode = function(chunk) {};
430
+
431
+ /** @return {!Promise<undefined>} */
432
+ VideoDecoder.prototype.flush = function() {};
433
+
434
+ /** */
435
+ VideoDecoder.prototype.reset = function() {};
436
+
437
+ /**
438
+ * @record
439
+ * @struct
440
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videoencoderconfig
441
+ */
442
+ function VideoEncoderConfig() {}
443
+
444
+ /** @type {!AlphaOption|undefined} */
445
+ VideoEncoderConfig.prototype.alpha;
446
+
447
+ /** @type {!AvcEncoderConfig|undefined} */
448
+ VideoEncoderConfig.prototype.avc;
449
+
450
+ /** @type {number|undefined} */
451
+ VideoEncoderConfig.prototype.bitrate;
452
+
453
+ /** @type {!VideoEncoderBitrateMode|undefined} */
454
+ VideoEncoderConfig.prototype.bitrateMode;
455
+
456
+ /** @type {string} */
457
+ VideoEncoderConfig.prototype.codec;
458
+
459
+ /** @type {number|undefined} */
460
+ VideoEncoderConfig.prototype.displayHeight;
461
+
462
+ /** @type {number|undefined} */
463
+ VideoEncoderConfig.prototype.displayWidth;
464
+
465
+ /** @type {number|undefined} */
466
+ VideoEncoderConfig.prototype.framerate;
467
+
468
+ /** @type {!HardwareAcceleration|undefined} */
469
+ VideoEncoderConfig.prototype.hardwareAcceleration;
470
+
471
+ /** @type {number} */
472
+ VideoEncoderConfig.prototype.height;
473
+
474
+ /** @type {!LatencyMode|undefined} */
475
+ VideoEncoderConfig.prototype.latencyMode;
476
+
477
+ /** @type {string|undefined} */
478
+ VideoEncoderConfig.prototype.scalabilityMode;
479
+
480
+ /** @type {number} */
481
+ VideoEncoderConfig.prototype.width;
482
+
483
+
484
+ /**
485
+ * @record
486
+ * @struct
487
+ * @see https://www.w3.org/TR/webcodecs/#video-encoder-options
488
+ */
489
+ function VideoEncoderEncodeOptions() {}
490
+
491
+ /** @type {!VideoEncoderEncodeOptionsForAvc|undefined} */
492
+ VideoEncoderEncodeOptions.prototype.avc;
493
+
494
+ /** @type {boolean|null|undefined} */
495
+ VideoEncoderEncodeOptions.prototype.keyFrame;
496
+
497
+ /**
498
+ * @record
499
+ * @struct
500
+ */
501
+ function VideoEncoderEncodeOptionsForAvc() {}
502
+
503
+ /** @type {number|null|undefined} */
504
+ VideoEncoderEncodeOptionsForAvc.prototype.quantizer;
505
+
506
+ /**
507
+ * @record
508
+ * @struct
509
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-videoencoderinit
510
+ */
511
+ function VideoEncoderInit() {}
512
+
513
+ /** @type {!WebCodecsErrorCallback} */
514
+ VideoEncoderInit.prototype.error;
515
+
516
+ /** @type {!EncodedVideoChunkOutputCallback} */
517
+ VideoEncoderInit.prototype.output;
518
+
519
+
520
+ /**
521
+ * @record
522
+ * @struct
523
+ * @see https://www.w3.org/TR/webcodecs/#video-encoder-support
524
+ */
525
+ function VideoEncoderSupport() {}
526
+
527
+ /** @type {!VideoEncoderConfig|undefined} */
528
+ VideoEncoderSupport.prototype.config;
529
+
530
+ /** @type {boolean|undefined} */
531
+ VideoEncoderSupport.prototype.supported;
532
+
533
+ /**
534
+ * @record
535
+ * @struct
536
+ * @see https://www.w3.org/TR/webcodecs/#callbackdef-videoframeoutputcallback
537
+ */
538
+ function VideoFrameOutputCallback() {}
539
+
540
+ /**
541
+ * @record
542
+ * @struct
543
+ * @see https://www.w3.org/TR/webcodecs/#callbackdef-webcodecserrorcallback
544
+ */
545
+ function WebCodecsErrorCallback() {}
546
+
547
+
548
+ /**
549
+ * Available only in secure contexts.
550
+ * @param {!AudioEncoderInit} init
551
+ * @constructor
552
+ * @see https://www.w3.org/TR/webcodecs/#audioencoder-constructors
553
+ */
554
+ function AudioEncoder(init) {}
555
+
556
+ /**
557
+ * @const {!CodecState}
558
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-state
559
+ */
560
+ AudioEncoder.prototype.state;
561
+
562
+ /**
563
+ * @const {number}
564
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-encodequeuesize
565
+ */
566
+ AudioEncoder.prototype.encodeQueueSize;
567
+
568
+ /**
569
+ * @type {function(!Event)|undefined}
570
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-ondequeue
571
+ */
572
+ AudioEncoder.prototype.ondequeue;
573
+
574
+ /**
575
+ * @param {!AudioEncoderConfig} config
576
+ * @return {!Promise<!AudioEncoderSupport>}
577
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-isconfigsupported
578
+ */
579
+ AudioEncoder.isConfigSupported = function(config) {};
580
+
581
+ /**
582
+ * @param {!AudioEncoderConfig} config
583
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-configure
584
+ */
585
+ AudioEncoder.prototype.configure = function(config) {};
586
+
587
+ /**
588
+ * @param {!AudioData} data
589
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-encode
590
+ */
591
+ AudioEncoder.prototype.encode = function(data) {};
592
+
593
+ /**
594
+ * @return {!Promise<undefined>}
595
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-flush
596
+ */
597
+ AudioEncoder.prototype.flush = function() {};
598
+
599
+ /**
600
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-reset
601
+ */
602
+ AudioEncoder.prototype.reset = function() {};
603
+
604
+ /**
605
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoder-close
606
+ */
607
+ AudioEncoder.prototype.close = function() {};
608
+
609
+
610
+ /**
611
+ * @param {!EncodedAudioChunkInit} init
612
+ * @constructor
613
+ * @see https://www.w3.org/TR/webcodecs/#encodedaudiochunk-constructors
614
+ */
615
+ function EncodedAudioChunk(init) {}
616
+
617
+ /**
618
+ * @const {!EncodedAudioChunkType}
619
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunk-type
620
+ */
621
+ EncodedAudioChunk.prototype.type;
622
+
623
+ /**
624
+ * @const {number}
625
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunk-timestamp
626
+ */
627
+ EncodedAudioChunk.prototype.timestamp;
628
+
629
+ /**
630
+ * @const {number|null}
631
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunk-duration
632
+ */
633
+ EncodedAudioChunk.prototype.duration;
634
+
635
+ /**
636
+ * @const {number}
637
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunk-bytelength
638
+ */
639
+ EncodedAudioChunk.prototype.byteLength;
640
+
641
+ /**
642
+ * @param {!AllowSharedBufferSource} destination
643
+ */
644
+ EncodedAudioChunk.prototype.copyTo = function(destination) {};
645
+
646
+
647
+ /**
648
+ * @record
649
+ * @struct
650
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-encodedaudiochunkinit
651
+ */
652
+ function EncodedAudioChunkInit() {}
653
+
654
+ /**
655
+ * @type {!EncodedAudioChunkType}
656
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkinit-type
657
+ */
658
+ EncodedAudioChunkInit.prototype.type;
659
+
660
+ /**
661
+ * @type {number}
662
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkinit-timestamp
663
+ */
664
+ EncodedAudioChunkInit.prototype.timestamp;
665
+
666
+ /**
667
+ * @type {number|undefined}
668
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkinit-duration
669
+ */
670
+ EncodedAudioChunkInit.prototype.duration;
671
+
672
+ /**
673
+ * @type {!AllowSharedBufferSource}
674
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkinit-data
675
+ */
676
+ EncodedAudioChunkInit.prototype.data;
677
+
678
+ /**
679
+ * @type {!Array<!ArrayBuffer>|undefined}
680
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkinit-transfer
681
+ */
682
+ EncodedAudioChunkInit.prototype.transfer;
683
+
684
+ /**
685
+ * @record
686
+ * @struct
687
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-encodedaudiochunkmetadata
688
+ */
689
+ function EncodedAudioChunkMetadata() {}
690
+
691
+ /**
692
+ * @type {!AudioDecoderConfig|undefined}
693
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedaudiochunkmetadata-decoderconfig
694
+ */
695
+ EncodedAudioChunkMetadata.prototype.decoderConfig;
696
+
697
+
698
+ /**
699
+ * @record
700
+ * @struct
701
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audioencoderconfig
702
+ */
703
+ function AudioEncoderConfig() {}
704
+
705
+ /**
706
+ * @type {string}
707
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderconfig-codec
708
+ */
709
+ AudioEncoderConfig.prototype.codec;
710
+
711
+ /**
712
+ * @type {number|undefined}
713
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderconfig-samplerate
714
+ */
715
+ AudioEncoderConfig.prototype.sampleRate;
716
+
717
+ /**
718
+ * @type {number|undefined}
719
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderconfig-numberofchannels
720
+ */
721
+ AudioEncoderConfig.prototype.numberOfChannels;
722
+
723
+ /**
724
+ * @type {number|undefined}
725
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderconfig-bitrate
726
+ */
727
+ AudioEncoderConfig.prototype.bitrate;
728
+
729
+ /**
730
+ * @type {!BitrateMode|undefined}
731
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderconfig-bitratemode
732
+ */
733
+ AudioEncoderConfig.prototype.bitrateMode;
734
+
735
+ /** @type {!OpusEncoderConfig|undefined} */
736
+ AudioEncoderConfig.prototype.opus;
737
+
738
+ /**
739
+ * @record
740
+ * @struct
741
+ */
742
+ function OpusEncoderConfig() {}
743
+
744
+ /** @type {number|undefined} */
745
+ OpusEncoderConfig.prototype.complexity;
746
+
747
+ /** @type {!OpusBitstreamFormat|undefined} */
748
+ OpusEncoderConfig.prototype.format;
749
+
750
+ /** @type {number|undefined} */
751
+ OpusEncoderConfig.prototype.frameDuration;
752
+
753
+ /** @type {number|undefined} */
754
+ OpusEncoderConfig.prototype.packetlossperc;
755
+
756
+ /** @type {boolean|undefined} */
757
+ OpusEncoderConfig.prototype.usedtx;
758
+
759
+ /** @type {boolean|undefined} */
760
+ OpusEncoderConfig.prototype.useinbandfec;
761
+
762
+ /**
763
+ * @record
764
+ * @struct
765
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audiodecoderconfig
766
+ */
767
+ function AudioDecoderConfig() {}
768
+
769
+ /**
770
+ * @type {string}
771
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderconfig-codec
772
+ */
773
+ AudioDecoderConfig.prototype.codec;
774
+
775
+ /**
776
+ * @type {number}
777
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderconfig-samplerate
778
+ */
779
+ AudioDecoderConfig.prototype.sampleRate;
780
+
781
+ /**
782
+ * @type {number}
783
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderconfig-numberofchannels
784
+ */
785
+ AudioDecoderConfig.prototype.numberOfChannels;
786
+
787
+ /**
788
+ * @type {!BufferSource|undefined}
789
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderconfig-description
790
+ */
791
+ AudioDecoderConfig.prototype.description;
792
+
793
+ /**
794
+ * @record
795
+ * @struct
796
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audiodecoderinit
797
+ */
798
+ function AudioDecoderInit() {}
799
+
800
+ /**
801
+ * @type {!WebCodecsErrorCallback}
802
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderinit-error
803
+ */
804
+ AudioDecoderInit.prototype.error;
805
+
806
+ /**
807
+ * @type {!AudioDataOutputCallback}
808
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoderinit-output
809
+ */
810
+ AudioDecoderInit.prototype.output;
811
+
812
+ /**
813
+ * @record
814
+ * @struct
815
+ * @see https://www.w3.org/TR/webcodecs/#callbackdef-audiodataoutputcallback
816
+ */
817
+ function AudioDataOutputCallback() {}
818
+
819
+ /**
820
+ * @record
821
+ * @struct
822
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audiodecodersupport
823
+ */
824
+ function AudioDecoderSupport() {}
825
+
826
+ /**
827
+ * @type {!AudioDecoderConfig|undefined}
828
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecodersupport-config
829
+ */
830
+ AudioDecoderSupport.prototype.config;
831
+
832
+ /**
833
+ * @type {boolean|undefined}
834
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecodersupport-supported
835
+ */
836
+ AudioDecoderSupport.prototype.supported;
837
+
838
+ /**
839
+ * @record
840
+ * @struct
841
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audioencodersupport
842
+ */
843
+ function AudioEncoderSupport() {}
844
+
845
+ /**
846
+ * @type {boolean|undefined}
847
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencodersupport-supported
848
+ */
849
+ AudioEncoderSupport.prototype.supported;
850
+
851
+ /**
852
+ * @type {!AudioEncoderConfig|undefined}
853
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencodersupport-config
854
+ */
855
+ AudioEncoderSupport.prototype.config;
856
+
857
+
858
+ /**
859
+ * @record
860
+ * @struct
861
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audioencoderinit
862
+ */
863
+ function AudioEncoderInit() {}
864
+
865
+ /**
866
+ * @type {!EncodedAudioChunkOutputCallback}
867
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderinit-output
868
+ */
869
+ AudioEncoderInit.prototype.output;
870
+
871
+ /**
872
+ * @type {!WebCodecsErrorCallback}
873
+ * @see https://www.w3.org/TR/webcodecs/#dom-audioencoderinit-error
874
+ */
875
+ AudioEncoderInit.prototype.error;
876
+
877
+ /**
878
+ * @record
879
+ * @struct
880
+ * @see https://www.w3.org/TR/webcodecs/#callbackdef-encodedaudiochunkoutputcallback
881
+ */
882
+ function EncodedAudioChunkOutputCallback() {}
883
+
884
+
885
+ /**
886
+ * @param {!AudioDataInit} init
887
+ * @constructor
888
+ * @see https://www.w3.org/TR/webcodecs/#audiodata-constructors
889
+ */
890
+ function AudioData(init) {}
891
+
892
+ /**
893
+ * @const {?AudioSampleFormat}
894
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-format
895
+ */
896
+ AudioData.prototype.format;
897
+
898
+ /**
899
+ * @const {number}
900
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-samplerate
901
+ */
902
+ AudioData.prototype.sampleRate;
903
+
904
+ /**
905
+ * @const {number}
906
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-numberofframes
907
+ */
908
+ AudioData.prototype.numberOfFrames;
909
+
910
+ /**
911
+ * @const {number}
912
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-numberofchannels
913
+ */
914
+ AudioData.prototype.numberOfChannels;
915
+
916
+ /**
917
+ * @const {number}
918
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-duration
919
+ */
920
+ AudioData.prototype.duration;
921
+
922
+ /**
923
+ * @const {number}
924
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-timestamp
925
+ */
926
+ AudioData.prototype.timestamp;
927
+
928
+ /**
929
+ * @param {!AudioDataCopyToOptions} options
930
+ * @return {number}
931
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-allocationsize
932
+ */
933
+ AudioData.prototype.allocationSize = function(options) {};
934
+
935
+ /**
936
+ * @param {!AllowSharedBufferSource} destination
937
+ * @param {!AudioDataCopyToOptions} options
938
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-copyto
939
+ */
940
+ AudioData.prototype.copyTo = function(destination, options) {};
941
+
942
+ /**
943
+ * @return {!AudioData}
944
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-clone
945
+ */
946
+ AudioData.prototype.clone = function() {};
947
+
948
+ /**
949
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodata-close
950
+ */
951
+ AudioData.prototype.close = function() {};
952
+
953
+
954
+ /**
955
+ * @record
956
+ * @struct
957
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audiodatainit
958
+ */
959
+ function AudioDataInit() {}
960
+
961
+ /**
962
+ * @type {!AudioSampleFormat}
963
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-format
964
+ */
965
+ AudioDataInit.prototype.format;
966
+
967
+ /**
968
+ * @type {number}
969
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-samplerate
970
+ */
971
+ AudioDataInit.prototype.sampleRate;
972
+
973
+ /**
974
+ * @type {number}
975
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-numberofframes
976
+ */
977
+ AudioDataInit.prototype.numberOfFrames;
978
+
979
+ /**
980
+ * @type {number}
981
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-numberofchannels
982
+ */
983
+ AudioDataInit.prototype.numberOfChannels;
984
+
985
+ /**
986
+ * @type {number}
987
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-timestamp
988
+ */
989
+ AudioDataInit.prototype.timestamp;
990
+
991
+ /**
992
+ * @type {!BufferSource}
993
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-data
994
+ */
995
+ AudioDataInit.prototype.data;
996
+
997
+ /**
998
+ * @type {!Array<!ArrayBuffer>|undefined}
999
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatainit-transfer
1000
+ */
1001
+ AudioDataInit.prototype.transfer;
1002
+
1003
+ /**
1004
+ * @record
1005
+ * @struct
1006
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-audiodatacopytooptions
1007
+ */
1008
+ function AudioDataCopyToOptions() {}
1009
+
1010
+ /**
1011
+ * @type {number}
1012
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatacopytooptions-planeindex
1013
+ */
1014
+ AudioDataCopyToOptions.prototype.planeIndex;
1015
+
1016
+ /**
1017
+ * @type {number|undefined}
1018
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatacopytooptions-frameoffset
1019
+ */
1020
+ AudioDataCopyToOptions.prototype.frameOffset;
1021
+
1022
+ /**
1023
+ * @type {number|undefined}
1024
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatacopytooptions-framecount
1025
+ */
1026
+ AudioDataCopyToOptions.prototype.frameCount;
1027
+
1028
+ /**
1029
+ * @type {!AudioSampleFormat|undefined}
1030
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodatacopytooptions-format
1031
+ */
1032
+ AudioDataCopyToOptions.prototype.format;
1033
+
1034
+ /**
1035
+ * Available only in secure contexts.
1036
+ * @param {!AudioDecoderInit} init
1037
+ * @constructor
1038
+ * @see https://www.w3.org/TR/webcodecs/#audiodecoder-interface
1039
+ */
1040
+ function AudioDecoder(init) {}
1041
+
1042
+ /** @const {number} */
1043
+ AudioDecoder.prototype.decodeQueueSize;
1044
+
1045
+ /** @type {function(!Event)|undefined} */
1046
+ AudioDecoder.prototype.ondequeue;
1047
+
1048
+ /** @const {!CodecState} */
1049
+ AudioDecoder.prototype.state;
1050
+
1051
+ /** */
1052
+ AudioDecoder.prototype.close = function() {};
1053
+
1054
+ /**
1055
+ * @param {!AudioDecoderConfig} config
1056
+ */
1057
+ AudioDecoder.prototype.configure = function(config) {};
1058
+
1059
+ /**
1060
+ * @param {!EncodedAudioChunk} chunk
1061
+ */
1062
+ AudioDecoder.prototype.decode = function(chunk) {};
1063
+
1064
+ /**
1065
+ * @return {!Promise<undefined>}
1066
+ */
1067
+ AudioDecoder.prototype.flush = function() {};
1068
+
1069
+ /** */
1070
+ AudioDecoder.prototype.reset = function() {};
1071
+
1072
+ /**
1073
+ * @param {!AudioDecoderConfig} config
1074
+ * @return {!Promise<!AudioDecoderSupport>}
1075
+ * @see https://www.w3.org/TR/webcodecs/#dom-audiodecoder-isconfigsupported
1076
+ */
1077
+ AudioDecoder.isConfigSupported = function(config) {};
1078
+
1079
+ /**
1080
+ * @typedef {string}
1081
+ */
1082
+ var AvcBitstreamFormat;
1083
+
1084
+ /**
1085
+ * @typedef {string}
1086
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-videoencoderbitratemode
1087
+ */
1088
+ var VideoEncoderBitrateMode;
1089
+
1090
+ /**
1091
+ * @typedef {string}
1092
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-codecstate
1093
+ */
1094
+ var CodecState;
1095
+
1096
+ /**
1097
+ * @typedef {string}
1098
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-audiosampleformat
1099
+ */
1100
+ var AudioSampleFormat;
1101
+
1102
+ /**
1103
+ * @typedef {string}
1104
+ * @see https://www.w3.org/TR/mediastream-recording/#enumdef-bitratemode
1105
+ */
1106
+ var BitrateMode;
1107
+
1108
+ /**
1109
+ * @typedef {string}
1110
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-encodedaudiochunktype
1111
+ */
1112
+ var EncodedAudioChunkType;
1113
+
1114
+ /**
1115
+ * @typedef {string}
1116
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-encodedvideochunktype
1117
+ */
1118
+ var EncodedVideoChunkType;
1119
+
1120
+ /**
1121
+ * @typedef {string}
1122
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-hardwareacceleration
1123
+ */
1124
+ var HardwareAcceleration;
1125
+
1126
+ /**
1127
+ * @typedef {string}
1128
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-latencymode
1129
+ */
1130
+ var LatencyMode;
1131
+
1132
+ /**
1133
+ * @typedef {string}
1134
+ * @see https://html.spec.whatwg.org/multipage/canvas.html#predefinedcolorspace
1135
+ */
1136
+ var PredefinedColorSpace;
1137
+
1138
+ /**
1139
+ * @typedef {string}
1140
+ * @see https://html.spec.whatwg.org/multipage/imagebitmap-and-animations.html#colorspaceconversion
1141
+ */
1142
+ var ColorSpaceConversion;
1143
+
1144
+ /**
1145
+ * @typedef {string}
1146
+ */
1147
+ var OpusBitstreamFormat;
1148
+
1149
+ /**
1150
+ * @typedef {string}
1151
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-videomatrixcoefficients
1152
+ */
1153
+ var VideoMatrixCoefficients;
1154
+
1155
+ /**
1156
+ * @typedef {string}
1157
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-videocolorprimaries
1158
+ */
1159
+ var VideoColorPrimaries;
1160
+
1161
+ /**
1162
+ * @typedef {string}
1163
+ * @see https://www.w3.org/TR/webcodecs/#enumdef-videotransfercharacteristics
1164
+ */
1165
+ var VideoTransferCharacteristics;
1166
+
1167
+ /**
1168
+ * @typedef {ArrayBuffer|ArrayBufferView|ReadableStream}
1169
+ * @see https://www.w3.org/TR/webcodecs/#typedefdef-imagebuffersource
1170
+ */
1171
+ var ImageBufferSource;
1172
+
1173
+ /**
1174
+ * Available only in secure contexts.
1175
+ * @param {!VideoEncoderInit} init
1176
+ * @constructor
1177
+ * @see https://www.w3.org/TR/webcodecs/#videoencoder-constructors
1178
+ */
1179
+ function VideoEncoder(init) {}
1180
+
1181
+ /**
1182
+ * @const {!CodecState}
1183
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-state
1184
+ */
1185
+ VideoEncoder.prototype.state;
1186
+
1187
+ /**
1188
+ * @const {number}
1189
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-encodequeuesize
1190
+ */
1191
+ VideoEncoder.prototype.encodeQueueSize;
1192
+
1193
+ /**
1194
+ * @type {function(!Event)|undefined}
1195
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-ondequeue
1196
+ */
1197
+ VideoEncoder.prototype.ondequeue;
1198
+
1199
+ /**
1200
+ * @param {!VideoEncoderConfig} config
1201
+ * @return {!Promise<!VideoEncoderSupport>}
1202
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-isconfigsupported
1203
+ */
1204
+ VideoEncoder.isConfigSupported = function(config) {};
1205
+
1206
+ /**
1207
+ * @param {!VideoEncoderConfig} config
1208
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-configure
1209
+ */
1210
+ VideoEncoder.prototype.configure = function(config) {};
1211
+
1212
+ /**
1213
+ * @param {!VideoFrame} frame
1214
+ * @param {!VideoEncoderEncodeOptions|undefined} options
1215
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-encode
1216
+ */
1217
+ VideoEncoder.prototype.encode = function(frame, options) {};
1218
+
1219
+ /**
1220
+ * @return {!Promise<undefined>}
1221
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-flush
1222
+ */
1223
+ VideoEncoder.prototype.flush = function() {};
1224
+
1225
+ /**
1226
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-reset
1227
+ */
1228
+ VideoEncoder.prototype.reset = function() {};
1229
+
1230
+ /**
1231
+ * @see https://www.w3.org/TR/webcodecs/#dom-videoencoder-close
1232
+ */
1233
+ VideoEncoder.prototype.close = function() {};
1234
+
1235
+
1236
+ /**
1237
+ * @param {!EncodedVideoChunkInit} init
1238
+ * @constructor
1239
+ * @see https://www.w3.org/TR/webcodecs/#encodedvideochunk-constructors
1240
+ */
1241
+ function EncodedVideoChunk(init) {}
1242
+
1243
+ /**
1244
+ * @const {!EncodedVideoChunkType}
1245
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedvideochunk-type
1246
+ */
1247
+ EncodedVideoChunk.prototype.type;
1248
+
1249
+ /**
1250
+ * @const {number}
1251
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedvideochunk-timestamp
1252
+ */
1253
+ EncodedVideoChunk.prototype.timestamp;
1254
+
1255
+ /**
1256
+ * @const {number|null}
1257
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedvideochunk-duration
1258
+ */
1259
+ EncodedVideoChunk.prototype.duration;
1260
+
1261
+ /**
1262
+ * @const {number}
1263
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedvideochunk-bytelength
1264
+ */
1265
+ EncodedVideoChunk.prototype.byteLength;
1266
+
1267
+ /**
1268
+ * @param {!AllowSharedBufferSource} destination
1269
+ * @see https://www.w3.org/TR/webcodecs/#dom-encodedvideochunk-copyto
1270
+ */
1271
+ EncodedVideoChunk.prototype.copyTo = function(destination) {};
1272
+
1273
+ /**
1274
+ * @record
1275
+ * @struct
1276
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-imagedecodeoptions
1277
+ */
1278
+ function ImageDecodeOptions() {}
1279
+
1280
+ /**
1281
+ * @type {boolean|undefined}
1282
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecodeoptions-completeframesonly
1283
+ */
1284
+ ImageDecodeOptions.prototype.completeFramesOnly;
1285
+
1286
+ /**
1287
+ * @type {number|undefined}
1288
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecodeoptions-frameindex
1289
+ */
1290
+ ImageDecodeOptions.prototype.frameIndex;
1291
+
1292
+ /**
1293
+ * @record
1294
+ * @struct
1295
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-imagedecoderesult
1296
+ */
1297
+ function ImageDecodeResult() {}
1298
+
1299
+ /**
1300
+ * @type {boolean}
1301
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderesult-complete
1302
+ */
1303
+ ImageDecodeResult.prototype.complete;
1304
+
1305
+ /**
1306
+ * @type {!VideoFrame}
1307
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderesult-image
1308
+ */
1309
+ ImageDecodeResult.prototype.image;
1310
+
1311
+ /**
1312
+ * @record
1313
+ * @struct
1314
+ * @see https://www.w3.org/TR/webcodecs/#dictdef-imagedecoderinit
1315
+ */
1316
+ function ImageDecoderInit() {}
1317
+
1318
+ /**
1319
+ * @type {string}
1320
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-type
1321
+ */
1322
+ ImageDecoderInit.prototype.type;
1323
+
1324
+ /**
1325
+ * @type {!ImageBufferSource}
1326
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-data
1327
+ */
1328
+ ImageDecoderInit.prototype.data;
1329
+
1330
+ /**
1331
+ * @type {!ColorSpaceConversion|undefined}
1332
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-colorspaceconversion
1333
+ */
1334
+ ImageDecoderInit.prototype.colorSpaceConversion;
1335
+
1336
+ /**
1337
+ * @type {number|undefined}
1338
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-desiredwidth
1339
+ */
1340
+ ImageDecoderInit.prototype.desiredWidth;
1341
+
1342
+ /**
1343
+ * @type {number|undefined}
1344
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-desiredheight
1345
+ */
1346
+ ImageDecoderInit.prototype.desiredHeight;
1347
+
1348
+ /**
1349
+ * @type {boolean|undefined}
1350
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-preferanimation
1351
+ */
1352
+ ImageDecoderInit.prototype.preferAnimation;
1353
+
1354
+ /**
1355
+ * @type {!Array<!ArrayBuffer>|undefined}
1356
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoderinit-transfer
1357
+ */
1358
+ ImageDecoderInit.prototype.transfer;
1359
+
1360
+ /**
1361
+ * @constructor
1362
+ * @param {!ImageDecoderInit} init
1363
+ * @see https://www.w3.org/TR/webcodecs/#imagedecoder
1364
+ */
1365
+ function ImageDecoder(init) {}
1366
+
1367
+ /**
1368
+ * @const {boolean}
1369
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-complete
1370
+ */
1371
+ ImageDecoder.prototype.complete;
1372
+
1373
+ /**
1374
+ * @const {!Promise<undefined>}
1375
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-completed
1376
+ */
1377
+ ImageDecoder.prototype.completed;
1378
+
1379
+ /**
1380
+ * @const {!ImageTrackList}
1381
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-tracks
1382
+ */
1383
+ ImageDecoder.prototype.tracks;
1384
+
1385
+ /**
1386
+ * @const {string}
1387
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-type
1388
+ */
1389
+ ImageDecoder.prototype.type;
1390
+
1391
+ /**
1392
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-close
1393
+ */
1394
+ ImageDecoder.prototype.close = function() {};
1395
+
1396
+ /**
1397
+ * @param {!ImageDecodeOptions=} options
1398
+ * @return {!Promise<!ImageDecodeResult>}
1399
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-decode
1400
+ */
1401
+ ImageDecoder.prototype.decode = function(options) {};
1402
+
1403
+ /**
1404
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-reset
1405
+ */
1406
+ ImageDecoder.prototype.reset = function() {};
1407
+
1408
+ /**
1409
+ * @param {string} type
1410
+ * @return {!Promise<boolean>}
1411
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagedecoder-istypesupported
1412
+ */
1413
+ ImageDecoder.isTypeSupported = function(type) {};
1414
+
1415
+ /**
1416
+ * @constructor
1417
+ * @see https://www.w3.org/TR/webcodecs/#imagetrack
1418
+ */
1419
+ function ImageTrack() {}
1420
+
1421
+ /**
1422
+ * @type {boolean}
1423
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetrack-animated
1424
+ */
1425
+ ImageTrack.prototype.animated;
1426
+
1427
+ /**
1428
+ * @type {number}
1429
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetrack-framecount
1430
+ */
1431
+ ImageTrack.prototype.frameCount;
1432
+
1433
+ /**
1434
+ * @type {number}
1435
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetrack-repetitionCount
1436
+ */
1437
+ ImageTrack.prototype.repetitionCount;
1438
+
1439
+ /**
1440
+ * @type {boolean}
1441
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetrack-selected
1442
+ */
1443
+ ImageTrack.prototype.selected;
1444
+
1445
+ /**
1446
+ * @constructor
1447
+ * @see https://www.w3.org/TR/webcodecs/#imagetracklist
1448
+ */
1449
+ function ImageTrackList() {}
1450
+
1451
+ /**
1452
+ * @type {number}
1453
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetracklist-length
1454
+ */
1455
+ ImageTrackList.prototype.length;
1456
+
1457
+ /**
1458
+ * @type {!Promise<undefined>}
1459
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetracklist-ready
1460
+ */
1461
+ ImageTrackList.prototype.ready;
1462
+
1463
+ /**
1464
+ * @type {number}
1465
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetracklist-selectedindex
1466
+ */
1467
+ ImageTrackList.prototype.selectedIndex;
1468
+
1469
+ /**
1470
+ * @type {!ImageTrack}
1471
+ * @see https://www.w3.org/TR/webcodecs/#dom-imagetracklist-selectedtrack
1472
+ */
1473
+ ImageTrackList.prototype.selectedTrack;