feat: add audio switch ui

This commit is contained in:
Kingtous
2023-01-30 20:30:35 +08:00
parent 95d06e160b
commit cb228bef2b
39 changed files with 219 additions and 0 deletions

View File

@@ -89,6 +89,18 @@ impl<T: InvokeUiSession> Session<T> {
self.lc.write().unwrap().save_keyboard_mode(value);
}
pub fn get_audio_mode(&self) -> String {
self.lc.read().unwrap().audio_mode.clone()
}
pub fn save_audio_mode(&self, value: String) {
let msg = self.lc.write().unwrap().save_audio_mode(value);
// Notify remote guest that the audio mode has been changed.
if let Some(msg) = msg {
self.send(Data::Message(msg));
}
}
pub fn save_view_style(&mut self, value: String) {
self.lc.write().unwrap().save_view_style(value);
}
@@ -653,6 +665,13 @@ impl<T: InvokeUiSession> Session<T> {
}
}
}
fn get_audio_transmission_mode(&self, id: &str) {
}
fn set_audio_transmission_mode(&self, id: &str, mode: String) {
}
}
pub trait InvokeUiSession: Send + Sync + Clone + 'static + Sized + Default {