Red5 Documentation

Stream Manager 2.0 Proxy API

The Proxy service serves as a secure relay in to the cluster nodes, which do not have their own certificates.

WebRTC

WHIP

WebRTC HTTP Ingest Protocol — publishing.

The WHIP proxy receives traffic at the as/v1/proxy/whip endpoint:

https://as-test1.example.org:443/as/v1/proxy/whip/<streamGuid>

OPTIONS

streamGuid: String. Path param. Required. The context path and name of the stream, eg. live/stream1 or live/room2/stream12

host: String. Optional. The IP address of the Red5Pro server node to use. If omitted, the proxy will call the AS-Streams service “Get Server For Publish” using the specified nodeGroup.

nodeGroup: String. Optional. If host is omitted, nodeGroup is required.

transcode: Boolean. Optional (default false).

POST

host: String. Required. The IP address of the Red5Pro server node to use.

signal: Boolean. Optional (default true). Tell server to add the datachannel to SDP if true.

mode: String. Required. Publisher mode: live, record, append.

keyFramerate: Integer. Required. Key frame rate, in milliseconds.

PATCH

host: String. Required. The IP address of the Red5Pro server node to use.

DELETE

host: String. Required. The IP address of the Red5Pro server node to use.

WHEP

WebRTC HTTP Egress Protocol — subscribing.

The WHEP proxy receives traffic at the as/v1/proxy/whep endpoint:

https://as-test1.example.org:443/as/v1/proxy/whep/<streamGuid>

OPTIONS

streamGuid: String. Path param. Required. The context path and name of the stream, eg. live/stream1 or live/room2/stream12

host: String. Optional. The IP address of the Red5Pro server node to use. If ommitted, the proxy will call the AS-Streams service “Get Server For Publish” using the specified nodeGroup.

nodeGroup: String. Optional. If host is omitted, nodeGroup is required.

signal: Boolean. Optional (default false).

requestId: String. Required. Unique subscriber ID.

POST

streamGuid: String. Path param. Required. The context path and name of the stream, eg. live/stream1 or live/room2/stream12

host: String. Required. The IP address of the Red5Pro server node to use.

signal: Boolean. Optional (default true). Tell server to add the datachannel to SDP if true.

doNotSwitch: Booolean. Optional (default false). Subscriber flag to tell server not to switch streams based on bandwidth when viewing ABR.

requestId: String. Required. Unique subscriber ID.

PATCH

streamGuid: String. Path param. Required. The context path and name of the stream, eg. live/stream1 or live/room2/stream12

host: String. Required. The IP address of the Red5Pro server node to use.

requestId: String. Required. Unique subscriber ID.

DELETE

streamGuid: String. Path param. Required. The context path and name of the stream, eg. live/stream1 or live/room2/stream12

host: String. Required. The IP address of the Red5Pro server node to use.

requestId: String. Required. Unique subscriber ID.

WebSockets

WebRTC over WebSockets (both publish and subscribe).

The WebSockets proxy receives traffic at the as/v1/proxy/whep endpoint:

wss://as-test1.example.org/as/v1/proxy/ws/subscribe/live/stream1?id=subscriber-1b31&nodeGroup=allinone-oci-1

id is a unique client ID, passed along but not used by the Proxy.

host: String. Optional. The IP address of the Red5Pro server node to use. If ommitted, the proxy will call the AS-Streams service “Get Server For Publish” using the specified nodeGroup.

nodeGroup: String. Optional. If host is omitted, nodeGroup is required.

Plain HTTP

The plain HTTP proxy is used to access servlets and APIs hosted on the cluster nodes. It passes the body and all headers to target, returning all headers and body. It supports the HTTP methods GET, POST, PUT, and DELETE.

Query Parameters
target : the target cluster node URL (in URL-encoded form)

Example

curl -v https://as-test1.example.org/as/v1/proxy/forward/?target=http%3A%2F%2F10.0.0.7%3A5080%2Flive%2Fsubscribe.jsp%3Fhost%3D10.0.0.7

In this example, we request the proxy to GET http://10.0.0.7:5080/live/subscribe.jsp?host=10.0.0.7 (the subscribe page, HTML content).