#  | # WebRTC | # PhenixRTC

PCast™

# Backend

Operations require your application's secret. Thus they must be performed on your backend.

# Client

Operations require session-specific tokens.

1

Create an authenticationToken using the application's applicationId and secret.

2

Pass authenticationToken to client.

2

Connect to PCast™ using the authenticationToken.

3
4

Pass sessionId to server.

4

## Option A: View a stream

## Option B: Publish a stream

A5

Select an available stream.

Stream:

Get local user media from camera.

###

B5.1
B5.2

Create a publish streamToken using the sessionId.

B5.3

Pass streamToken to client.

B5.3

Publish stream from local user media using streamToken.

B5.4
B5.5

Pass streamId to server.

B5.5
6

Create a viewing streamToken using the sessionId and originStreamId.

7

Pass streamToken to client.

7

Subscribe to a stream using the streamToken.

8

# Video Stream

The stream will be terminated automatically after 30 seconds.