...
- HTTP: http://streaming.flashphoner.com:8081/rest-api/streamrecorder/startRecordingstartup
- HTTPS: https://streaming.flashphoner.com:8444/rest-api/streamrecorder/startRecordingstartup
Where:
- streaming.flashphoner.com is WCS server address
- 8081 is a standard WCS REST / HTTP port
- 8444 is a standard WCS REST / HTTPS port
- rest-api is mandatory prefix
- /streamrecorder/startRecording is startup is REST method
REST methods and response statuses
REST method | Example of REST query | Example of REST response | Response statuses | Description | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/stream/startRecording, /recorder/startup |
| 404 - Not found 500 - Internal error | Start stream recording in specified mediasession | ||||||||
/stream/stopRecording, /recorder/terminate |
| 404 - Not found 500 - Internal error | Stop stream recording in specified mediasession | ||||||||
/recorder/find_all |
| 404 - Not found 500 - Internal error | Find session recordings |
Parameters
Parameter name | Description | Example |
---|---|---|
mediaSessionId | Media session identificator | 5a072377-73c1-4caf-abd3 |
config | Record settings that redefine server settings | |
fileTemplate | Recording file name template | {streamName}-{startTime}-{endTime} |
rotation | Enables/disables rotation and duration/volume of fragments | 20M |
Recording on demand works as follows:
- When REST API API /streamrecorder/startRecording startup query is called, current recording will be stopped.
- New recording starts with settings passed in REST query.
- If some setting is not defined in REST query, the server setting will be applied.
...
Code Block | ||||
---|---|---|---|---|
| ||||
/stream/startRecording { "mediaSessionId":"1234567890abcdefgh", "config": { "fileTemplate": "test", "rotation": "disabled" } } |
REST query /recorder/find_all returns session recordings list. The list shows both recordings on demand started via REST API and recordings initiated with WebSDK:
Code Block | ||||
---|---|---|---|---|
| ||||
[
{
"fileName": "003f-1563776713987-{endTime}.mp4",
"mediaSessionId": "5af9c820-ac49-11e9-9f06-693cb47c4042"
},
{
"fileName": "stream-57882100-ac49-11e9-afdd-6752f5be57a9-jtdvnittjkrd8rsc3dnfbger2o.mp4",
"mediaSessionId": "57882100-ac49-11e9-afdd-6752f5be57a9"
}
] |
How to get recording file name
...