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 -
inherited attachTo(divId)
-
Name Type Description divId -
inherited beforeAddingItems(options)
-
Name Type Description options -
decode(pktSize, pktData){Object}
-
Name Type Description pktSizepktDataReturns:
Type Description Object -
decodeWorker(pktSize, pktData)
-
Name Type Description pktSizepktData -
inherited getDataSourcesId(){Array}
-
Returns:
Type Description Array -
inherited getDivId(){string|*}
-
Returns:
Type Description string | * -
inherited getId(){string|*}
-
Returns:
Type Description string | * -
inherited handleEvents()
-
-
inherited hide()
-
-
initFFMEG_DECODER()
-
-
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 -
onAfterDecoded()
-
-
inherited onResize()
-
-
-
selectDataView($super, dataSourceIds, entityId)
-
Name Type Description $superdataSourceIdsentityId -
setData(dataSourceId, data)
-
Name Type Description dataSourceIddata -
inherited show(properties)
-
Show the view by removing display:none style if any.
Name Type Description properties -
inherited shows(properties)
-
Name Type Description properties -
updateStatistics()
-