You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a participant has roomAdmin permissions, that participant should be able to mute the audio and/or video track of other participants, or even remove them from the room.
Describe the proposed solution
Given that <LiveKitRoom/> already receives a token with embedded grants (VideoGrant.roomAdmin), there shouldn't be much need for configuration:
When that grant is present, the <ParticipantTile/> should provide either additional buttons next to the <FocusToggle/>, or add them to the .lk-participant-metadata (e.g. turning the <TrackMutedIndicator/> into a button).
I'm not entirely sure as whether the JS client is allowed to issue commands directly to the LiveKit server, but if not, the <LiveKitRoom/> or <VideoConference/> should provide callback options:
asyncfunctionmuteParticipant(p: Participant,trackRef: TrackPublication){// use custom API client and instruct server to perform participant mutingawaitmyApi.rooms(room).participants(p.identity).mute(trackRef.trackSid)}asyncfunctionremoveParticipant(p: Participant){// use custom API client and instruct server to remove participant from roomawaitmyApi.rooms(room).participants(p.identity).remove()}<LiveKitRoomroom={room}token={token}{...etc}><VideoConferenceonParticipantMute={muteParticipant}onParticipantRemove={removeParticipant}/></LiveKitRoom>
Alternatives considered
I currently have a bit of a "hacky" implementation:
Note: ./bootstrap and ./icons/* provide some very basic Bootstrap components (e.g. <BS.Button />) and FontAwesome icons (e.g. <FaCircleXmark/>). Those are custom implementations to keep the bundle size smaller.
../lib/api is a client for the authentication server (my setup has a Rails application handling user logins and permission assignment). Among others, it provides a proxy to RoomServiceClient#mute_published_track and RoomServiceClient#remove_participant.
Describe the problem
When a participant has
roomAdmin
permissions, that participant should be able to mute the audio and/or video track of other participants, or even remove them from the room.Describe the proposed solution
Given that
<LiveKitRoom/>
already receives a token with embedded grants (VideoGrant.roomAdmin
), there shouldn't be much need for configuration:When that grant is present, the
<ParticipantTile/>
should provide either additional buttons next to the<FocusToggle/>
, or add them to the.lk-participant-metadata
(e.g. turning the<TrackMutedIndicator/>
into a button).I'm not entirely sure as whether the JS client is allowed to issue commands directly to the LiveKit server, but if not, the
<LiveKitRoom/>
or<VideoConference/>
should provide callback options:Alternatives considered
I currently have a bit of a "hacky" implementation:
with the following implementations of
isAdmin
This basically looks for the
roomAdmin
grant in the JWT token:AdminControls.tsx
Note:
./bootstrap
and./icons/*
provide some very basic Bootstrap components (e.g.<BS.Button />
) and FontAwesome icons (e.g.<FaCircleXmark/>
). Those are custom implementations to keep the bundle size smaller.../lib/api
is a client for the authentication server (my setup has a Rails application handling user logins and permission assignment). Among others, it provides a proxy toRoomServiceClient#mute_published_track
andRoomServiceClient#remove_participant
.With some additional CSS (absolute positioning of the AdminControl's container), this renders as:
Importance
would make my life easier
Additional Information
No response
The text was updated successfully, but these errors were encountered: