diff --git a/crates/call/src/room.rs b/crates/call/src/room.rs index 32f22d41e0..d1d2c5433e 100644 --- a/crates/call/src/room.rs +++ b/crates/call/src/room.rs @@ -334,7 +334,7 @@ impl Room { let tracks = room.remote_video_tracks(&peer_id.0.to_string()); dbg!(tracks.len()); for track in tracks { - dbg!(track.id(), track.publisher_id()); + dbg!(track.sid(), track.publisher_id()); this.remote_video_track_updated( RemoteVideoTrackUpdate::Subscribed(track), cx, @@ -386,9 +386,9 @@ impl Room { ) -> Result<()> { match change { RemoteVideoTrackUpdate::Subscribed(track) => { - dbg!(track.publisher_id(), track.id()); + dbg!(track.publisher_id(), track.sid()); let peer_id = PeerId(track.publisher_id().parse()?); - let track_id = track.id().to_string(); + let track_id = track.sid().to_string(); let participant = self .remote_participants .get_mut(&peer_id) @@ -600,10 +600,10 @@ impl Room { }; cx.foreground().spawn(async move { - let display = live_kit_client::display_sources().await?; - // let display = displays - // .first() - // .ok_or_else(|| anyhow!("no display found"))?; + let displays = live_kit_client::display_sources().await?; + let display = displays + .first() + .ok_or_else(|| anyhow!("no display found"))?; let track = LocalVideoTrack::screen_share_for_display(&display); room.publish_video_track(&track).await?; Ok(()) diff --git a/crates/live_kit_client/examples/test_app.rs b/crates/live_kit_client/examples/test_app.rs index d35e9fc549..94c324becf 100644 --- a/crates/live_kit_client/examples/test_app.rs +++ b/crates/live_kit_client/examples/test_app.rs @@ -1,4 +1,3 @@ -use core_foundation::base::CFRetain; use futures::StreamExt; use gpui::{ actions, diff --git a/crates/live_kit_client/src/live_kit_client.rs b/crates/live_kit_client/src/live_kit_client.rs index ccd0ba6775..af46fbb2e0 100644 --- a/crates/live_kit_client/src/live_kit_client.rs +++ b/crates/live_kit_client/src/live_kit_client.rs @@ -16,8 +16,6 @@ use std::{ }; pub type Sid = String; -#[allow(non_camel_case_types)] -pub type sid = str; extern "C" { fn LKRelease(object: *const c_void); @@ -278,24 +276,24 @@ impl Drop for LocalVideoTrack { #[derive(Debug)] pub struct RemoteVideoTrack { native_track: *const c_void, - id: Sid, + sid: Sid, publisher_id: String, } impl RemoteVideoTrack { - pub fn new(native_track: *const c_void, id: Sid, publisher_id: String) -> Self { + fn new(native_track: *const c_void, sid: Sid, publisher_id: String) -> Self { unsafe { CFRetain(native_track); } Self { native_track, - id, + sid, publisher_id, } } - pub fn id(&self) -> &str { - &self.id + pub fn sid(&self) -> &str { + &self.sid } pub fn publisher_id(&self) -> &str {