Streams
Streams
The streams call allows getting and setting the list of configured streams. It only supports overwriting the entire list at once. For adding or removing streams incrementally, see the addstream and deletestream calls.
To change the list of configured streams, request as follows:
{
"streams": {
"streamname_here": { //name of the stream
"source": "/mnt/media/a.dtsc" //stream source
// Any optional and/or required parameters for the input of the given source must be supplied here as well
},
//the above structure repeated for all configured streams
}
}
See the inputs of the call for more details on the formats allowed for stream sources and their optional/required parameters.
Do note that because of the above behaviour, sending an empty streams request will clear all configured streams!
The server will respond with a full list of all configured streams, as follows:
{
"streams": {
"streamname_here": { //name of the configured stream
"error": "Available", //error state, if any. "Available" is a special value for VoD streams, indicating it has no current viewers (is not active), but is available for activation.
"name": "a", //the stream name, guaranteed to be equal to the object name.
"online": 2, //online state. 0 = error, 1 = active, 2 = inactive.
"source": "/mnt/media/a.dtsc" //source for this stream, as configured.
//any optional/required parameters set for the stream, will be present here as well
},
//the above structure repeated for all configured streams
}
}
As a reminder, the full list of optional parameters can be found through the capabilities call.