Enum str0m::Event

source ·
#[non_exhaustive]
pub enum Event {
    IceConnectionStateChange(IceConnectionState),
    MediaAdded(MediaAdded),
    MediaData(MediaData),
    MediaChanged(MediaChanged),
    KeyframeRequest(KeyframeRequest),
    ChannelOpen(ChannelIdString),
    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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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(ChannelIdString)

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

Trait Implementations§

Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more