#[non_exhaustive]
pub enum Event {
IceConnectionStateChange(IceConnectionState),
MediaAdded(MediaAdded),
MediaData(MediaData),
MediaChanged(MediaChanged),
KeyframeRequest(KeyframeRequest),
ChannelOpen(ChannelId, String),
ChannelData(ChannelData),
ChannelClose(ChannelId),
PeerStats(PeerStats),
MediaIngressStats(MediaIngressStats),
MediaEgressStats(MediaEgressStats),
}
Expand description
Events produced by Rtc::poll_output()
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
IceConnectionStateChange(IceConnectionState)
ICE connection state changes tells us whether the Rtc
instance is
connected to the peer or not.
MediaAdded(MediaAdded)
Upon completing an SDP negotiation, and there are new m-lines. The lines are emitted.
Upon this event, the Media
instance is available via Rtc::media()
.
MediaData(MediaData)
Incoming media data sent by the remote peer.
MediaChanged(MediaChanged)
Upon SDP renegotiation, a change event may be emitted.
. Currently only covers a change of direction.
KeyframeRequest(KeyframeRequest)
Incoming keyframe request for media that we are sending to the remote peer.
The request is either PLI (Picture Loss Indication) or FIR (Full Intra Request).
ChannelOpen(ChannelId, String)
A data channel has opened. The first ever data channel results in an SDP negotiation, and this events comes at the end of that.
The string is the channel label which is set by the opening peer and can be used to identify the purpose of the channel when there are more than one.
The negotiation is to set up an SCTP association via DTLS. Subsequent data channels reuse the same association.
Upon this event, the Channel
can be obtained via Rtc::channel()
.
ChannelData(ChannelData)
Incoming data channel data from the remote peer.
ChannelClose(ChannelId)
A data channel has been closed.
PeerStats(PeerStats)
Statistics event for the Rtc instance
Includes both media traffic (rtp payload) as well as all traffic
MediaIngressStats(MediaIngressStats)
Aggregated statistics for each media (mid, rid) in the ingress direction
MediaEgressStats(MediaEgressStats)
Aggregated statistics for each media (mid, rid) in the egress direction