# Global

##

### 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:
  - virtual-source-buffer.js, line 50

#### (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:
  - videojs-contrib-media-sources.js, line 67

#### (constant) removeGopBuffer

Removes gop information in buffer that overlaps with provided start and end

Source:
  - virtual-source-buffer.js, line 121

#### (constant) updateGopBuffer

Appends gop information (timing and byteLength) received by the transmuxer for the gops appended in the last call to appendBuffer

Source:
  - virtual-source-buffer.js, line 83

#### (constant) URL

A wrapper around the native URL for our MSE object implementation, this object is exposed under videojs.URL

Source:
  - videojs-contrib-media-sources.js, line 95

### Methods

#### abort()

Reset the parser and remove any data queued to be sent to the SWF.

Source:
  - flash-source-buffer.js, line 236

#### abort()

Emulate the native mediasource function. abort any soureBuffer actions and throw out any un-appended data.

Source:
  - virtual-source-buffer.js, line 742

#### addSourceBuffer(type) → {Object}

Add a source buffer to the media source.

##### Parameters:

Name | Type | Description
--- | --- | ---
`type` | String | the content-type of the content

Source:
  - html-media-source.js, line 287

##### 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:
  - flash-media-source.js, line 63

##### 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:
  - flash-source-buffer.js, line 208

#### 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:
  - virtual-source-buffer.js, line 503

#### 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
Name | Type | Description
--- | --- | ---
`data.gopInfo` | Array | List of gop info to append

Source:
  - virtual-source-buffer.js, line 550

#### 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:
  - flash-media-source.js, line 87

#### 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:
  - flash-transmuxer-worker.js, line 93

#### get() → {Double}

Return the presentation duration.

Source:
  - flash-media-source.js, line 118

##### 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:
  - videojs-contrib-media-sources.js, line 36

#### 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:
  - virtual-source-buffer.js, line 564

#### 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:
  - flash-source-buffer.js, line 257

#### set(value) → {Double}

Set the presentation duration.

##### Parameters:

Name | Type | Description
--- | --- | ---
`value` | Double | the duration of the media in seconds

Source:
  - flash-media-source.js, line 132

##### 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:
  - videojs-contrib-media-sources.js, line 52

##### 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:
  - transmuxer-worker.js, line 159