clean-mouse-53726
08/21/2025, 9:48 AMtall-airline-16756
08/21/2025, 9:49 AMtall-airline-16756
08/21/2025, 9:50 AMfrom livekit import api
# First, set up the room service client
room_service = api.RoomServiceClient("<LIVEKIT_HOST_URL>", "api-key", "secret-key")
2. Get the Track SID:
# Next, grab the participant details to find the track SID
participant_info = await room_service.get_participant(
api.RoomParticipantIdentity(
room="room_name",
identity="participant_identity"
)
)
# Look through participant_info.tracks to find the track SID you want to unmute
3. Unmute the Track:
from livekit.protocol import room as proto_room
# Finally, unmute the track by setting muted=False
response = await room_service.mute_published_track(
proto_room.MuteRoomTrackRequest(
room="room_name",
identity="participant_identity",
track_sid="track_sid",
muted=False # Just set this to False to unmute
)
)
Heads up: Remote unmute is turned off by default. To get it working:
• If you’re using LiveKit Cloud: Just enable "Admins can remotely unmute tracks" in your project settings.
• If you’re self-hosting: Add room.enable_remote_unmute: true to your config YAML.
If you hit any bumps or want me to walk you through it, just give me a shout—I’m here to help!
Sources: Managing participants | LiveKit Docs | livekit-protocol/livekit/protocol/room.pyiclean-mouse-53726
08/21/2025, 9:51 AMfor pub in list(ctx.room.remote_participants.values()):
if (pub.name == 'bey-avatar-agent' or
pub.name == 'tavus-avatar-agent' and pub.track):
pub.track.unmute()
is it possible? or I have an error?tall-airline-16756
08/21/2025, 9:51 AMunmute() method is only for local tracks like LocalAudioTrack and LocalVideoTrack. Unfortunately, remote tracks such as RemoteAudioTrack and RemoteVideoTrack don’t have this method.
If you want to unmute a remote participant’s track, you’ll need to use the server-side RoomServiceClient and call the mute_published_track method with muted=False. Here’s a quick example:
from livekit.protocol import room as proto_room
response = await room_service.mute_published_track(
proto_room.MuteRoomTrackRequest(
room="room_name",
identity="participant_identity",
track_sid="track_sid",
muted=False # Set to False to unmute
)
)
Also, don’t forget to make sure remote unmuting is enabled in your project settings:
• For LiveKit Cloud: Turn on "Admins can remotely unmute tracks" in your project settings.
• For self-hosted setups: Add room.enable_remote_unmute: true in your config YAML.
If you have any questions or want me to walk you through it, just let me know—I’m here to help!
Sources: Managing participants | LiveKit Docs | livekit-rtc/livekit/rtc/room.py