1pub use vector_calls::*;
6
7#[cfg(feature = "calls")]
8pub mod platform;
9#[cfg(feature = "calls")]
10pub mod session;
11#[cfg(feature = "calls")]
12pub mod settings;
13#[cfg(feature = "calls")]
14pub mod video;
15#[cfg(feature = "calls")]
16pub mod voice;
17
18#[cfg(feature = "calls")]
20pub async fn set_mic(s: settings::MicState) -> Result<(), String> {
21 settings::remember_mic(s);
22 if voice::snapshot().is_some() {
23 voice::set_deafened(s.deafened)?;
24 voice::set_muted(s.muted)?;
25 }
26 if session::snapshot().is_some() {
27 session::set_deafened(s.deafened).await?;
28 if !s.deafened {
29 session::set_muted(s.muted).await?;
30 }
31 }
32 Ok(())
33}