File tree Expand file tree Collapse file tree 3 files changed +7
-3
lines changed
Expand file tree Collapse file tree 3 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " livekit-client " : patch
3+ ---
4+
5+ Wait for dc buffer status low for all published packets
Original file line number Diff line number Diff line change @@ -1251,7 +1251,6 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
12511251 } ) ,
12521252 } ,
12531253 } ) ;
1254-
12551254 await this . sendDataPacket ( packet , DataPacket_Kind . RELIABLE ) ;
12561255 }
12571256
@@ -1282,6 +1281,8 @@ export default class RTCEngine extends (EventEmitter as new () => TypedEventEmit
12821281
12831282 const msg = packet . toBinary ( ) ;
12841283
1284+ await this . waitForBufferStatusLow ( kind ) ;
1285+
12851286 const dc = this . dataChannelForKind ( kind ) ;
12861287 if ( dc ) {
12871288 if ( kind === DataPacket_Kind . RELIABLE ) {
Original file line number Diff line number Diff line change @@ -146,7 +146,6 @@ export default class OutgoingDataStreamManager {
146146 // Implement the sink
147147 async write ( text ) {
148148 for ( const textByteChunk of splitUtf8 ( text , STREAM_CHUNK_SIZE ) ) {
149- await engine . waitForBufferStatusLow ( DataPacket_Kind . RELIABLE ) ;
150149 const chunk = new DataStream_Chunk ( {
151150 content : textByteChunk ,
152151 streamId,
@@ -278,7 +277,6 @@ export default class OutgoingDataStreamManager {
278277 try {
279278 while ( byteOffset < chunk . byteLength ) {
280279 const subChunk = chunk . slice ( byteOffset , byteOffset + STREAM_CHUNK_SIZE ) ;
281- await engine . waitForBufferStatusLow ( DataPacket_Kind . RELIABLE ) ;
282280 const chunkPacket = new DataPacket ( {
283281 destinationIdentities,
284282 value : {
You can’t perform that action at this time.
0 commit comments