use std::collections::BTreeSet;
use opentalk_types_signaling::ParticipantId;
use crate::{Credentials, error::LiveKitError};
#[derive(Clone, Debug, PartialEq, Eq, serde::Serialize, serde::Deserialize)]
#[serde(tag = "message", rename_all = "snake_case")]
pub enum LiveKitEvent {
Credentials(Credentials),
PopoutStreamAccessToken {
token: String,
},
ScreenSharePermissionsUpdated {
grant: bool,
participants: BTreeSet<ParticipantId>,
},
Error(LiveKitError),
}
impl From<LiveKitError> for LiveKitEvent {
fn from(error: LiveKitError) -> Self {
Self::Error(error)
}
}