diff --git a/.changeset/strong-roses-kneel.md b/.changeset/strong-roses-kneel.md new file mode 100644 index 00000000..07d6bbb0 --- /dev/null +++ b/.changeset/strong-roses-kneel.md @@ -0,0 +1,5 @@ +--- +"@livekit/rtc-node": patch +--- + +fixed Participant.unpublishTrack error diff --git a/packages/livekit-rtc/src/participant.ts b/packages/livekit-rtc/src/participant.ts index b7f1eb2d..ba9ca902 100644 --- a/packages/livekit-rtc/src/participant.ts +++ b/packages/livekit-rtc/src/participant.ts @@ -369,10 +369,11 @@ export class LocalParticipant extends Participant { } } - async unpublishTrack(trackSid: string) { + async unpublishTrack(trackSid: string, stopOnUnpublish?: boolean) { const req = new UnpublishTrackRequest({ localParticipantHandle: this.ffi_handle.handle, trackSid: trackSid, + stopOnUnpublish: stopOnUnpublish ?? true, }); const res = FfiClient.instance.request({