core: add webrtc-rs (validated host + iOS); SSE forwards clipboard only
Add the webrtc dependency that the in-core RTC transport will use. Verified it cross-compiles to aarch64-apple-ios, confirming RTC can live in the shared core and reach every native platform from one implementation (the browser keeps native RTCPeerConnection and interops over the wire). Also fix a latent bug: the SSE transport forwarded every message type to the sink, so a peer's presence/signal chirps would leak into the clipboard feed. Now SSE forwards only clipboard; presence/signal belong to the RTC layer. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Generated
+1522
-8
File diff suppressed because it is too large
Load Diff
@@ -22,3 +22,4 @@ serde_json = "1"
|
|||||||
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream", "json"] }
|
reqwest = { version = "0.12", default-features = false, features = ["rustls-tls", "stream", "json"] }
|
||||||
tokio = { version = "1", features = ["rt-multi-thread", "time", "sync", "macros"] }
|
tokio = { version = "1", features = ["rt-multi-thread", "time", "sync", "macros"] }
|
||||||
futures-util = "0.3"
|
futures-util = "0.3"
|
||||||
|
webrtc = "0.17.1"
|
||||||
|
|||||||
+3
-1
@@ -275,7 +275,9 @@ impl SseTransport {
|
|||||||
if line.is_empty() {
|
if line.is_empty() {
|
||||||
if !data.is_empty() {
|
if !data.is_empty() {
|
||||||
if let Ok(m) = serde_json::from_slice::<Message>(&data) {
|
if let Ok(m) = serde_json::from_slice::<Message>(&data) {
|
||||||
if m.from != self.cfg.from {
|
// Clipboard only — presence/signal chirps on the bus
|
||||||
|
// belong to the RTC layer, not the feed.
|
||||||
|
if m.from != self.cfg.from && (m.kind.is_empty() || m.kind == "clipboard") {
|
||||||
sink(m); // engine de-dups + forwards to handler
|
sink(m); // engine de-dups + forwards to handler
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user