#[non_exhaustive]pub enum ClientEvent {
Connected {
properties: Vec<(String, Amf0Value)>,
},
StreamCreated {
stream_id: u32,
},
Publishing,
Playing {
recorded: bool,
},
Media {
flv: Vec<u8>,
},
StreamEnded,
Error {
code: String,
description: String,
},
Closed,
Damage(Box<Damage>),
}Expand description
Typed events ClientSession::handle_data surfaces.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Connected
Server accepted connect.
StreamCreated
Server allocated a stream id.
Publishing
Server accepted publish — session is now publishing.
Playing
Server accepted play (NetStream.Play.Start): media follows. Play mode only.
Fields
Media
One FLV chunk of played media: the payload of a single Audio(8)/Video(9)/Data-AMF0(18)
message as an FLV tag (+ PreviousTagSize), the very first chunk prefixed with the FLV
file header. Concatenating every chunk in order yields a valid FLV stream. Play mode only.
StreamEnded
The played stream ended: User Control Stream EOF (§6.7) or NetStream.Play.Stop /
NetStream.Play.Complete. Play mode only.
Error
Server returned an error.
Closed
Session closed.
Damage(Box<Damage>)
Content this session skipped or repaired — the one
broadcast_core::damage::Damage report, in wire order with the
events around it. Whether it also stops the session is the caller’s
RtmpClientConfig::damage_policy. Boxed so a report does not
enlarge every event in the crate.