Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b861454
feat: commit initial data streams v2 implementation
1egoman Jun 26, 2026
87b96c7
feat: add ability to render data streams in wgpu_room example app
1egoman Jun 26, 2026
ca896ff
feat: render participant capabilities and client protocol versions
1egoman Jun 26, 2026
833b6ee
fix: Create data_streams_v2.md
1egoman Jun 26, 2026
46a0ac0
fix: remove ClientCapability from prelude
1egoman Jul 1, 2026
c92a56f
feat: allow data stream compress option to be toggled via livekit-ffi
1egoman Jul 1, 2026
7dcdde1
fix: run cargo fmt
1egoman Jul 1, 2026
5952b79
generated protobuf
github-actions[bot] Jul 1, 2026
3ec690a
fix: address toc-tou issue with decompressor state
1egoman Jul 1, 2026
0d93e09
fix: cleanup data stream v2 test fixture initialization
1egoman Jul 1, 2026
7162dbc
feat: make client capabilities proto deserialization use TryFrom
1egoman Jul 1, 2026
10c34c7
fix: run cargo fmt
1egoman Jul 1, 2026
ae7c6d1
fix: remove dead code
1egoman Jul 1, 2026
d537a7f
fix: add missing data_streams_ui.rs file
1egoman Jul 1, 2026
4c5138f
fix: bump protocol version to try to fix ci build error
1egoman Jul 1, 2026
8e7509f
generated protobuf
github-actions[bot] Jul 1, 2026
f9449ca
fix: downgrade protocol to before data track schema metadata
1egoman Jul 1, 2026
3768723
refactor: convert data stream open tuple to struct and add is_compres…
1egoman Jul 1, 2026
db5c6aa
feat: add is_compressed / is_inline to ByteStreamInfo / TextStreamInfo
1egoman Jul 1, 2026
e8d64d2
Revert "refactor: convert data stream open tuple to struct and add is…
1egoman Jul 1, 2026
c70a15e
feat: explicitly check is_compressed / is_inline in e2e tests
1egoman Jul 1, 2026
c8d4a44
fix: add e2e test that tests compress=false path
1egoman Jul 1, 2026
03c81b3
feat: add e2e feature on compressed / inline fields
1egoman Jul 1, 2026
ea5514f
feat: get random bytes e2e test to pass by using much higher quality …
1egoman Jul 1, 2026
7495a24
fix: comment out part of old example code
1egoman Jul 1, 2026
8b7ec4d
refactor: move RemoteParticipantRegistry to participant/registry.rs
1egoman Jul 2, 2026
54b160c
refactor: restructure send_text / send_bytes
1egoman Jul 2, 2026
ad6f7c8
feat: throw error when remove participant disconnects halfway through…
1egoman Jul 2, 2026
6ecf774
fix: adjust send_text / send_bytes to make the disambiguation between…
1egoman Jul 2, 2026
fd8d497
fix: clean up incoming stream manager
1egoman Jul 2, 2026
7ea47db
fix: preload buffer length
1egoman Jul 2, 2026
0523bdf
fix: add reason labels on e2e test assertions
1egoman Jul 2, 2026
3e24ce3
feat: add initial livekit-common implementation
1egoman Jul 2, 2026
f8c54e1
refactor: depend on livekit_common::RemoteParticipantRegistry
1egoman Jul 2, 2026
7ecc7e6
fix: remove orphaned take_if_raw method
1egoman Jul 2, 2026
783acb2
refactor: update more livekit crate references to point to livekit-co…
1egoman Jul 2, 2026
7633348
fix: remove serde from livekit-common
1egoman Jul 2, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .changeset/data_streams_v2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
livekit: patch
livekit-api: patch
livekit-datatrack: patch
livekit-ffi: patch
livekit-protocol: patch
livekit-uniffi: patch
---

Add data streams v2 - #1192 (@1egoman)
30 changes: 30 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ members = [
"livekit",
"livekit-api",
"livekit-protocol",
"livekit-common",
"livekit-ffi",
"livekit-uniffi",
"livekit-datatrack",
Expand Down Expand Up @@ -51,6 +52,7 @@ livekit = { version = "0.7.49", path = "livekit" }
livekit-api = { version = "0.5.4", path = "livekit-api" }
livekit-ffi = { version = "0.12.67", path = "livekit-ffi" }
livekit-datatrack = { version = "0.1.9", path = "livekit-datatrack" }
livekit-common = { version = "0.1.0", path = "livekit-common" }
livekit-protocol = { version = "0.7.9", path = "livekit-protocol" }
livekit-runtime = { version = "0.4.0", path = "livekit-runtime" }
soxr-sys = { version = "0.1.3", path = "soxr-sys" }
Expand Down
38 changes: 38 additions & 0 deletions examples/wgpu_room/src/app.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::{
data_streams_ui::DataStreamsUiState,
data_track::{LocalDataTrackTile, RemoteDataTrackTile, MAX_VALUE, TIME_WINDOW},
rpc_ui::RpcUiState,
service::{AsyncCmd, LkService, UiCmd},
Comment thread
1egoman marked this conversation as resolved.
Expand All @@ -25,6 +26,7 @@ struct AppState {
enum RightTab {
Participants,
Rpc,
DataStreams,
}

pub struct LkApp {
Expand All @@ -38,6 +40,7 @@ pub struct LkApp {
render_state: egui_wgpu::RenderState,
service: LkService,
rpc_ui: RpcUiState,
data_streams_ui: DataStreamsUiState,
right_tab: RightTab,
}

Expand Down Expand Up @@ -74,6 +77,7 @@ impl LkApp {
connection_failure: None,
render_state: cc.wgpu_render_state.clone().unwrap(),
rpc_ui: RpcUiState::default(),
data_streams_ui: DataStreamsUiState::default(),
right_tab: RightTab::Participants,
}
}
Expand Down Expand Up @@ -130,11 +134,28 @@ impl LkApp {
self.remote_data_tracks
.push(RemoteDataTrackTile::new(self.async_runtime.handle(), track));
}
RoomEvent::TextStreamOpened { reader, topic, participant_identity } => {
self.data_streams_ui.on_text_stream(
reader,
topic,
participant_identity,
&self.service,
);
}
RoomEvent::ByteStreamOpened { reader, topic, participant_identity } => {
self.data_streams_ui.on_byte_stream(
reader,
topic,
participant_identity,
&self.service,
);
}
RoomEvent::Disconnected { reason: _ } => {
self.video_renderers.clear();
self.local_data_tracks.clear();
self.remote_data_tracks.clear();
self.rpc_ui.on_disconnect();
self.data_streams_ui.on_disconnect();
}
_ => {}
}
Expand Down Expand Up @@ -264,6 +285,7 @@ impl LkApp {
ui.horizontal(|ui| {
ui.selectable_value(&mut self.right_tab, RightTab::Participants, "Participants");
ui.selectable_value(&mut self.right_tab, RightTab::Rpc, "RPC");
ui.selectable_value(&mut self.right_tab, RightTab::DataStreams, "Data Streams");
});
ui.separator();

Expand All @@ -281,6 +303,13 @@ impl LkApp {
rpc_ui.show(ui, service, &room);
});
}
RightTab::DataStreams => {
let service = &self.service;
let data_streams_ui = &mut self.data_streams_ui;
egui::ScrollArea::vertical().show(ui, |ui| {
data_streams_ui.show(ui, service, &room);
});
}
}
}

Expand All @@ -300,6 +329,15 @@ impl LkApp {
sorted_tracks.sort_by(|a, b| a.as_str().cmp(b.as_str()));

ui.monospace(&participant.identity().0);
ui.label(format!("Client protocol: {}", participant.client_protocol()));
let caps = participant.capabilities();
let caps_str = if caps.is_empty() {
"(none)".to_string()
} else {
caps.iter().map(|c| format!("{:?}", c)).collect::<Vec<_>>().join(", ")
};
ui.label(format!("Capabilities: {}", caps_str));

for tsid in sorted_tracks {
let publication = tracks.get(&tsid).unwrap().clone();

Expand Down
Loading