Wire up call controls in the TitleBar

This commit is contained in:
Marshall Bowers
2023-10-13 12:46:35 -04:00
parent f3679b37a2
commit e477fa7a93
2 changed files with 83 additions and 5 deletions
+27
View File
@@ -20,6 +20,15 @@ pub enum MicStatus {
Unmuted,
}
impl MicStatus {
pub fn inverse(&self) -> Self {
match self {
Self::Muted => Self::Unmuted,
Self::Unmuted => Self::Muted,
}
}
}
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
pub enum VideoStatus {
On,
@@ -27,6 +36,15 @@ pub enum VideoStatus {
Off,
}
impl VideoStatus {
pub fn inverse(&self) -> Self {
match self {
Self::On => Self::Off,
Self::Off => Self::On,
}
}
}
#[derive(Debug, Default, PartialEq, Eq, PartialOrd, Ord, Hash, Clone, Copy)]
pub enum ScreenShareStatus {
Shared,
@@ -34,6 +52,15 @@ pub enum ScreenShareStatus {
NotShared,
}
impl ScreenShareStatus {
pub fn inverse(&self) -> Self {
match self {
Self::Shared => Self::NotShared,
Self::NotShared => Self::Shared,
}
}
}
#[derive(Clone)]
pub struct PlayerCallStatus {
pub mic_status: MicStatus,