Class: VideoMp4

OSH.DataReceiver. VideoMp4

This datasource provides parsing to fragmented mp4 raw data. The data is encapsulated into mp4 fragment.
Data: ArrayBuffer

Example

var videoDataSource = new OSH.DataReceiver.VideoMp4("MP4 video ", {
protocol: "ws",
service: "SOS",
endpointUrl: "sensiasoft.net:8181/sensorhub/sos",
offeringID: "urn:android:device:a0e0eac2fea3f614-sos",
observedProperty: "http://sensorml.com/ont/swe/property/VideoFrame",
startTime: "2016-08-11T20:17:30.402Z",
endTime: "2016-08-11T20:18:05.451Z",
replaySpeed: 1,
syncMasterTime: false,
bufferingTime: 1000,
responseFormat: "video/mp4
});

Extends

Methods

Builds the full url.

Name Type Description
properties object
Name Type Description
protocol string

the connector protocol

endpointUrl string

the endpoint url

service string

the service

offeringID string

the offeringID

observedProperty string

the observed property

startTime string

the start time (ISO format)

endTime string

the end time (ISO format)

replaySpeed number

the replay factor

responseFormat number

the response format (e.g video/mp4)

Returns:
Type Description
string the full url

Connect the dataSource then the connector will be opened as well.

Disconnect the dataSource then the connector will be closed as well.

Gets the datasource id.

Returns:
Type Description
string the datasource id

Gets the datasource name.

Returns:
Type Description
*

Inits the datasource with the constructor properties.

Name Type Description
properties
Name Type Description
data Object

the data object

Example

data is represented as
data = {
timeStamp: timeStamp // number
data: data // data to render
};

inherited parseData(data){String|Object|number|ArrayBuffer|*}

The default timestamp parser

Name Type Description
data

the full data message returned by the connector

Returns:
Type Description
String | Object | number | ArrayBuffer | * data the formatted data

parseTimeStamp($super, data){number}

Extracts timestamp from the message. The timestamp is located at the 60th bytes and is 8 bytes length.

Name Type Description
$super function

the parseTimeStamp super method

data ArrayBuffer

the data to parse

Returns:
Type Description
number the extracted timestamp

Type Definitions

onMessage

The callback which receives data.