Move ownership of MacOSDisplay to the rust side

This commit is contained in:
Antonio Scandurra
2022-10-17 09:59:16 +02:00
parent 4222f86537
commit c25acc155d
3 changed files with 5 additions and 15 deletions
+2 -8
View File
@@ -59,14 +59,8 @@ fn main() {
room2.connect(&live_kit_url, &user2_token).await.unwrap();
cx.add_window(Default::default(), |cx| ScreenCaptureView::new(room2, cx));
let display = live_kit::display_sources()
.await
.unwrap()
.into_iter()
.next()
.unwrap();
let track = LocalVideoTrack::screen_share_for_display(display);
let display_sources = live_kit::display_sources().await.unwrap();
let track = LocalVideoTrack::screen_share_for_display(display_sources.first().unwrap());
room1.publish_video_track(&track).await.unwrap();
})
.detach();