# Class: MessageHandlers

## MessageHandlers(options)

#### new MessageHandlers(options)

All incoming messages route through this hash. If no function exists to handle an incoming message, then we ignore the message.

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | the options to initialize with

Source:
  - flash-transmuxer-worker.js, line 27

### Methods

#### flush()

Forces the pipeline to finish processing the last segment and emit its results.

Source:
  - flash-transmuxer-worker.js, line 76

#### flush(data)

Forces the pipeline to finish processing the last segment and emit it's results.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | event data, not really used

Source:
  - transmuxer-worker.js, line 139

#### init()

initialize our web worker and wire all the events.

Source:
  - transmuxer-worker.js, line 87

#### init()

initialize our web worker and wire all the events.

Source:
  - flash-transmuxer-worker.js, line 43

#### push(data)

Adds data (a ts segment) to the start of the transmuxer pipeline for processing.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | ArrayBuffer | data to push into the muxer

Source:
  - flash-transmuxer-worker.js, line 57

#### push(data)

Adds data (a ts segment) to the start of the transmuxer pipeline for processing.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | ArrayBuffer | data to push into the muxer

Source:
  - transmuxer-worker.js, line 101

#### reset()

Recreate the transmuxer so that the next segment added via `push` start with a fresh transmuxer.

Source:
  - transmuxer-worker.js, line 112

#### reset()

Recreate the transmuxer so that the next segment added via `push` start with a fresh transmuxer.

Source:
  - flash-transmuxer-worker.js, line 68

#### setTimestampOffset(data)

Set the value that will be used as the `baseMediaDecodeTime` time for the next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime` set relative to the first based on the PTS values.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | used to set the timestamp offset in the muxer

Source:
  - transmuxer-worker.js, line 123

## MessageHandlers(options)

#### new MessageHandlers(options)

All incoming messages route through this hash. If no function exists to handle an incoming message, then we ignore the message.

##### Parameters:

Name | Type | Description
--- | --- | ---
`options` | Object | the options to initialize with

Source:
  - transmuxer-worker.js, line 71

### Methods

#### flush()

Forces the pipeline to finish processing the last segment and emit its results.

Source:
  - flash-transmuxer-worker.js, line 76

#### flush(data)

Forces the pipeline to finish processing the last segment and emit it's results.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | event data, not really used

Source:
  - transmuxer-worker.js, line 139

#### init()

initialize our web worker and wire all the events.

Source:
  - transmuxer-worker.js, line 87

#### init()

initialize our web worker and wire all the events.

Source:
  - flash-transmuxer-worker.js, line 43

#### push(data)

Adds data (a ts segment) to the start of the transmuxer pipeline for processing.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | ArrayBuffer | data to push into the muxer

Source:
  - flash-transmuxer-worker.js, line 57

#### push(data)

Adds data (a ts segment) to the start of the transmuxer pipeline for processing.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | ArrayBuffer | data to push into the muxer

Source:
  - transmuxer-worker.js, line 101

#### reset()

Recreate the transmuxer so that the next segment added via `push` start with a fresh transmuxer.

Source:
  - transmuxer-worker.js, line 112

#### reset()

Recreate the transmuxer so that the next segment added via `push` start with a fresh transmuxer.

Source:
  - flash-transmuxer-worker.js, line 68

#### setTimestampOffset(data)

Set the value that will be used as the `baseMediaDecodeTime` time for the next segment pushed in. Subsequent segments will have their `baseMediaDecodeTime` set relative to the first based on the PTS values.

##### Parameters:

Name | Type | Description
--- | --- | ---
`data` | Object | used to set the timestamp offset in the muxer

Source:
  - transmuxer-worker.js, line 123