Enum medea_jason::peer::PeerEvent[][src]

pub enum PeerEvent {
    IceCandidateDiscovered {
        peer_id: Id,
        candidate: String,
        sdp_m_line_index: Option<u16>,
        sdp_mid: Option<String>,
    },
    NewRemoteTrack {
        sender_id: MemberId,
        track: Track,
    },
    NewLocalTrack {
        local_track: Rc<Track>,
    },
    IceConnectionStateChanged {
        peer_id: Id,
        ice_connection_state: IceConnectionState,
    },
    ConnectionStateChanged {
        peer_id: Id,
        peer_connection_state: PeerConnectionState,
    },
    StatsUpdate {
        peer_id: Id,
        stats: RtcStats,
    },
    FailedLocalMedia {
        error: JasonError,
    },
    NewSdpAnswer {
        peer_id: PeerId,
        sdp_answer: String,
        transceivers_statuses: HashMap<TrackId, bool>,
    },
    NewSdpOffer {
        peer_id: PeerId,
        sdp_offer: String,
        mids: HashMap<TrackId, String>,
        transceivers_statuses: HashMap<TrackId, bool>,
    },
    MediaUpdateCommand {
        command: Command,
    },
}

Events emitted from RtcPeerConnection.

Variants

IceCandidateDiscovered

RtcPeerConnection discovered new ICE candidate.

Wrapper around RTCPeerConnectionIceEvent.

Fields of IceCandidateDiscovered

peer_id: Id

ID of the PeerConnection that discovered new ICE candidate.

candidate: String

candidate field of the discovered RTCIceCandidate.

sdp_m_line_index: Option<u16>sdp_mid: Option<String>

sdpMid field of the discovered RTCIceCandidate.

NewRemoteTrack

RtcPeerConnection received new remote::Track from remote sender.

Fields of NewRemoteTrack

sender_id: MemberId

Remote Member ID.

track: Track

Received remote::Track.

NewLocalTrack

RtcPeerConnection sent new local track to remote members.

Fields of NewLocalTrack

local_track: Rc<Track>

Local local::Track that is sent to remote members.

IceConnectionStateChanged

RtcPeerConnection’s ICE connection state changed.

Fields of IceConnectionStateChanged

peer_id: Id

ID of the PeerConnection that sends iceconnectionstatechange event.

ice_connection_state: IceConnectionState
ConnectionStateChanged

RtcPeerConnection’s connection state changed.

Fields of ConnectionStateChanged

peer_id: Id

ID of the PeerConnection that sends connectionstatechange event.

peer_connection_state: PeerConnectionState
StatsUpdate

Fields of StatsUpdate

peer_id: Id

ID of the PeerConnection for which RtcStats was sent.

stats: RtcStats
FailedLocalMedia

PeerConnection::update_local_stream was failed, so on_failed_local_stream callback should be called.

Fields of FailedLocalMedia

error: JasonError

Reasons of local media updating fail.

NewSdpAnswer

Component generated a new SDP answer.

Fields of NewSdpAnswer

peer_id: PeerId

ID of the PeerConnection for which SDP answer was generated.

sdp_answer: String

SDP Answer of the Peer.

transceivers_statuses: HashMap<TrackId, bool>

Statuses of Peer transceivers.

NewSdpOffer

Component generated a new SDP offer.

Fields of NewSdpOffer

peer_id: PeerId

ID of the PeerConnection for which SDP offer was generated.

sdp_offer: String

SDP Offer of the PeerConnection.

mids: HashMap<TrackId, String>

Associations between Track and transceiver’s media description.

mid is basically an ID of m=<media> section in SDP.

transceivers_statuses: HashMap<TrackId, bool>

Statuses of PeerConnection transceivers.

MediaUpdateCommand

Component resends his intentions.

Fields of MediaUpdateCommand

command: Command

Actual intentions of the Component.

Implementations

impl PeerEvent[src]

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

Dispatches PeerEvent with given PeerEventHandler.

Trait Implementations

impl Clone for PeerEvent[src]

Auto Trait Implementations

impl !RefUnwindSafe for PeerEvent

impl !Send for PeerEvent

impl !Sync for PeerEvent

impl Unpin for PeerEvent

impl !UnwindSafe for PeerEvent

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> 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.

impl<E> WrapTraced<E> for E[src]