Skip to content

Commit

Permalink
fix(participant): added stopOnUnpublish value to UnpublishTrackRequest (
Browse files Browse the repository at this point in the history
#379)

* fix(participant): added stopOnUnpublish value to UnpublishTrackRequest

* Create strong-roses-kneel.md

* fix(participant): added stopOnUnpublish as an optional param for unpublishTrack
  • Loading branch information
s-hamdananwar authored Jan 8, 2025
1 parent aca0c42 commit 3600417
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/strong-roses-kneel.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@livekit/rtc-node": patch
---

fixed Participant.unpublishTrack error
3 changes: 2 additions & 1 deletion packages/livekit-rtc/src/participant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<UnpublishTrackResponse>({
Expand Down

0 comments on commit 3600417

Please sign in to comment.