pub enum Command {
JoinRoom {
member_id: MemberId,
credential: Credential,
},
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: CredentialCredential of the Member to authenticate with.
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: IceCandidateIceCandidate sent by the Peer.
AddPeerConnectionMetrics
Web Client sends Peer Connection metrics.
Fields
§
metrics: PeerMetricsMetrics of the Peer.
UpdateTracks
Web Client asks permission to update Tracks in the specified
Peer. Media Server gives permission by sending
Event::PeerUpdated.
Fields
§
tracks_patches: Vec<TrackPatchCommand>Patches for updating the Tracks.
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.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Command
impl<'de> Deserialize<'de> for Command
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Command
Auto Trait Implementations§
impl Freeze for Command
impl RefUnwindSafe for Command
impl Send for Command
impl Sync for Command
impl Unpin for Command
impl UnwindSafe for Command
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more