Expose a single updates
stream from live_kit_client::Room
Co-authored-by: Julia <julia@zed.dev>
This commit is contained in:
parent
0dca67fc33
commit
2d1eb0c56c
5 changed files with 95 additions and 173 deletions
|
@ -1,3 +1,5 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
#[cfg(not(any(test, feature = "test-support")))]
|
||||
pub mod prod;
|
||||
|
||||
|
@ -9,3 +11,21 @@ pub mod test;
|
|||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub use test::*;
|
||||
|
||||
pub type Sid = String;
|
||||
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
pub enum ConnectionState {
|
||||
Disconnected,
|
||||
Connected { url: String, token: String },
|
||||
}
|
||||
|
||||
#[derive(Clone)]
|
||||
pub enum RoomUpdate {
|
||||
ActiveSpeakersChanged { speakers: Vec<Sid> },
|
||||
RemoteAudioTrackMuteChanged { track_id: Sid, muted: bool },
|
||||
SubscribedToRemoteVideoTrack(Arc<RemoteVideoTrack>),
|
||||
SubscribedToRemoteAudioTrack(Arc<RemoteAudioTrack>, Arc<RemoteTrackPublication>),
|
||||
UnsubscribedFromRemoteVideoTrack { publisher_id: Sid, track_id: Sid },
|
||||
UnsubscribedFromRemoteAudioTrack { publisher_id: Sid, track_id: Sid },
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue