2 * Copyright 2012 The Closure Compiler Authors
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
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
26 * @implements {EventTarget}
28 function MediaSource() {}
31 * @param {boolean=} opt_useCapture
34 MediaSource.prototype.addEventListener = function(
35 type, listener, opt_useCapture) {};
38 * @param {boolean=} opt_useCapture
41 MediaSource.prototype.removeEventListener = function(
42 type, listener, opt_useCapture) {};
45 MediaSource.prototype.dispatchEvent = function(evt) {};
47 /** @type {Array.<SourceBuffer>} */
48 MediaSource.prototype.sourceBuffers;
50 /** @type {Array.<SourceBuffer>} */
51 MediaSource.prototype.activeSourceBuffers;
54 MediaSource.prototype.duration;
57 * @param {string} type
58 * @return {SourceBuffer}
60 MediaSource.prototype.addSourceBuffer = function(type) {};
63 * @param {SourceBuffer} sourceBuffer
65 MediaSource.prototype.removeSourceBuffer = function(sourceBuffer) {};
68 MediaSource.prototype.readyState;
71 * @param {string=} opt_error
73 MediaSource.prototype.endOfStream = function(opt_error) {};
76 * @param {string} type
79 MediaSource.isTypeSupported = function(type) {};
84 * @implements {EventTarget}
86 function SourceBuffer() {}
89 * @param {boolean=} opt_useCapture
92 SourceBuffer.prototype.addEventListener = function(
93 type, listener, opt_useCapture) {};
96 * @param {boolean=} opt_useCapture
99 SourceBuffer.prototype.removeEventListener = function(
100 type, listener, opt_useCapture) {};
103 SourceBuffer.prototype.dispatchEvent = function(evt) {};
105 /** @type {string} */
106 SourceBuffer.prototype.appendMode;
108 /** @type {boolean} */
109 SourceBuffer.prototype.updating;
111 /** @type {TimeRanges} */
112 SourceBuffer.prototype.buffered;
114 /** @type {number} */
115 SourceBuffer.prototype.timestampOffset;
117 /** @type {number} */
118 SourceBuffer.prototype.appendWindowStart;
120 /** @type {number} */
121 SourceBuffer.prototype.appendWindowEnd;
124 * @param {Uint8Array} data
126 SourceBuffer.prototype.append = function(data) {};
129 * @param {ArrayBuffer|ArrayBufferView} data
131 SourceBuffer.prototype.appendBuffer = function(data) {};
134 * Abort the current segment append sequence.
136 SourceBuffer.prototype.abort = function() {};
139 * @param {number} start
140 * @param {number} end
142 SourceBuffer.prototype.remove = function(start, end) {};