Wire up call controls in the TitleBar
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user