API Docs for: 2.6
Show:

plugin_rest_streaming Class

Module: plugins_rest
Parent Module: com_streaming_rest

REST plugin that provides streaming functions through the following REST API:

GET requests

streaming/sources

Returns all the streaming sources.

Example JSON response:

{
    "door": {
         "id": "door",
         "url": "http://192.168.5.169/enu/camera352x272.jpg",
         "type": "helios",
         "user": "",
         "cmdOpen": "0*",
         "password": "",
         "frameRate": "1000",
         "extension": "609",
         "description": "door"
    }
}

POST requests

  1. streaming/open

streaming/open

Execute the command associated with the streaming to open the associated device, e.g. a door. The request must contains the following parameters:

  • id: the streaming identifier

Example JSON request parameters:

{ "id": "door" }

Methods

open

(
  • req
  • res
  • next
)

Executes the command associated with the streaming source to open the associated device, e.g. a door, with the following REST API:

open

Parameters:

  • req Object

    The client request

  • res Object

    The client response

  • next Function

    Function to run the next handler in the chain

setCompAuthorization

(
  • ca
)

Set authorization architect component.

Parameters:

  • ca Object

    The authorization architect component.

setCompConfigManager

(
  • comp
)

Sets config manager architect component.

Parameters:

  • comp Object

    The config manager architect component.

setCompStreaming

(
  • cp
)

Set streaming architect component used by streaming functions.

Parameters:

  • cp Object

    The streaming architect component.

setCompUtil

(
  • comp
)

Sets the utility architect component.

Parameters:

  • comp Object

    The utility architect component.

setLogger

(
  • log
)
static

Set the logger to be used.

Parameters:

  • log Object

    The logger object. It must have at least three methods: info, warn and error as console object.

sources

(
  • req
  • res
  • next
)

Returns all the streaming sources by the following REST API:

sources

Parameters:

  • req Object

    The client request.

  • res Object

    The client response.

  • next Function

    Function to run the next handler in the chain.

Properties

compAuthorization

Object private

The architect component to be used for authorization.

compConfigManager

Object private

The config manager architect component.

compStreaming

Object private

The streaming architect component used for streaming functions.

compUtil

Object private

The utility architect component.

get

Array

REST API to be requested using HTTP GET request.

Sub-properties:

  • sources String

    To gets all the streaming sources

IDLOG

String private final

The module identifier used by the logger.

Default: [plugins_rest/streaming]

logger

Object private

The logger. It must have at least three methods: info, warn and error.

Default: console

post

Array

REST API to be requested using HTTP POST request.

Sub-properties:

  • open String

    To execute the command associated with the streaming source