...
1) Enable the keep-alive setting in flashphoner.properties
Code Block | ||||
---|---|---|---|---|
| ||||
keep_alive_streaming_sessions_enabled=true |
...
You can use an application other than the 'defaultApp'.
Use Command Line Interface and the 'show apps' command to see the list of applications and their keys.
...
Code Block | ||||
---|---|---|---|---|
| ||||
update app defaultApp http://my-web-server.com/MyAPI |
Here:
- my-web-server.com - is the address of the web server,
- MyAPI - is the path where REST API is located.
...
A REST-query must be an HTTP/HTTPS POST query in the following form:
- HTTP: http://streaming.flashphoner.com:8081/rest-api/stream/terminate
- HTTPS: https://streaming.flashphoner.com:8444/rest-api/stream/terminate
Here:
- streaming.flashphoner.com - is the address of the WCS server
- 8081 - is the standard REST / HTTP port of the WCS server
- 8444 - is the standard HTTPS port
- rest-api - is the required part of the URL
- /stream/terminate - is the REST method used
REST-methods and response statuses
REST-method | Example of REST query | Example of REST response | Response statuses | |||||||
---|---|---|---|---|---|---|---|---|---|---|
/stream/terminate |
| 200 - Stream termination request is received 404 - Stream not found |
Parameters
Parameter name | Description | Example |
---|---|---|
mediaSessionId | Media session identifier | 41c3f621-a847-4639 |
name | Stream name | streamName |
published | If true, the stream is published; if false, the stream is played | true |
status | Current status of the stream | PUBLISHING |
Stream filtering by parameters
...
Code Block | ||||
---|---|---|---|---|
| ||||
{"name": "streamName","status": "PUBLISHING"} |
Also all streams in certain mediasessions can be stopped
Code Block | ||||
---|---|---|---|---|
| ||||
{"mediaSessionIds":["41c3f621-a847-4639", "554916e0-931c-2479"]} |
The query without parameters will stop all the streams on serveror in one mediasession
Code Block | ||||
---|---|---|---|---|
| ||||
{"mediaSessionId":"41c3f621-a847-4639"} |
Sending the REST query to the WCS server
...
Symptoms: If an RTMFP stream is stopped on the server side and if that stream was published using the client2/examples/demo/streaming/flash_client/chat.html client, publishing of the stream stops, but stream session is not terminated. In the flashphoner.log file you can see the following messages: "Can't find mediasession".
Solution: To terminate the session, click the 'Stop video' button on the client page.