Versions Compared

Key

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

...

  1. The browser connects to the WCS1 server via Websocket and sends the publish command.
  2. The browser captures the microphone and the camera and sends the WebRTC stream to the server.
  3. The REST client sends to the WCS2 server the /pull/pull query.
  4. WCS2 requests the stream from WCS1.
  5. WCS2 receives the WebRTC stream from WCS1.
  6. The second browser establishes a connection to the WCS2 server via Websokcet and sends the play command.
  7. The second browser receives the WebRTC stream and plays this stream on the page.

REST-queries

 RESTREST-query must be an HTTP/HTTPS POST request as follows:

  • - HTTP: http://test.flashphoner.com:

...

  • 8081/rest-api/pull/rtmp/pull
  • - HTTPS: https://test.flashphoner.com:

...

  • 8444/rest-api/pull/rtmp/pull

Where:

  • test.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
  • - /pull/rtmp/pull - is the REST method used

 REST-methods and response statuses

...

Parameter name

Description

Example

uri

Websocket URL of the WebRTC streamWCS server

wss://demo.flashphoner.com:8443

localMediaSessionId

Session identifier

5a072377-73c1-4caf-abd3

remoteMediaSessionId

Session identifier on the remote server

12345678-abcd-dead-beaf

localStreamName

Local name assigned to the captured stream. By this name the stream can be requested from the WCS server

testStream

remoteStreamName

Captured stream name on the remote server

testStream

status

Current stream status

NEW

Configuration

By default, WebRTC stream is pulled over unsecure Websocket connection, i.e. WCS server URL has to be set as ws://demo.flashphoner.com:8080. To use Secure Websocket, the parameter must be set in file flashphoner.properties

Code Block
languagebash
themeRDark
wcs_agent_ssl=true

This change has to be made on both WCS servers: the server that publishes the stream and the server the stream is pulled to.

Quick manual on testing

1. For this test we use:

...