pub enum Command {
JoinRoom {
member_id: MemberId,
credential: Credential,
capabilities: Capabilities,
},
LeaveRoom {
member_id: MemberId,
},
MakeSdpOffer {
peer_id: PeerId,
sdp_offer: String,
mids: HashMap<TrackId, String>,
transceivers_statuses: HashMap<TrackId, bool>,
},
MakeSdpAnswer {
peer_id: PeerId,
sdp_answer: String,
transceivers_statuses: HashMap<TrackId, bool>,
},
SetIceCandidate {
peer_id: PeerId,
candidate: IceCandidate,
},
AddPeerConnectionMetrics {
peer_id: PeerId,
metrics: PeerMetrics,
},
UpdateTracks {
peer_id: PeerId,
tracks_patches: Vec<TrackPatchCommand>,
},
SynchronizeMe {
state: Room,
},
}
Expand description
Possible commands sent by Web Client to Media Server.
Variants§
JoinRoom
Request to join a Room
.
Fields
credential: Credential
Credential
of the Member
to authenticate with.
capabilities: Capabilities
Capabilities
reported by Web Client (e.g. available codecs,
platform).
LeaveRoom
Request to leave a Room
.
MakeSdpOffer
Web Client sends SDP Offer.
Fields
mids: HashMap<TrackId, String>
Associations between Track
and transceiver’s
media description.
mid
is basically an ID of m=<media>
section in SDP.
MakeSdpAnswer
Web Client sends SDP Answer.
Fields
SetIceCandidate
Web Client sends an Ice Candidate.
Fields
candidate: IceCandidate
IceCandidate
sent by the Peer
.
AddPeerConnectionMetrics
Web Client sends Peer Connection metrics.
Fields
metrics: PeerMetrics
Metrics of the Peer
.
UpdateTracks
Web Client asks permission to update Track
s in the specified
Peer
. Media Server gives permission by sending
Event::PeerUpdated
.
Fields
tracks_patches: Vec<TrackPatchCommand>
Patches for updating the Track
s.
SynchronizeMe
Web Client asks Media Server to synchronize Client State with a Server State.
Implementations§
Source§impl Command
impl Command
Sourcepub fn dispatch_with<T: CommandHandler>(
self,
handler: &mut T,
) -> <T as CommandHandler>::Output
pub fn dispatch_with<T: CommandHandler>( self, handler: &mut T, ) -> <T as CommandHandler>::Output
Dispatches Command
with given CommandHandler
.