MSE protocol
version: 1.0
This protocol is used by media server engine (MSE) and clients for communication. Protocol is based on JSON RPC 2.0.
Example usage
- Install package using NPM:
npm i --save mse-proto
const WebSocket = const proto = const RequestFactory = protoRequestFactoryconst ResponseAdapter = protoResponseAdapter const wss = `wss://mse:443/` wsswss
Messages
Errors
- Invalid json object
- Method not found
- Invalid method parameter
- Invalid json rpc 2.0 object
- Authentication failure
- Unauthorized access
- Invalid call order
ping
- ping server. Method can be used as heartbeat.
ping request (client)
ping success response (server)
authentication
authentication request (client)
- A JWT token is used for authentication. Subsequent calls do NOT need the token.
authentication success response (server)
start
start request (client)
- This method is available only to authorized clients.
- Starts video service.
start success response (server)
whoami
whoami request (client)
- Available in development environment only.
- This method is available only to authorized clients.
whoami success response (server)
iceCandidate
iceCandidate request (client & server)
- This method is available only to authorized clients.
- This method is a notification. Server does NOT respond to it and client should not too.
sdpOffer
sdpOffer request (client & server)
- This method is available only to authorized clients.
- This method is a notification. Server does NOT respond to it and client should not too.
disconnect
disconnect request (client)
- This method is available only to authorized clients.
- This method is a notification. Server does NOT respond to it.
Chat message (client & server)
- NOT IMPLEMENTED
- This method is available only to authorized clients.
- This method is a notification. Server does NOT respond to it and client should not too.
Errors
Invalid json object
Invalid json rpc 2.0 object
Method not found
Invalid method parameter
Authentication failure
Unauthorized access
-
Accessing a protected method before authorization.
-
Available methods before authentication:
Invalid call order
- Calling a method before calling required methods before it.