Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue: publish_track unpublish_track events are not received #172

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
8 changes: 4 additions & 4 deletions livekit-rtc/livekit/rtc/participant.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ async def publish_track(
req.publish_track.local_participant_handle = self._ffi_handle.handle
req.publish_track.options.CopyFrom(options)

queue = self._room_queue.subscribe()
queue = FfiClient.instance.queue.subscribe()
try:
resp = FfiClient.instance.request(req)
cb = await queue.wait_for(
Expand All @@ -173,14 +173,14 @@ async def publish_track(
queue.task_done()
return track_publication
finally:
self._room_queue.unsubscribe(queue)
FfiClient.instance.queue.unsubscribe(queue)

async def unpublish_track(self, track_sid: str) -> None:
req = proto_ffi.FfiRequest()
req.unpublish_track.local_participant_handle = self._ffi_handle.handle
req.unpublish_track.track_sid = track_sid

queue = self._room_queue.subscribe()
queue = FfiClient.instance.queue.subscribe()
try:
resp = FfiClient.instance.request(req)
cb = await queue.wait_for(
Expand All @@ -194,7 +194,7 @@ async def unpublish_track(self, track_sid: str) -> None:
publication.track = None
queue.task_done()
finally:
self._room_queue.unsubscribe(queue)
FfiClient.instance.queue.unsubscribe(queue)


class RemoteParticipant(Participant):
Expand Down
Loading