Class: FFMPEGView

OSH.UI. FFMPEGView

new OSH.UI.FFMPEGView()

Example

var videoView = new OSH.UI.FFMPEGView("videoContainer-id", {
dataSourceId: videoDataSource.id,
css: "video",
cssSelected: "video-selected",
name: "Video",
useWorker:true,
useWebWorkerTransferableData: false // this is because you can speed up the data transfert between main script and web worker
by using transferable data. Note that can cause problems if you data is attempted to use anywhere else.
See the not below for more details(*).
});

(*)The transferableData actually transfers the ownership of the object to or from the web worker.
It's like passing by reference where a copy isn't made. The difference between it and the normal pass-by-reference
is that the side that transferred the data can no longer access it. In that case, the use of the data must be UNIQUE, that means
you cannot use the data for anything else (like another viewer).

The non transferable data is a copy of the data to be made before being sent to the worker. That could be slow for a large amount of data.

Extends

Methods

inherited addViewItem(viewItem)

Add viewItem to the view

Name Type Description
viewItem
Name Type Description
divId

inherited beforeAddingItems(options)

Name Type Description
options

decode(pktSize, pktData){Object}

Name Type Description
pktSize
pktData
Returns:
Type Description
Object

decodeWorker(pktSize, pktData)

Name Type Description
pktSize
pktData

inherited getDataSourcesId(){Array}

Returns:
Type Description
Array

inherited getDivId(){string|*}

Returns:
Type Description
string | *
Returns:
Type Description
string | *

initFFMPEG_DECODER_WORKER(callback)

The worker code is located at the location js/workers/FFMPEGViewWorker.js.
This location cannot be changed. Be sure to have the right file at the right place.

Name Type Description
callback

selectDataView($super, dataSourceIds, entityId)

Name Type Description
$super
dataSourceIds
entityId

setData(dataSourceId, data)

Name Type Description
dataSourceId
data

Show the view by removing display:none style if any.

Name Type Description
properties
Name Type Description
properties