Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions .changeset/fancy-terms-walk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'livekit-client': patch
---

Decode text data streams without TextDecoder fatal mode for broader runtime support
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ function bytesToChunks(streamId: string): TransformStream<Uint8Array, DataStream
* synthesized text chunk decodes independently. The `flush` emits the decoder's trailing bytes.
*/
function bytesToDecodedUtf8(streamId: string): TransformStream<Uint8Array, DataStream_Chunk> {
const decoder = new TextDecoder('utf-8', { fatal: true });
const decoder = new TextDecoder('utf-8');
const encoder = new TextEncoder();

let outIndex = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/room/data-stream/incoming/StreamReader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ export class TextStreamReader extends BaseStreamReader<TextStreamInfo> {
// Suppress unhandled rejection on reader.closed — errors are
// already propagated through reader.read() to the consumer.
reader.closed.catch(() => {});
const decoder = new TextDecoder('utf-8', { fatal: true });
const decoder = new TextDecoder('utf-8');
Comment thread
1egoman marked this conversation as resolved.
const signal = this.signal;

const cleanup = () => {
Expand Down
Loading