Expand description
§Medea Client API protocol
Client API protocol implementation for Medea media server.
§Cargo features
client
(default): EnablesDeserialize
implementation forEvent
s, andSerialize
implementation forCommand
s.server
: EnablesDeserialize
implementation forCommand
s, andSerialize
implementation forEvent
s.extended-stats
: Enables unused RTC Stats DTOs.
§Contribution guide
Avoid using 64 bit types. medea-jason
uses wasm-bindgen to interop with JS, and exposing 64 bit types to JS will make wasm-bindgen to use BigInt64Array / BigUint64Array in its JS glue, which are not implemented or were implemented too recently in some UAs.
So, it’s better to keep protocol 64-bit-types-clean to avoid things breaking by accident.
§License
Copyright © 2019-2025 Instrumentisto Team https://github.com/instrumentisto
This software is subject to the terms of the Blue Oak Model License 1.0.0. If a copy of the BlueOak-1.0.0 license was not distributed with this file, You can obtain one at https://blueoakcouncil.org/license/1.0.0.
Modules§
- state
- State of the Media Server which will be used for Client and Server synchronization.
- stats
- Contains DTOs for RTCPeerConnection metrics.
Structs§
- Audio
Settings - Settings of an audio
Track
. - Capabilities
- Client capabilities (e.g. available codecs, platform).
- Close
Description - Description which is sent in Close WebSocket frame from Media Server to Web Client.
- Codec
- Representation of an RTCRtpCodec.
- Credential
- Credential used for a
Member
authentication. - Encoding
Parameters - Representation of an RTCRtpEncodingParameters.
- IceCandidate
- Representation of RTCIceCandidateInit object.
- IceCandidate
Error - Error occurred with an ICE candidate from a
PeerConnection
. - IcePassword
- Secret used for a client authentication on an
IceServer
. - IceServer
- Representation of RTCIceServer (item of
iceServers
field from RTCConfiguration). - Member
Id - ID of a
Member
. - PeerId
- ID of a
Peer
. - RoomId
- ID of a
Room
. - RpcSettings
- RPC settings of Web Client received from Media Server.
- Track
- Track with a
Direction
. - TrackId
- ID of a
MediaTrack
. - Track
Patch Command - Patch of a
Track
which Web Client can request with aCommand::UpdateTracks
. - Track
Patch Event - Patch of a
Track
which Media Server can send with anEvent::PeerUpdated
. - Video
Settings - Settings of a video
Track
.
Enums§
- Client
Msg - Message by Web Client to Media Server.
- Close
Reason - Reason of disconnecting Web Client from Media Server.
- Command
- Possible commands sent by Web Client to Media Server.
- Connection
Mode - Indication whether a
Peer
is working in a P2P mesh or SFU mode. - Connection
Quality Score - Estimated connection quality.
- Direction
- Possible directions of a
Track
. - Event
- Possible WebSocket messages sent from Media Server to Web Client.
- IceConnection
State PeerConnection
’s ICE connection state.- Media
Direction - Media exchange direction of a
Track
. - Media
Source Kind - Possible media sources of a video
Track
. - Media
Type - Possible media types of a
Track
. - Negotiation
Role Peer
’s negotiation role.- Peer
Connection Error - Possible errors related to a
PeerConnection
. - Peer
Connection State PeerConnection
’s connection state.- Peer
Metrics - Web Client’s
PeerConnection
metrics. - Peer
Update Track
update which should be applied to thePeer
.- Scalability
Mode - [Scalability mode] preference for SVC (Scalable Video Coding).
- Server
Msg - Message sent by Media Server to Web Client.
Traits§
- Command
Handler - Handler of
Command
variants. - Event
Handler - Handler of
Event
variants. - Incrementable
- Value being able to be increment by
1
.