/
SourceBuffer.hx
117 lines (96 loc) · 4.73 KB
/
SourceBuffer.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
/*
* Copyright (C)2005-2019 Haxe Foundation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
// This file is generated from mozilla\SourceBuffer.webidl. Do not edit!
package js.html;
/**
The `SourceBuffer` interface represents a chunk of media to be passed into an `HTMLMediaElement` and played, via a `MediaSource` object. This can be made up of one or several media segments.
Documentation [SourceBuffer](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer) by [Mozilla Contributors](https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer$history), licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
@see <https://developer.mozilla.org/en-US/docs/Web/API/SourceBuffer>
**/
@:native("SourceBuffer")
extern class SourceBuffer extends EventTarget {
/**
Controls how the order of media segments in the `SourceBuffer` is handled, in terms of whether they can be appended in any order, or they have to be kept in a strict sequence.
**/
var mode : SourceBufferAppendMode;
/**
A boolean indicating whether the `SourceBuffer` is currently being updated — i.e. whether an `SourceBuffer.appendBuffer()`, `SourceBuffer.appendStream()`, or `SourceBuffer.remove()` operation is currently in progress.
**/
var updating(default,null) : Bool;
/**
Returns the time ranges that are currently buffered in the `SourceBuffer`.
**/
var buffered(default,null) : TimeRanges;
/**
Controls the offset applied to timestamps inside media segments that are subsequently appended to the `SourceBuffer`.
**/
var timestampOffset : Float;
/**
Controls the timestamp for the start of the append window. This is a timestamp range that can be used to filter what media data is appended to the `SourceBuffer`. Coded media frames with timestamps within this range will be appended, whereas those outside the range will be filtered out.
**/
var appendWindowStart : Float;
/**
Controls the timestamp for the end of the append window.
**/
var appendWindowEnd : Float;
/**
Fired whenever the value of `SourceBuffer.updating` transitions from `false` to `true`.
**/
var onupdatestart : haxe.Constraints.Function;
/**
Fired whenever `SourceBuffer.appendBuffer()` method or the `SourceBuffer.remove()` completes. `SourceBuffer.updating` changes from `true` to `false`. This event is fired before `onupdateend`.
**/
var onupdate : haxe.Constraints.Function;
/**
Fired whenever `SourceBuffer.appendBuffer()` method or the `SourceBuffer.remove()` has ended. This event is fired after `onupdate`.
**/
var onupdateend : haxe.Constraints.Function;
/**
Fired whenever an error occurs during `SourceBuffer.appendBuffer()` or `SourceBuffer.appendStream()`. `SourceBuffer.updating` changes from `true` to `false`.
**/
var onerror : haxe.Constraints.Function;
/**
Fired whenever `SourceBuffer.appendBuffer()` or `SourceBuffer.appendStream()` is ended by a call to `SourceBuffer.abort()`. `SourceBuffer.updating` changes from `true` to `false`.
**/
var onabort : haxe.Constraints.Function;
/**
Appends media segment data from an `ArrayBuffer` or `ArrayBufferView` object to the `SourceBuffer`.
@throws DOMError
**/
@:overload( function( data : js.lib.ArrayBuffer ) : Void {} )
function appendBuffer( data : js.lib.ArrayBufferView ) : Void;
/**
Aborts the current segment and resets the segment parser.
@throws DOMError
**/
function abort() : Void;
/**
Removes media segments within a specific time range from the `SourceBuffer`.
@throws DOMError
**/
function remove( start : Float, end : Float ) : Void;
/**
Changes the `MIME type` that future calls to `SourceBuffer.appendBuffer` will expect the new data to conform to.
@throws DOMError
**/
function changeType( type : String ) : Void;
}