#[non_exhaustive]pub enum Event {
Show 16 variants
Connected,
IceConnectionStateChange(IceConnectionState),
MediaAdded(MediaAdded),
MediaData(MediaData),
MediaChanged(MediaChanged),
ChannelOpen(ChannelId, String),
ChannelData(ChannelData),
ChannelClose(ChannelId),
PeerStats(PeerStats),
MediaIngressStats(MediaIngressStats),
MediaEgressStats(MediaEgressStats),
EgressBitrateEstimate(BweKind),
KeyframeRequest(KeyframeRequest),
StreamPaused(StreamPaused),
RtpPacket(RtpPacket),
RawPacket(Box<RawPacket>),
}
Expand description
Events produced by Rtc::poll_output()
.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connected
Emitted when we got ICE connection and established DTLS.
IceConnectionStateChange(IceConnectionState)
ICE connection state changes tells us whether the Rtc
instance is
connected to the peer or not.
MediaAdded(MediaAdded)
Upon adding new media to the session. 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)
Changes to the media may be emitted.
. Currently only covers a change of direction.
ChannelOpen(ChannelId, String)
A data channel has opened.
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()
.
For SdpApi
: The first ever data channel results in an SDP
negotiation, and this events comes at the end of that.
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
EgressBitrateEstimate(BweKind)
A new estimate from the bandwidth estimation subsystem.
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).
StreamPaused(StreamPaused)
Whether an incoming encoded stream is paused.
This means the stream has not received any data for some time (default 1.5 seconds).
RtpPacket(RtpPacket)
Incoming RTP data.
RawPacket(Box<RawPacket>)
Debug output of incoming and outgoing RTCP/RTP packets.
Enable using RtcConfig::enable_raw_packets()
.
This clones data, and is therefore expensive.
Should not be enabled outside of tests and troubleshooting.