Skip to content

Commit b0113f2

Browse files
committed
refactor: move all notion of "internal" data streams into livekit crate
I think this is going to be a lot cleaner, and mean that other platforms like swift can handle "internal" data streams in their own way
1 parent 9a4e715 commit b0113f2

4 files changed

Lines changed: 141 additions & 87 deletions

File tree

livekit-data-stream/src/incoming/events.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,13 +55,23 @@ pub struct StreamOpened {
5555
pub struct ChunkReceived {
5656
pub chunk: Chunk,
5757
pub participant_identity: ParticipantIdentity,
58+
59+
/// Topic of the stream this chunk belongs to, or `None` if the associated stream id could
60+
/// not be mapped to a topic.
61+
pub topic: Option<String>,
5862
}
5963

6064
/// A "raw trailer received" notification, which is used to trigger
6165
/// the deprecated [RoomEvent:::StreamTrailerReceived] event.
6266
pub struct TrailerReceived {
6367
pub trailer: Trailer,
6468
pub participant_identity: ParticipantIdentity,
69+
70+
/// Topic of the stream this chunk belongs to, or `None` if the associated stream id could
71+
/// not be mapped to a topic.
72+
///
73+
/// See [`ChunkReceived::topic`].
74+
pub topic: Option<String>,
6575
}
6676

6777
/// An event emitted by [`IncomingStreamManager::run`] for the host crate to surface. The manager

0 commit comments

Comments
 (0)