Enum medea_client_api_proto::Event[][src]

pub enum Event {
    RoomJoined {
        member_id: MemberId,
    },
    RoomLeft {
        close_reason: CloseReason,
    },
    PeerCreated {
        peer_id: PeerId,
        negotiation_role: NegotiationRole,
        tracks: Vec<Track>,
        ice_servers: Vec<IceServer>,
        force_relay: bool,
    },
    SdpAnswerMade {
        peer_id: PeerId,
        sdp_answer: String,
    },
    LocalDescriptionApplied {
        peer_id: PeerId,
        sdp_offer: String,
    },
    IceCandidateDiscovered {
        peer_id: PeerId,
        candidate: IceCandidate,
    },
    PeersRemoved {
        peer_ids: Vec<PeerId>,
    },
    PeerUpdated {
        peer_id: PeerId,
        updates: Vec<PeerUpdate>,
        negotiation_role: Option<NegotiationRole>,
    },
    ConnectionQualityUpdated {
        partner_member_id: MemberId,
        quality_score: ConnectionQualityScore,
    },
    StateSynchronized {
        state: Room,
    },
}

WebSocket message from Medea to Jason.

Variants

RoomJoined

Media Server notifies Client that he joined Room.

Fields of RoomJoined

member_id: MemberId

ID of Member which joined Room.

RoomLeft

Media Server notifies Client that he left Room.

Fields of RoomLeft

close_reason: CloseReason

CloseReason with which Client was left.

PeerCreated

Media Server notifies Web Client about necessity of RTCPeerConnection creation.

Fields of PeerCreated

peer_id: PeerIdnegotiation_role: NegotiationRoletracks: Vec<Track>ice_servers: Vec<IceServer>force_relay: bool
SdpAnswerMade

Media Server notifies Web Client about necessity to apply specified SDP Answer to Web Client’s RTCPeerConnection.

Fields of SdpAnswerMade

peer_id: PeerIdsdp_answer: String
LocalDescriptionApplied

Media Server notifies Web Client that his SDP offer was applied.

Fields of LocalDescriptionApplied

peer_id: PeerIdsdp_offer: String
IceCandidateDiscovered

Media Server notifies Web Client about necessity to apply specified ICE Candidate.

Fields of IceCandidateDiscovered

peer_id: PeerIdcandidate: IceCandidate
PeersRemoved

Media Server notifies Web Client about necessity of RTCPeerConnection close.

Fields of PeersRemoved

peer_ids: Vec<PeerId>
PeerUpdated

Media Server notifies about necessity to update Tracks in specified Peer.

Fields of PeerUpdated

peer_id: PeerId

PeerId of Peer where Tracks should be updated.

updates: Vec<PeerUpdate>

List of PeerUpdates which should be applied.

negotiation_role: Option<NegotiationRole>

Negotiation role basing on which should be sent Command::MakeSdpOffer or Command::MakeSdpAnswer.

If None then no (re)negotiation should be done.

ConnectionQualityUpdated

Media Server notifies about connection quality score update.

Fields of ConnectionQualityUpdated

partner_member_id: MemberId

Partner MemberId of the Peer.

quality_score: ConnectionQualityScore

Estimated connection quality.

StateSynchronized

Media Server synchronizes Web Client about State synchronization.

Fields of StateSynchronized

state: Room

Implementations

impl Event[src]

pub async fn dispatch_with<T: EventHandler>(
    self,
    handler: &T
) -> <T as EventHandler>::Output
[src]

Dispatches Event with given EventHandler.

Trait Implementations

impl Clone for Event[src]

impl Debug for Event[src]

impl<'de> Deserialize<'de> for Event[src]

impl Eq for Event[src]

impl PartialEq<Event> for Event[src]

impl Serialize for Event[src]

impl StructuralEq for Event[src]

impl StructuralPartialEq for Event[src]

Auto Trait Implementations

impl RefUnwindSafe for Event

impl Send for Event

impl Sync for Event

impl Unpin for Event

impl UnwindSafe for Event

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.