Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

1) Enable the keep-alive setting in flashphoner.properties

Code Block
languagebash
themeRDark
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
languagebash
themeRDark
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:

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

Code Block
languagejs
themeRDark
{
    "mediaSessionId" : "41c3f621-a847-4639"
}

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
languagejs
themeRDark
{"name": "streamName","status": "PUBLISHING"}

Also all streams in certain mediasessions can be stopped

Code Block
languagejs
themeRDark
{"mediaSessionIds":["41c3f621-a847-4639", "554916e0-931c-2479"]}

The query without parameters will stop all the streams on serveror in one mediasession

Code Block
languagejs
themeRDark
{"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.