use std::collections::BTreeSet;
use opentalk_roomserver_signaling::signaling_module::CreateReplica;
use opentalk_types_signaling::ParticipantId;
use crate::event::LiveKitEvent;
#[derive(Debug, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "snake_case", tag = "action")]
pub enum LiveKitCommand {
CreateNewAccessToken,
ForceMute {
participants: BTreeSet<ParticipantId>,
},
GrantScreenSharePermission {
participants: BTreeSet<ParticipantId>,
},
RevokeScreenSharePermission {
participants: BTreeSet<ParticipantId>,
},
EnableMicrophoneRestrictions(UnrestrictedParticipants),
DisableMicrophoneRestrictions,
RequestPopoutStreamAccessToken,
}
impl CreateReplica<LiveKitEvent> for LiveKitCommand {
fn replicate(&self) -> Option<LiveKitEvent> {
None
}
}
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
pub struct UnrestrictedParticipants {
pub unrestricted_participants: BTreeSet<ParticipantId>,
}