API Docs for:
Show:

Streaming Class

Module: streaming

Abstraction of a streaming source.

It can throw exceptions.

Constructor

Streaming

(
  • data
)
Object

Parameters:

  • data Object

    The streaming information

    • id Object

      The streaming identifier

    • url Object

      The HTTP url of the streaming

    • exten Object

      The streaming extension

    • descr Object

      The streaming description

    • open Object

      The command to open the streaming device

    • user Object

      The streaming username

    • secret Object

      The streaming password

    • frame-rate Object

      The frame rate of the streaming images

    • sample Object

      The streaming sample

Returns:

Object:

The streaming object.

Methods

getExtension

() String

Returns the extension associated with the streaming source.

Returns:

String:

The extension of the streaming source.

getFramerate

() String

Returns the streaming source frame rate.

Returns:

String:

The streaming source frame-rate.

getOpenCommand

() String

Returns the command to open the streaming device.

Returns:

String:

The command to open the streaming device

getSample

(
  • cb
)
Object

Return the video sample in base64 format.

Parameters:

  • cb Function

    The callback function

Returns:

Object:

The sample from video source in base64 format.

getUrl

() String

Returns the streaming source.

Returns:

String:

The streaming source.

toJSON

() Object

Returns the JSON representation of the object.

{
    id:          "door",                           // the identifier
    url:         "http://192.168.5.224/image.jpg", // the HTTP url of the streaming source
    user:        "root",                           // the username
    cmdOpen:     "0*",                             // the DMTF code to open the streaming device
    password:    "password",                       // the password
    frameRate:   "1000",                           // the frame rate of the streaming images
    extension:   "301",                            // the streaming extension
    description: "The door",                       // the streaming description
}

Returns:

Object:

The JSON representation of the object.

toString

() String

Return the readable string of the streaming source.

Returns:

String:

The readable description of the streaming source.

Properties

cmdOpen

String private

The command to open the streaming device.

description

String private

The streaming description.

extension

String private

The streaming extension identifier.

frameRate

String private

The frame rate of the video streaming.

id

String private

The streaming identifier.

password

String private

The password for authenticate streaming source.

url

String private

The HTTP url of the video source.

user

String private

The username for authenticate streaming source.