diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3c9c9481e7..dab6b158c2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -39,6 +39,7 @@ jobs:
uses: actions/checkout@v2
with:
clean: false
+ submodules: 'recursive'
- name: Run tests
run: cargo test --workspace --no-fail-fast
@@ -76,6 +77,7 @@ jobs:
uses: actions/checkout@v2
with:
clean: false
+ submodules: 'recursive'
- name: Validate version
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000000..b1dad4cbbe
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "crates/live_kit_server/protocol"]
+ path = crates/live_kit_server/protocol
+ url = https://github.com/livekit/protocol
diff --git a/Cargo.lock b/Cargo.lock
index d960b467ad..65b562c8ed 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -172,13 +172,13 @@ dependencies = [
[[package]]
name = "async-broadcast"
-version = "0.3.4"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "90622698a1218e0b2fb846c97b5f19a0831f6baddee73d9454156365ccfa473b"
+checksum = "6d26004fe83b2d1cd3a97609b21e39f9a31535822210fe83205d2ce48866ea61"
dependencies = [
- "easy-parallel",
"event-listener",
"futures-core",
+ "parking_lot 0.12.1",
]
[[package]]
@@ -716,10 +716,13 @@ name = "call"
version = "0.1.0"
dependencies = [
"anyhow",
+ "async-broadcast",
"client",
"collections",
"futures 0.3.24",
"gpui",
+ "live_kit_client",
+ "media",
"postage",
"project",
"util",
@@ -791,34 +794,6 @@ dependencies = [
"winx",
]
-[[package]]
-name = "capture"
-version = "0.1.0"
-dependencies = [
- "anyhow",
- "bindgen",
- "block",
- "byteorder",
- "bytes 1.2.1",
- "cocoa",
- "core-foundation",
- "core-graphics",
- "foreign-types",
- "futures 0.3.24",
- "gpui",
- "hmac 0.12.1",
- "jwt",
- "live_kit",
- "log",
- "media",
- "objc",
- "parking_lot 0.11.2",
- "postage",
- "serde",
- "sha2 0.10.6",
- "simplelog",
-]
-
[[package]]
name = "castaway"
version = "0.1.2"
@@ -1076,6 +1051,8 @@ dependencies = [
"language",
"lazy_static",
"lipsum",
+ "live_kit_client",
+ "live_kit_server",
"log",
"lsp",
"nanoid",
@@ -3165,17 +3142,54 @@ dependencies = [
]
[[package]]
-name = "live_kit"
+name = "live_kit_client"
version = "0.1.0"
dependencies = [
"anyhow",
+ "async-broadcast",
+ "async-trait",
+ "block",
+ "byteorder",
+ "bytes 1.2.1",
+ "cocoa",
+ "collections",
"core-foundation",
"core-graphics",
+ "foreign-types",
"futures 0.3.24",
+ "gpui",
+ "hmac 0.12.1",
+ "jwt",
+ "lazy_static",
+ "live_kit_server",
+ "log",
"media",
+ "nanoid",
+ "objc",
"parking_lot 0.11.2",
+ "postage",
"serde",
"serde_json",
+ "sha2 0.10.6",
+ "simplelog",
+]
+
+[[package]]
+name = "live_kit_server"
+version = "0.1.0"
+dependencies = [
+ "anyhow",
+ "async-trait",
+ "futures 0.3.24",
+ "hmac 0.12.1",
+ "jwt",
+ "log",
+ "prost 0.8.0",
+ "prost-build",
+ "prost-types 0.8.0",
+ "reqwest",
+ "serde",
+ "sha2 0.10.6",
]
[[package]]
@@ -4332,7 +4346,7 @@ dependencies = [
"multimap",
"petgraph",
"prost 0.9.0",
- "prost-types",
+ "prost-types 0.9.0",
"regex",
"tempfile",
"which",
@@ -4364,6 +4378,16 @@ dependencies = [
"syn",
]
+[[package]]
+name = "prost-types"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b"
+dependencies = [
+ "bytes 1.2.1",
+ "prost 0.8.0",
+]
+
[[package]]
name = "prost-types"
version = "0.9.0"
diff --git a/assets/icons/disable_screen_sharing_12.svg b/assets/icons/disable_screen_sharing_12.svg
new file mode 100644
index 0000000000..c2a4edd45b
--- /dev/null
+++ b/assets/icons/disable_screen_sharing_12.svg
@@ -0,0 +1,3 @@
+
diff --git a/assets/icons/enable_screen_sharing_12.svg b/assets/icons/enable_screen_sharing_12.svg
new file mode 100644
index 0000000000..6ae37649d2
--- /dev/null
+++ b/assets/icons/enable_screen_sharing_12.svg
@@ -0,0 +1,3 @@
+
diff --git a/crates/call/Cargo.toml b/crates/call/Cargo.toml
index e725c7cfe3..a7a3331d20 100644
--- a/crates/call/Cargo.toml
+++ b/crates/call/Cargo.toml
@@ -12,6 +12,7 @@ test-support = [
"client/test-support",
"collections/test-support",
"gpui/test-support",
+ "live_kit_client/test-support",
"project/test-support",
"util/test-support"
]
@@ -20,10 +21,13 @@ test-support = [
client = { path = "../client" }
collections = { path = "../collections" }
gpui = { path = "../gpui" }
+live_kit_client = { path = "../live_kit_client" }
+media = { path = "../media" }
project = { path = "../project" }
util = { path = "../util" }
anyhow = "1.0.38"
+async-broadcast = "0.4"
futures = "0.3"
postage = { version = "0.4.1", features = ["futures-traits"] }
@@ -31,5 +35,6 @@ postage = { version = "0.4.1", features = ["futures-traits"] }
client = { path = "../client", features = ["test-support"] }
collections = { path = "../collections", features = ["test-support"] }
gpui = { path = "../gpui", features = ["test-support"] }
+live_kit_client = { path = "../live_kit_client", features = ["test-support"] }
project = { path = "../project", features = ["test-support"] }
util = { path = "../util", features = ["test-support"] }
diff --git a/crates/call/src/call.rs b/crates/call/src/call.rs
index 6b06d04375..106006007c 100644
--- a/crates/call/src/call.rs
+++ b/crates/call/src/call.rs
@@ -1,11 +1,11 @@
-mod participant;
+pub mod participant;
pub mod room;
use anyhow::{anyhow, Result};
use client::{proto, Client, TypedEnvelope, User, UserStore};
use gpui::{
AppContext, AsyncAppContext, Entity, ModelContext, ModelHandle, MutableAppContext,
- Subscription, Task,
+ Subscription, Task, WeakModelHandle,
};
pub use participant::ParticipantLocation;
use postage::watch;
@@ -27,6 +27,7 @@ pub struct IncomingCall {
}
pub struct ActiveCall {
+ location: Option>,
room: Option<(ModelHandle, Vec)>,
incoming_call: (
watch::Sender