Crate medea_client_api_proto

Source
Expand description

§Medea Client API protocol

Latest version Rust 1.85+ Unsafe Forbidden Rust docs

API docs | Changelog

Client API protocol implementation for Medea media server.

§Cargo features

  • client (default): Enables Deserialize implementation for Events, and Serialize implementation for Commands.
  • server: Enables Deserialize implementation for Commands, and Serialize implementation for Events.
  • 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§

AudioSettings
Settings of an audio Track.
Capabilities
Client capabilities (e.g. available codecs, platform).
CloseDescription
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.
EncodingParameters
Representation of an RTCRtpEncodingParameters.
IceCandidate
Representation of RTCIceCandidateInit object.
IceCandidateError
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).
MemberId
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.
TrackPatchCommand
Patch of a Track which Web Client can request with a Command::UpdateTracks.
TrackPatchEvent
Patch of a Track which Media Server can send with an Event::PeerUpdated.
VideoSettings
Settings of a video Track.

Enums§

ClientMsg
Message by Web Client to Media Server.
CloseReason
Reason of disconnecting Web Client from Media Server.
Command
Possible commands sent by Web Client to Media Server.
ConnectionMode
Indication whether a Peer is working in a P2P mesh or SFU mode.
ConnectionQualityScore
Estimated connection quality.
Direction
Possible directions of a Track.
Event
Possible WebSocket messages sent from Media Server to Web Client.
IceConnectionState
PeerConnection’s ICE connection state.
MediaDirection
Media exchange direction of a Track.
MediaSourceKind
Possible media sources of a video Track.
MediaType
Possible media types of a Track.
NegotiationRole
Peer’s negotiation role.
PeerConnectionError
Possible errors related to a PeerConnection.
PeerConnectionState
PeerConnection’s connection state.
PeerMetrics
Web Client’s PeerConnection metrics.
PeerUpdate
Track update which should be applied to the Peer.
ScalabilityMode
[Scalability mode] preference for SVC (Scalable Video Coding).
ServerMsg
Message sent by Media Server to Web Client.

Traits§

CommandHandler
Handler of Command variants.
EventHandler
Handler of Event variants.
Incrementable
Value being able to be increment by 1.