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.
- package/README.md +5 -30
- package/cli.js +3 -4
- package/externs/browser/decorators.js +276 -0
- package/externs/browser/deprecated.js +58 -0
- package/externs/browser/es6_proxy.js +143 -0
- package/externs/browser/fetchapi.js +449 -0
- package/externs/browser/fido.js +94 -0
- package/externs/browser/flash.js +226 -0
- package/externs/browser/gecko_css.js +126 -0
- package/externs/browser/gecko_dom.js +479 -0
- package/externs/browser/gecko_event.js +86 -0
- package/externs/browser/gecko_xml.js +73 -0
- package/externs/browser/google_legacy.js +31 -0
- package/externs/browser/html5.js +6647 -0
- package/externs/browser/ie_css.js +270 -0
- package/externs/browser/ie_dom.js +1232 -0
- package/externs/browser/ie_event.js +310 -0
- package/externs/browser/ie_vml.js +77 -0
- package/externs/browser/intersection_observer.js +178 -0
- package/externs/browser/intl.js +602 -0
- package/externs/browser/iphone.js +204 -0
- package/externs/browser/mediakeys.js +305 -0
- package/externs/browser/mediasource.js +155 -0
- package/externs/browser/nonstandard_anim_timing.js +97 -0
- package/externs/browser/nonstandard_audio.js +82 -0
- package/externs/browser/nonstandard_console.js +75 -0
- package/externs/browser/nonstandard_fileapi.js +1066 -0
- package/externs/browser/nonstandard_indexeddb.js +78 -0
- package/externs/browser/nonstandard_navigation_timing.js +38 -0
- package/externs/browser/nonstandard_selection.js +80 -0
- package/externs/browser/page_visibility.js +28 -0
- package/externs/browser/streamsapi.js +593 -0
- package/externs/browser/svg.js +10016 -0
- package/externs/browser/url.js +202 -0
- package/externs/browser/v8.js +134 -0
- package/externs/browser/w3c_abort.js +89 -0
- package/externs/browser/w3c_anim_timing.js +49 -0
- package/externs/browser/w3c_aria_mixin.js +286 -0
- package/externs/browser/w3c_audio.js +1660 -0
- package/externs/browser/w3c_batterystatus.js +85 -0
- package/externs/browser/w3c_clipboard.js +74 -0
- package/externs/browser/w3c_clipboardevent.js +47 -0
- package/externs/browser/w3c_composition_event.js +93 -0
- package/externs/browser/w3c_css.js +3790 -0
- package/externs/browser/w3c_css3d.js +199 -0
- package/externs/browser/w3c_device_sensor_event.js +122 -0
- package/externs/browser/w3c_dom1.js +1160 -0
- package/externs/browser/w3c_dom2.js +3151 -0
- package/externs/browser/w3c_dom3.js +555 -0
- package/externs/browser/w3c_dom4.js +289 -0
- package/externs/browser/w3c_elementtraversal.js +116 -0
- package/externs/browser/w3c_event.js +607 -0
- package/externs/browser/w3c_event3.js +77 -0
- package/externs/browser/w3c_eventsource.js +110 -0
- package/externs/browser/w3c_fileapi.js +302 -0
- package/externs/browser/w3c_gamepad.js +113 -0
- package/externs/browser/w3c_geolocation.js +130 -0
- package/externs/browser/w3c_geometry1.js +899 -0
- package/externs/browser/w3c_indexeddb.js +771 -0
- package/externs/browser/w3c_keyboardlock.js +47 -0
- package/externs/browser/w3c_mediacapabilities.js +206 -0
- package/externs/browser/w3c_midi.js +301 -0
- package/externs/browser/w3c_navigation.js +72 -0
- package/externs/browser/w3c_navigation_timing.js +437 -0
- package/externs/browser/w3c_netinfo.js +85 -0
- package/externs/browser/w3c_payment_request.js +401 -0
- package/externs/browser/w3c_permissions.js +112 -0
- package/externs/browser/w3c_permissions_policy.js +78 -0
- package/externs/browser/w3c_pointer_events.js +163 -0
- package/externs/browser/w3c_pointerlock.js +63 -0
- package/externs/browser/w3c_range.js +284 -0
- package/externs/browser/w3c_referrer_policy.js +36 -0
- package/externs/browser/w3c_requestidlecallback.js +76 -0
- package/externs/browser/w3c_rtc.js +3882 -0
- package/externs/browser/w3c_screen_orientation.js +53 -0
- package/externs/browser/w3c_screen_wake_lock.js +58 -0
- package/externs/browser/w3c_selection.js +209 -0
- package/externs/browser/w3c_selectors.js +113 -0
- package/externs/browser/w3c_serviceworker.js +739 -0
- package/externs/browser/w3c_speech.js +426 -0
- package/externs/browser/w3c_touch_event.js +296 -0
- package/externs/browser/w3c_trusted_types.js +142 -0
- package/externs/browser/w3c_vibration.js +38 -0
- package/externs/browser/w3c_webcodecs.js +1473 -0
- package/externs/browser/w3c_webcrypto.js +839 -0
- package/externs/browser/w3c_worklets.js +54 -0
- package/externs/browser/w3c_xml.js +533 -0
- package/externs/browser/web_animations.js +452 -0
- package/externs/browser/web_app_manifest.js +50 -0
- package/externs/browser/webassembly.js +223 -0
- package/externs/browser/webgl.js +3409 -0
- package/externs/browser/webgl2.js +2727 -0
- package/externs/browser/webgl2_compute.js +1609 -0
- package/externs/browser/webkit_css.js +456 -0
- package/externs/browser/webkit_dom.js +118 -0
- package/externs/browser/webkit_event.js +46 -0
- package/externs/browser/webkit_notifications.js +258 -0
- package/externs/browser/webkit_usercontent.js +55 -0
- package/externs/browser/weblocksapi.js +125 -0
- package/externs/browser/webstorage.js +171 -0
- package/externs/browser/whatwg_bitmap_context.js +37 -0
- package/externs/browser/whatwg_console.js +152 -0
- package/externs/browser/whatwg_encoding.js +99 -0
- package/externs/browser/whatwg_file_system.js +296 -0
- package/externs/browser/wicg_attribution_reporting.js +42 -0
- package/externs/browser/wicg_compression_stream.js +60 -0
- package/externs/browser/wicg_constructable_stylesheets.js +60 -0
- package/externs/browser/wicg_entries.js +169 -0
- package/externs/browser/wicg_file_handling.js +41 -0
- package/externs/browser/wicg_file_system_access.js +191 -0
- package/externs/browser/wicg_floc.js +41 -0
- package/externs/browser/wicg_ink.js +89 -0
- package/externs/browser/wicg_resizeobserver.js +100 -0
- package/externs/browser/wicg_scheduler.js +62 -0
- package/externs/browser/wicg_trust_token.js +89 -0
- package/externs/browser/wicg_uach.js +100 -0
- package/externs/browser/window.js +190 -0
- package/externs/es3.js +2716 -0
- package/externs/es5.js +284 -0
- package/externs/es6.js +2554 -0
- package/externs/es6_collections.js +323 -0
- package/index.js +13 -16
- package/lib/grunt/index.js +71 -92
- package/lib/grunt/vinyl-stream.js +12 -18
- package/lib/gulp/concat-to-json.js +30 -18
- package/lib/gulp/index.js +174 -181
- package/lib/gulp/json-to-vinyl.js +8 -8
- package/lib/node/{closure-compiler.js → index.js} +27 -51
- package/lib/utils.js +16 -14
- package/package.json +19 -16
- package/lib/logger.js +0 -89
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2009 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
|
+
* @fileoverview Definitions for all iPhone extensions. Created from:
|
|
18
|
+
* http://developer.apple.com/library/safari/navigation/
|
|
19
|
+
*
|
|
20
|
+
* @externs
|
|
21
|
+
* @author agrieve@google.com (Andrew Grieve)
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @type {number}
|
|
27
|
+
*/
|
|
28
|
+
Touch.prototype.webkitForce;
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @type {number}
|
|
32
|
+
*/
|
|
33
|
+
Touch.prototype.webkitRadiusX;
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* @type {number}
|
|
37
|
+
*/
|
|
38
|
+
Touch.prototype.webkitRadiusY;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* The distance between two fingers since the start of an event as a multiplier
|
|
42
|
+
* of the initial distance. The initial value is 1.0. If less than 1.0, the
|
|
43
|
+
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
|
|
44
|
+
* pinch open (to zoom in).
|
|
45
|
+
* @type {number}
|
|
46
|
+
*/
|
|
47
|
+
TouchEvent.prototype.scale;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The delta rotation since the start of an event, in degrees, where clockwise
|
|
51
|
+
* is positive and counter-clockwise is negative. The initial value is 0.0.
|
|
52
|
+
* @type {number}
|
|
53
|
+
*/
|
|
54
|
+
TouchEvent.prototype.rotation;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Initializes a newly created TouchEvent object.
|
|
58
|
+
* @param {string} type
|
|
59
|
+
* @param {boolean} canBubble
|
|
60
|
+
* @param {boolean} cancelable
|
|
61
|
+
* @param {Window} view
|
|
62
|
+
* @param {number} detail
|
|
63
|
+
* @param {number} screenX
|
|
64
|
+
* @param {number} screenY
|
|
65
|
+
* @param {number} clientX
|
|
66
|
+
* @param {number} clientY
|
|
67
|
+
* @param {boolean} ctrlKey
|
|
68
|
+
* @param {boolean} altKey
|
|
69
|
+
* @param {boolean} shiftKey
|
|
70
|
+
* @param {boolean} metaKey
|
|
71
|
+
* @param {TouchList} touches
|
|
72
|
+
* @param {TouchList} targetTouches
|
|
73
|
+
* @param {TouchList} changedTouches
|
|
74
|
+
* @param {number} scale
|
|
75
|
+
* @param {number} rotation
|
|
76
|
+
* @return {undefined}
|
|
77
|
+
*/
|
|
78
|
+
TouchEvent.prototype.initTouchEvent = function(type, canBubble, cancelable,
|
|
79
|
+
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
|
|
80
|
+
metaKey, touches, targetTouches, changedTouches, scale, rotation) {};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* The GestureEvent class encapsulates information about a multi-touch gesture.
|
|
84
|
+
*
|
|
85
|
+
* GestureEvent objects are high-level events that encapsulate the low-level
|
|
86
|
+
* TouchEvent objects. Both GestureEvent and TouchEvent events are sent during
|
|
87
|
+
* a multi-touch sequence. Gesture events contain scaling and rotation
|
|
88
|
+
* information allowing gestures to be combined, if supported by the platform.
|
|
89
|
+
* If not supported, one gesture ends before another starts. Listen for
|
|
90
|
+
* GestureEvent events if you want to respond to gestures only, not process
|
|
91
|
+
* the low-level TouchEvent objects.
|
|
92
|
+
*
|
|
93
|
+
* @see http://developer.apple.com/library/safari/#documentation/UserExperience/Reference/GestureEventClassReference/GestureEvent/GestureEvent.html
|
|
94
|
+
* @extends {UIEvent}
|
|
95
|
+
* @constructor
|
|
96
|
+
*/
|
|
97
|
+
function GestureEvent() {}
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* The distance between two fingers since the start of an event as a multiplier
|
|
101
|
+
* of the initial distance. The initial value is 1.0. If less than 1.0, the
|
|
102
|
+
* gesture is pinch close (to zoom out). If greater than 1.0, the gesture is
|
|
103
|
+
* pinch open (to zoom in).
|
|
104
|
+
* @type {number}
|
|
105
|
+
*/
|
|
106
|
+
GestureEvent.prototype.scale;
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* The delta rotation since the start of an event, in degrees, where clockwise
|
|
110
|
+
* is positive and counter-clockwise is negative. The initial value is 0.0.
|
|
111
|
+
* @type {number}
|
|
112
|
+
*/
|
|
113
|
+
GestureEvent.prototype.rotation;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* The target of this gesture.
|
|
117
|
+
* @type {EventTarget}
|
|
118
|
+
*/
|
|
119
|
+
GestureEvent.prototype.target;
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Initializes a newly created GestureEvent object.
|
|
123
|
+
* @param {string} type
|
|
124
|
+
* @param {boolean} canBubble
|
|
125
|
+
* @param {boolean} cancelable
|
|
126
|
+
* @param {Window} view
|
|
127
|
+
* @param {number} detail
|
|
128
|
+
* @param {number} screenX
|
|
129
|
+
* @param {number} screenY
|
|
130
|
+
* @param {number} clientX
|
|
131
|
+
* @param {number} clientY
|
|
132
|
+
* @param {boolean} ctrlKey
|
|
133
|
+
* @param {boolean} altKey
|
|
134
|
+
* @param {boolean} shiftKey
|
|
135
|
+
* @param {boolean} metaKey
|
|
136
|
+
* @param {EventTarget} target
|
|
137
|
+
* @param {number} scale
|
|
138
|
+
* @param {number} rotation
|
|
139
|
+
* @return {undefined}
|
|
140
|
+
*/
|
|
141
|
+
GestureEvent.prototype.initGestureEvent = function(type, canBubble, cancelable,
|
|
142
|
+
view, detail, screenX, screenY, clientX, clientY, ctrlKey, altKey, shiftKey,
|
|
143
|
+
metaKey, target, scale, rotation) {};
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
/**
|
|
147
|
+
* Specifies the JavaScript method to invoke when a gesture is started by
|
|
148
|
+
* two or more fingers touching the surface.
|
|
149
|
+
* @type {?function(!GestureEvent)}
|
|
150
|
+
*/
|
|
151
|
+
Element.prototype.ongesturestart;
|
|
152
|
+
|
|
153
|
+
/**
|
|
154
|
+
* Specifies the JavaScript method to invoke when fingers are moved during a
|
|
155
|
+
* gesture.
|
|
156
|
+
* @type {?function(!GestureEvent)}
|
|
157
|
+
*/
|
|
158
|
+
Element.prototype.ongesturechange;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Specifies the JavaScript method to invoke when a gesture ends (when there are
|
|
162
|
+
* 0 or 1 fingers touching the surface).
|
|
163
|
+
* @type {?function(!GestureEvent)}
|
|
164
|
+
*/
|
|
165
|
+
Element.prototype.ongestureend;
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Specifies the JavaScript method to invoke when the browser device's
|
|
169
|
+
* orientation changes, i.e.the device is rotated.
|
|
170
|
+
* @type {?function(!Event)}
|
|
171
|
+
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
|
|
172
|
+
*/
|
|
173
|
+
Window.prototype.onorientationchange;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Returns the orientation of the browser's device, one of [-90, 0, 90, 180].
|
|
177
|
+
* @type {number}
|
|
178
|
+
* @see http://developer.apple.com/library/IOS/#documentation/AppleApplications/Reference/SafariWebContent/HandlingEvents/HandlingEvents.html
|
|
179
|
+
*/
|
|
180
|
+
Window.prototype.orientation;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* @implicitCast
|
|
184
|
+
* @type {boolean}
|
|
185
|
+
*/
|
|
186
|
+
HTMLInputElement.prototype.autocorrect;
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* @implicitCast
|
|
190
|
+
* @type {boolean}
|
|
191
|
+
*/
|
|
192
|
+
HTMLInputElement.prototype.autocapitalize;
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @implicitCast
|
|
196
|
+
* @type {boolean}
|
|
197
|
+
*/
|
|
198
|
+
HTMLTextAreaElement.prototype.autocorrect;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* @implicitCast
|
|
202
|
+
* @type {boolean}
|
|
203
|
+
*/
|
|
204
|
+
HTMLTextAreaElement.prototype.autocapitalize;
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2015 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
|
+
* @fileoverview MediaKey externs.
|
|
18
|
+
* Based on {@link https://w3c.github.io/encrypted-media/ EME draft 5 December
|
|
19
|
+
* 2019}.
|
|
20
|
+
* @externs
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @typedef {{
|
|
26
|
+
* contentType: string,
|
|
27
|
+
* encryptionScheme: (?string|undefined),
|
|
28
|
+
* robustness: (string|undefined)
|
|
29
|
+
* }}
|
|
30
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeysystemmediacapability-dictionary
|
|
31
|
+
*/
|
|
32
|
+
var MediaKeySystemMediaCapability;
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
/** @typedef {{
|
|
36
|
+
* label: (string|undefined),
|
|
37
|
+
* initDataTypes: (!Array<string>|undefined),
|
|
38
|
+
* audioCapabilities: (!Array<!MediaKeySystemMediaCapability>|undefined),
|
|
39
|
+
* videoCapabilities: (!Array<!MediaKeySystemMediaCapability>|undefined),
|
|
40
|
+
* distinctiveIdentifier: (string|undefined),
|
|
41
|
+
* persistentState: (string|undefined),
|
|
42
|
+
* sessionTypes: (!Array<string>|undefined)
|
|
43
|
+
* }}
|
|
44
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeysystemconfiguration-dictionary
|
|
45
|
+
*/
|
|
46
|
+
var MediaKeySystemConfiguration;
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @param {string} keySystem
|
|
51
|
+
* @param {!Array<!MediaKeySystemConfiguration>} supportedConfigurations
|
|
52
|
+
* @return {!Promise<!MediaKeySystemAccess>}
|
|
53
|
+
* @see https://w3c.github.io/encrypted-media/#navigator-extension-requestmediakeysystemaccess
|
|
54
|
+
*/
|
|
55
|
+
Navigator.prototype.requestMediaKeySystemAccess =
|
|
56
|
+
function(keySystem, supportedConfigurations) {};
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/** @const {MediaKeys} */
|
|
60
|
+
HTMLMediaElement.prototype.mediaKeys;
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @param {MediaKeys} mediaKeys
|
|
65
|
+
* @return {!Promise}
|
|
66
|
+
* @see https://w3c.github.io/encrypted-media/#dom-htmlmediaelement-setmediakeys
|
|
67
|
+
*/
|
|
68
|
+
HTMLMediaElement.prototype.setMediaKeys = function(mediaKeys) {};
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* @interface
|
|
74
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeysystemaccess-interface
|
|
75
|
+
*/
|
|
76
|
+
function MediaKeySystemAccess() {}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
/** @return {!Promise<!MediaKeys>} */
|
|
80
|
+
MediaKeySystemAccess.prototype.createMediaKeys = function() {};
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/** @return {!MediaKeySystemConfiguration} */
|
|
84
|
+
MediaKeySystemAccess.prototype.getConfiguration = function() {};
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
/** @const {string} */
|
|
88
|
+
MediaKeySystemAccess.prototype.keySystem;
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* @interface
|
|
94
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeys-interface
|
|
95
|
+
*/
|
|
96
|
+
function MediaKeys() {}
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* @param {string=} opt_sessionType defaults to "temporary"
|
|
101
|
+
* @return {!MediaKeySession}
|
|
102
|
+
* @throws {TypeError} if opt_sessionType is invalid.
|
|
103
|
+
*/
|
|
104
|
+
MediaKeys.prototype.createSession = function(opt_sessionType) {};
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @param {!BufferSource} serverCertificate
|
|
109
|
+
* @return {!Promise}
|
|
110
|
+
*/
|
|
111
|
+
MediaKeys.prototype.setServerCertificate = function(serverCertificate) {};
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* @interface
|
|
117
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeystatusmap-interface
|
|
118
|
+
*/
|
|
119
|
+
function MediaKeyStatusMap() {}
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
/** @const {number} */
|
|
123
|
+
MediaKeyStatusMap.prototype.size;
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Array entry 0 is the key, 1 is the value.
|
|
128
|
+
* @return {!Iterator<!Array<!BufferSource|string>>}
|
|
129
|
+
*/
|
|
130
|
+
MediaKeyStatusMap.prototype.entries = function() {};
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* The function is called with each value.
|
|
135
|
+
* @param {function(string, !BufferSource)} callback A callback function to run for
|
|
136
|
+
* each media key. The first parameter is the key status; the second
|
|
137
|
+
* parameter is the key ID.
|
|
138
|
+
* @return {undefined}
|
|
139
|
+
*/
|
|
140
|
+
MediaKeyStatusMap.prototype.forEach = function(callback) {};
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* @param {!BufferSource} keyId
|
|
145
|
+
* @return {string|undefined}
|
|
146
|
+
*/
|
|
147
|
+
MediaKeyStatusMap.prototype.get = function(keyId) {};
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* @param {!BufferSource} keyId
|
|
152
|
+
* @return {boolean}
|
|
153
|
+
*/
|
|
154
|
+
MediaKeyStatusMap.prototype.has = function(keyId) {};
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* @return {!Iterator<!BufferSource>}
|
|
159
|
+
*/
|
|
160
|
+
MediaKeyStatusMap.prototype.keys = function() {};
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
/**
|
|
164
|
+
* @return {!Iterator<string>}
|
|
165
|
+
*/
|
|
166
|
+
MediaKeyStatusMap.prototype.values = function() {};
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* @interface
|
|
172
|
+
* @extends {EventTarget}
|
|
173
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeysession-interface
|
|
174
|
+
*/
|
|
175
|
+
function MediaKeySession() {}
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
/** @const {string} */
|
|
179
|
+
MediaKeySession.prototype.sessionId;
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
/** @const {number} */
|
|
183
|
+
MediaKeySession.prototype.expiration;
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
/** @const {!Promise} */
|
|
187
|
+
MediaKeySession.prototype.closed;
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
/** @const {!MediaKeyStatusMap} */
|
|
191
|
+
MediaKeySession.prototype.keyStatuses;
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
/**
|
|
195
|
+
* @param {string} initDataType
|
|
196
|
+
* @param {!BufferSource} initData
|
|
197
|
+
* @return {!Promise}
|
|
198
|
+
*/
|
|
199
|
+
MediaKeySession.prototype.generateRequest = function(initDataType, initData) {};
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* @param {string} sessionId
|
|
204
|
+
* @return {!Promise<boolean>}}
|
|
205
|
+
*/
|
|
206
|
+
MediaKeySession.prototype.load = function(sessionId) {};
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
/**
|
|
210
|
+
* @param {!BufferSource} response
|
|
211
|
+
* @return {!Promise}
|
|
212
|
+
*/
|
|
213
|
+
MediaKeySession.prototype.update = function(response) {};
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
/** @return {!Promise} */
|
|
217
|
+
MediaKeySession.prototype.close = function() {};
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
/** @return {!Promise} */
|
|
221
|
+
MediaKeySession.prototype.remove = function() {};
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
/** @override */
|
|
225
|
+
MediaKeySession.prototype.addEventListener = function(
|
|
226
|
+
type, listener, opt_options) {};
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
/** @override */
|
|
230
|
+
MediaKeySession.prototype.removeEventListener = function(
|
|
231
|
+
type, listener, opt_options) {};
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
/** @override */
|
|
235
|
+
MediaKeySession.prototype.dispatchEvent = function(evt) {};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @record
|
|
239
|
+
* @extends {EventInit}
|
|
240
|
+
* @see https://w3c.github.io/encrypted-media/#dom-mediakeymessageeventinit
|
|
241
|
+
*/
|
|
242
|
+
function MediaKeyMessageEventInit() {};
|
|
243
|
+
|
|
244
|
+
/** @type {string} */
|
|
245
|
+
MediaKeyMessageEventInit.prototype.messageType;
|
|
246
|
+
|
|
247
|
+
/** @type {!ArrayBuffer} */
|
|
248
|
+
MediaKeyMessageEventInit.prototype.message;
|
|
249
|
+
|
|
250
|
+
|
|
251
|
+
/**
|
|
252
|
+
* @constructor
|
|
253
|
+
* @param {string} type
|
|
254
|
+
* @param {MediaKeyMessageEventInit} eventInitDict
|
|
255
|
+
* @extends {Event}
|
|
256
|
+
* @see https://w3c.github.io/encrypted-media/#mediakeymessageevent
|
|
257
|
+
*/
|
|
258
|
+
function MediaKeyMessageEvent(type, eventInitDict) {}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
/** @const {string} */
|
|
262
|
+
MediaKeyMessageEvent.prototype.messageType;
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
/** @const {!ArrayBuffer} */
|
|
266
|
+
MediaKeyMessageEvent.prototype.message;
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
/** @const {!MediaKeySession} */
|
|
270
|
+
MediaKeyMessageEvent.prototype.target;
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* @record
|
|
274
|
+
* @extends {EventInit}
|
|
275
|
+
* @see https://w3c.github.io/encrypted-media/#dom-mediaencryptedeventinit
|
|
276
|
+
*/
|
|
277
|
+
function MediaEncryptedEventInit() {};
|
|
278
|
+
|
|
279
|
+
/** @type {(string | undefined)} */
|
|
280
|
+
MediaEncryptedEventInit.prototype.initDataType;
|
|
281
|
+
|
|
282
|
+
/** @type {(ArrayBuffer | undefined)} */
|
|
283
|
+
MediaEncryptedEventInit.prototype.initData;
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* @constructor
|
|
287
|
+
* @param {string} type
|
|
288
|
+
* @param {MediaEncryptedEventInit=} opt_eventInitDict
|
|
289
|
+
* @extends {Event}
|
|
290
|
+
* @see https://w3c.github.io/encrypted-media/#mediaencryptedevent
|
|
291
|
+
*/
|
|
292
|
+
function MediaEncryptedEvent(type, opt_eventInitDict) {}
|
|
293
|
+
|
|
294
|
+
|
|
295
|
+
/** @const {string} */
|
|
296
|
+
MediaEncryptedEvent.prototype.initDataType;
|
|
297
|
+
|
|
298
|
+
|
|
299
|
+
/** @const {ArrayBuffer} */
|
|
300
|
+
MediaEncryptedEvent.prototype.initData;
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
/** @const {!HTMLMediaElement} */
|
|
304
|
+
MediaEncryptedEvent.prototype.target;
|
|
305
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright 2012 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
|
+
* @fileoverview Definitions for the Media Source Extensions. Note that the
|
|
18
|
+
* properties available here are the union of several versions of the spec.
|
|
19
|
+
* @see http://dvcs.w3.org/hg/html-media/raw-file/tip/media-source/media-source.html
|
|
20
|
+
*
|
|
21
|
+
* @externs
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* @constructor
|
|
26
|
+
* @implements {EventTarget}
|
|
27
|
+
*/
|
|
28
|
+
function MediaSource() {}
|
|
29
|
+
|
|
30
|
+
/** @override */
|
|
31
|
+
MediaSource.prototype.addEventListener = function(type, listener, opt_options) {
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/** @override */
|
|
35
|
+
MediaSource.prototype.removeEventListener = function(
|
|
36
|
+
type, listener, opt_options) {};
|
|
37
|
+
|
|
38
|
+
/** @override */
|
|
39
|
+
MediaSource.prototype.dispatchEvent = function(evt) {};
|
|
40
|
+
|
|
41
|
+
/** @type {Array<SourceBuffer>} */
|
|
42
|
+
MediaSource.prototype.sourceBuffers;
|
|
43
|
+
|
|
44
|
+
/** @type {Array<SourceBuffer>} */
|
|
45
|
+
MediaSource.prototype.activeSourceBuffers;
|
|
46
|
+
|
|
47
|
+
/** @type {number} */
|
|
48
|
+
MediaSource.prototype.duration;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param {string} type
|
|
52
|
+
* @return {SourceBuffer}
|
|
53
|
+
*/
|
|
54
|
+
MediaSource.prototype.addSourceBuffer = function(type) {};
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* @param {SourceBuffer} sourceBuffer
|
|
58
|
+
* @return {undefined}
|
|
59
|
+
*/
|
|
60
|
+
MediaSource.prototype.removeSourceBuffer = function(sourceBuffer) {};
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Updates the live seekable range.
|
|
64
|
+
* @param {number} start
|
|
65
|
+
* @param {number} end
|
|
66
|
+
*/
|
|
67
|
+
MediaSource.prototype.setLiveSeekableRange = function(start, end) {};
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Clears the live seekable range.
|
|
71
|
+
* @return {void}
|
|
72
|
+
*/
|
|
73
|
+
MediaSource.prototype.clearLiveSeekableRange = function() {};
|
|
74
|
+
|
|
75
|
+
/** @type {string} */
|
|
76
|
+
MediaSource.prototype.readyState;
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* @param {string=} opt_error
|
|
80
|
+
* @return {undefined}
|
|
81
|
+
*/
|
|
82
|
+
MediaSource.prototype.endOfStream = function(opt_error) {};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* @param {string} type
|
|
86
|
+
* @return {boolean}
|
|
87
|
+
*/
|
|
88
|
+
MediaSource.isTypeSupported = function(type) {};
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* @constructor
|
|
93
|
+
* @implements {EventTarget}
|
|
94
|
+
*/
|
|
95
|
+
function SourceBuffer() {}
|
|
96
|
+
|
|
97
|
+
/** @override */
|
|
98
|
+
SourceBuffer.prototype.addEventListener = function(
|
|
99
|
+
type, listener, opt_options) {};
|
|
100
|
+
|
|
101
|
+
/** @override */
|
|
102
|
+
SourceBuffer.prototype.removeEventListener = function(
|
|
103
|
+
type, listener, opt_options) {};
|
|
104
|
+
|
|
105
|
+
/** @override */
|
|
106
|
+
SourceBuffer.prototype.dispatchEvent = function(evt) {};
|
|
107
|
+
|
|
108
|
+
/** @type {string} */
|
|
109
|
+
SourceBuffer.prototype.mode;
|
|
110
|
+
|
|
111
|
+
/** @type {boolean} */
|
|
112
|
+
SourceBuffer.prototype.updating;
|
|
113
|
+
|
|
114
|
+
/** @type {TimeRanges} */
|
|
115
|
+
SourceBuffer.prototype.buffered;
|
|
116
|
+
|
|
117
|
+
/** @type {number} */
|
|
118
|
+
SourceBuffer.prototype.timestampOffset;
|
|
119
|
+
|
|
120
|
+
/** @type {number} */
|
|
121
|
+
SourceBuffer.prototype.appendWindowStart;
|
|
122
|
+
|
|
123
|
+
/** @type {number} */
|
|
124
|
+
SourceBuffer.prototype.appendWindowEnd;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* @param {Uint8Array} data
|
|
128
|
+
* @return {undefined}
|
|
129
|
+
*/
|
|
130
|
+
SourceBuffer.prototype.append = function(data) {};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* @param {ArrayBuffer|ArrayBufferView} data
|
|
134
|
+
* @return {undefined}
|
|
135
|
+
*/
|
|
136
|
+
SourceBuffer.prototype.appendBuffer = function(data) {};
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Abort the current segment append sequence.
|
|
140
|
+
* @return {undefined}
|
|
141
|
+
*/
|
|
142
|
+
SourceBuffer.prototype.abort = function() {};
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* @param {number} start
|
|
146
|
+
* @param {number} end
|
|
147
|
+
* @return {undefined}
|
|
148
|
+
*/
|
|
149
|
+
SourceBuffer.prototype.remove = function(start, end) {};
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @param {string} type
|
|
153
|
+
* @return {undefined}
|
|
154
|
+
*/
|
|
155
|
+
SourceBuffer.prototype.changeType = function(type) {};
|