Home Reference Source
public class | source

FFmpegjsEngine

Extends:

ComponentConvertEngine → FFmpegjsEngine

Converter engine using the ffmpeg.js library.

Deprecated. Use the ffmpeg.wasm plugin instead.

Constructor Summary

Public Constructor
public

constructor(player: Player, options: Object)

Creates an instance of this class.

Member Summary

Public Members
public

Path to worker script ffmpeg-worker-mp4.js (H.264 & AAC & MP3 encoders) or ffmpeg-worker-webm.js (VP8 & Opus encoders).

public

Enables console logging for debugging purposes.

public

engine: *

public
public

Mime-type for output.

public

Additional configuration options for the ffmpeg.js library.

public

stderr: *

public

stdout: *

public

Method Summary

Public Methods
public

convert(data: blob)

Invoked when recording is stopped and resulting stream is available.

public

setup(mediaType: Object, debug: Boolean)

Setup recording engine.

Private Methods
private

Received a message from the worker.

Inherited Summary

From class ConvertEngine
public

debug: *

public
public

addFileInfo(fileObj: Blob | File, now: date)

Add filename and timestamp to converted file object.

public

loadBlob(data: Blob): Promise

Load Blob and return Promise.

public

saveAs(name: Object)

Show save as dialog in browser so the user can store the converted media locally.

public

setup(mediaType: Object, debug: Boolean)

Setup recording engine.

Public Constructors

public constructor(player: Player, options: Object) source

Creates an instance of this class.

Override:

ConvertEngine#constructor

Params:

NameTypeAttributeDescription
player Player

The Player that this class should be attached to.

options Object
  • optional

The key/value store of player options.

Public Members

public convertWorkerURL: string source

Path to worker script ffmpeg-worker-mp4.js (H.264 & AAC & MP3 encoders) or ffmpeg-worker-webm.js (VP8 & Opus encoders).

public debug: boolean source

Enables console logging for debugging purposes.

Override:

ConvertEngine#debug

public engine: * source

public mediaType: * source

Override:

ConvertEngine#mediaType

public outputType: string source

Mime-type for output.

public pluginLibraryOptions: object source

Additional configuration options for the ffmpeg.js library.

public stderr: * source

public stdout: * source

public timestamp: * source

Public Methods

public convert(data: blob) source

Invoked when recording is stopped and resulting stream is available.

Params:

NameTypeAttributeDescription
data blob

Reference to the recorded Blob that needs to be converted.

public setup(mediaType: Object, debug: Boolean) source

Setup recording engine.

Override:

ConvertEngine#setup

Params:

NameTypeAttributeDescription
mediaType Object

Object describing the media type of this engine.

debug Boolean

Indicating whether or not debug messages should be printed in the console.

Private Methods

private onWorkerMessage(event: Object) source

Received a message from the worker.

Params:

NameTypeAttributeDescription
event Object

Event containing converted data.