Members
(constant) gopsSafeToAlignWith
Returns a list of gops in the buffer that have a pts value of 3 seconds or more in
front of current time.
- Source:
(constant) MediaSource
An emulation of the MediaSource API so that we can support
native and non-native functionality such as flash and
video/mp2t videos. returns an instance of HtmlMediaSource or
FlashMediaSource depending on what is supported and what options
are passed in.
- Source:
(constant) removeGopBuffer
Removes gop information in buffer that overlaps with provided start and end
- Source:
(constant) updateGopBuffer
Appends gop information (timing and byteLength) received by the transmuxer for the
gops appended in the last call to appendBuffer
- Source:
(constant) URL
A wrapper around the native URL for our MSE object
implementation, this object is exposed under videojs.URL
- Source:
Methods
abort()
Reset the parser and remove any data queued to be sent to the SWF.
- Source:
abort()
Emulate the native mediasource function. abort any soureBuffer
actions and throw out any un-appended data.
- Source:
addSourceBuffer(type) → {Object}
Add a source buffer to the media source.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | the content-type of the content |
- Source:
Returns:
the created source buffer
- Type
- Object
addSourceBuffer(type) → {Object}
Create a new flash source buffer and add it to our flash media source.
Parameters:
Name | Type | Description |
---|---|---|
type |
String | the content-type of the source |
- Source:
Returns:
the flash source buffer
- Type
- Object
appendBuffer(bytes)
Append bytes to the sourcebuffers buffer, in this case we
have to append it to swf object.
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Array |
- Source:
appendBuffer(segment)
Emulate the native mediasource function, but our function will
send all of the proposed segments to the transmuxer so that we
can transmux them before we append them to our internal
native source buffers in the correct format.
Parameters:
Name | Type | Description |
---|---|---|
segment |
Uint8Array | the segment to append to the buffer |
- Source:
appendGopInfo_(event)
Appends gop information (timing and byteLength) received by the transmuxer for the
gops appended in the last call to appendBuffer
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
event |
Event | The gopInfo event from the transmuxer
Properties
|
- Source:
endOfStream(erroropt)
Signals the end of the stream.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
error |
String |
<optional> |
Signals that a playback error has occurred. If specified, it must be either "network" or "decode". |
- Source:
FlashTransmuxerWorker(self)
Our web wroker interface so that things can talk to mux.js
that will be running in a web worker. The scope is passed to this by
webworkify.
Parameters:
Name | Type | Description |
---|---|---|
self |
Object | the scope for the web worker |
- Source:
get() → {Double}
Return the presentation duration.
- Source:
Returns:
the duration of the media in seconds
- Type
- Double
open(msObjectURL, swfId)
Provide a method for a swf object to notify JS that a
media source is now open.
Parameters:
Name | Type | Description |
---|---|---|
msObjectURL |
String | string referencing the MSE Object URL |
swfId |
String | the swf id |
- Source:
remove(start, end)
Emulate the native mediasource function and remove parts
of the buffer from any of our internal buffers that exist
Parameters:
Name | Type | Description |
---|---|---|
start |
Double | position to start the remove at |
end |
Double | position to end the remove at |
- Source:
remove(start, end)
Flash cannot remove ranges already buffered in the NetStream
but seeking clears the buffer entirely. For most purposes,
having this operation act as a no-op is acceptable.
Parameters:
Name | Type | Description |
---|---|---|
start |
Double | start of the section to remove |
end |
Double | end of the section to remove |
- Source:
set(value) → {Double}
Set the presentation duration.
Parameters:
Name | Type | Description |
---|---|---|
value |
Double | the duration of the media in seconds |
- Source:
Returns:
the duration of the media in seconds
- Type
- Double
supportsNativeMediaSources() → {Boolean}
Check to see if the native MediaSource object exists and supports
an MP4 container with both H.264 video and AAC-LC audio.
- Source:
Returns:
if native media sources are supported
- Type
- Boolean
TransmuxerWorker(self)
Our web wroker interface so that things can talk to mux.js
that will be running in a web worker. the scope is passed to this by
webworkify.
Parameters:
Name | Type | Description |
---|---|---|
self |
Object | the scope for the web worker |
- Source: