Skip to content

Commit 860d708

Browse files
authored
Fix byte streams not sending the name of the bytestream (#939)
1 parent 56d9aec commit 860d708

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"client-sdk-android": patch
3+
---
4+
5+
Fix byte streams not sending the name of the bytestream

livekit-android-sdk/src/main/java/io/livekit/android/room/datastream/outgoing/OutgoingDataStreamManager.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,9 @@ constructor(
133133
is ByteStreamInfo -> {
134134
this.mimeType = info.mimeType
135135
this.byteHeader = with(DataStream.ByteHeader.newBuilder()) {
136-
this.name = name
136+
if (info.name != null) {
137+
this.name = info.name
138+
}
137139
build()
138140
}
139141
}

livekit-android-test/src/test/java/io/livekit/android/room/datastream/RoomOutgoingDataStreamMockE2ETest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2023-2025 LiveKit, Inc.
2+
* Copyright 2023-2026 LiveKit, Inc.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -82,6 +82,7 @@ class RoomOutgoingDataStreamMockE2ETest : MockE2ETest() {
8282

8383
with(headerPacket.streamHeader) {
8484
assertTrue(hasByteHeader())
85+
assertEquals("stream_name", byteHeader.name)
8586
}
8687

8788
val payloadPacket = LivekitModels.DataPacket.parseFrom(ByteString.copyFrom(buffers[1].data))

0 commit comments

Comments
 (0)