opt: rename to dual-way
This commit is contained in:
parent
8ab49d11d1
commit
05822991bf
@ -109,8 +109,8 @@ const kRemoteImageQualityCustom = 'custom';
|
||||
/// [kRemoteAudioGuestToHost] Guest to host audio mode(default).
|
||||
const kRemoteAudioGuestToHost = 'guest-to-host';
|
||||
|
||||
/// [kRemoteAudioTwoWay] two-way audio mode(default).
|
||||
const kRemoteAudioTwoWay = 'two-way';
|
||||
/// [kRemoteAudioDualWay] dual-way audio mode(default).
|
||||
const kRemoteAudioDualWay = 'dual-way';
|
||||
|
||||
const kIgnoreDpi = true;
|
||||
|
||||
|
@ -1115,8 +1115,8 @@ class _RemoteMenubarState extends State<RemoteMenubar> {
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
MenuEntryRadioOption(
|
||||
text: translate('Two way'),
|
||||
value: kRemoteAudioTwoWay,
|
||||
text: translate('Dual way'),
|
||||
value: kRemoteAudioDualWay,
|
||||
dismissOnClicked: true,
|
||||
),
|
||||
],
|
||||
|
@ -446,7 +446,7 @@ enum ImageQuality {
|
||||
|
||||
enum AudioMode {
|
||||
GuestToHost = 0;
|
||||
TwoWay = 1;
|
||||
DualWay = 1;
|
||||
}
|
||||
|
||||
message VideoCodecState {
|
||||
|
@ -1262,8 +1262,8 @@ impl LoginConfigHandler {
|
||||
pub fn get_audio_mode_enum(q: &str, ignore_default: bool) -> Option<AudioMode> {
|
||||
if q == "guest-to-host" {
|
||||
Some(AudioMode::GuestToHost)
|
||||
} else if q == "two-way" {
|
||||
Some(AudioMode::TwoWay)
|
||||
} else if q == "dual-way" {
|
||||
Some(AudioMode::DualWay)
|
||||
} else {
|
||||
if ignore_default {
|
||||
None
|
||||
|
@ -393,7 +393,7 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
allow_err!(sender.send(()));
|
||||
}
|
||||
}
|
||||
AudioMode::TwoWay => {
|
||||
AudioMode::DualWay => {
|
||||
// Start audio thread for playback.
|
||||
// Cancel previous local audio session.
|
||||
if let Some(sender) = self.stop_local_audio_sender.take() {
|
||||
@ -889,14 +889,15 @@ impl<T: InvokeUiSession> Remote<T> {
|
||||
self.handler.load_last_jobs();
|
||||
}
|
||||
|
||||
// Start audio thread for playback if current audio mode is two-way transmission.
|
||||
// Start audio thread for playback if current audio mode is dual-way transmission.
|
||||
if !self.handler.is_file_transfer() && !self.handler.is_port_forward() {
|
||||
let audio_mode = LoginConfigHandler::get_audio_mode_enum(
|
||||
self.handler.load_config().audio_mode.as_str(),
|
||||
false,
|
||||
)
|
||||
.unwrap_or(AudioMode::GuestToHost);
|
||||
if audio_mode == AudioMode::TwoWay {
|
||||
log::debug!("current audio mode: {:?}", audio_mode);
|
||||
if audio_mode == AudioMode::DualWay {
|
||||
// Cancel previous local audio session.
|
||||
if let Some(sender) = self.stop_local_audio_sender.take() {
|
||||
allow_err!(sender.send(()));
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "自动"),
|
||||
("Other Default Options", "其它默认选项"),
|
||||
("Guest to Host", "被控到主机"),
|
||||
("Two way", "双向"),
|
||||
("Dual way", "双向"),
|
||||
("Audio Transmission Mode", "音频传输模式"),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -437,7 +437,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Please confirm if you want to share your desktop?", ""),
|
||||
("Closed as expected", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
("Display", ""),
|
||||
("Default View Style", ""),
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "Automatisch"),
|
||||
("Other Default Options", "Weitere Standardoptionen"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -447,7 +447,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Other Default Options", "Otras opciones predeterminadas"),
|
||||
("Closed as expected", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "خودکار"),
|
||||
("Other Default Options", "سایر گزینه های پیش فرض"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "Auto"),
|
||||
("Other Default Options", "Autres options par défaut"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "Auto"),
|
||||
("Other Default Options", "Altre Opzioni Predefinite"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "Auto"),
|
||||
("Other Default Options", "Inne opcje domyślne"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -448,7 +448,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Please confirm if you want to share your desktop?", "Подтвердите, что хотите поделиться своим рабочим столом?"),
|
||||
("Closed as expected", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", "自動"),
|
||||
("Other Default Options", "其它默認選項"),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -446,7 +446,7 @@ pub static ref T: std::collections::HashMap<&'static str, &'static str> =
|
||||
("Auto", ""),
|
||||
("Other Default Options", ""),
|
||||
("Guest to Host", ""),
|
||||
("Two way", ""),
|
||||
("Dual way", ""),
|
||||
("Audio Transmission Mode", ""),
|
||||
].iter().cloned().collect();
|
||||
}
|
||||
|
@ -669,13 +669,6 @@ 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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user