...
A preloader aspect ratio should be the same as video published one. Otherwise, browser tries to scale video to preloader ratio, that can lead to picture distortion (stretching or compressing) for the first HLS subscriber.
HLS subscription management using REST API
REST query should be HTTP/HTTPS POST request as follows:
- HTTP: http://test.flashphoner.com:8081/rest-api/hls/startup
- HTTPS: https://test.flashphoner.com:8444/rest-api/hls/startup
Where:
- test.flashphoner.com - WCS server address
- 8081 - WCS server standard REST / HTTP port
- 8444 - standard HTTPS port
- rest-api - mandatory URL part
- /hls/startup - REST method used
REST queries and response sates
REST query | Body example | Response example | Response state | Desctiption | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
/hls/startup |
| 200 - OK 404 - Stream not found 500 - Internal error | Start HLS agent for the stream | ||||||||
/hls/find_all |
| 200 – OK 404 – Not found | Find all streams having HLS agents | ||||||||
/hls/terminate |
| 200 – OK 404 – Not found | Stop or restart HLS agent for the stream |
Parameters
Parameter name | Description | Example |
---|---|---|
name | Stream published name | test |
Issues
1. If HLS agent for the stream is started by REST query /hls/startup, and there are no active HLS subscribers, agent will stop after the following timeout in seconds
Code Block | ||
---|---|---|
| ||
hls_manager_provider_timeout=300 |
By default, the timeout is 5 minutes. Also it concerns HLS agents which are started automatically for streams published using the following parameter
Code Block | ||
---|---|---|
| ||
hls_auto_start=true |
2. If HLS agent for the stream is stopped by REST query /hls/terminate, and there are active HLS subscribers, this agent will be restarted. In this case, active HLS subscribers must reconnect to the stream.
Debug logs for HLS session
...