From 3600417b0a11282ece070c972039544fda555e46 Mon Sep 17 00:00:00 2001 From: Hamdan <96612374+s-hamdananwar@users.noreply.github.com> Date: Wed, 8 Jan 2025 09:33:39 -0800 Subject: [PATCH] fix(participant): added stopOnUnpublish value to UnpublishTrackRequest (#379) * fix(participant): added stopOnUnpublish value to UnpublishTrackRequest * Create strong-roses-kneel.md * fix(participant): added stopOnUnpublish as an optional param for unpublishTrack --- .changeset/strong-roses-kneel.md | 5 +++++ packages/livekit-rtc/src/participant.ts | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 .changeset/strong-roses-kneel.md 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({