Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions crates/core/src/bc/xml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,9 +603,10 @@ pub struct DuplexList {
/// audioStreamModeList xml
#[derive(PartialEq, Eq, Default, Debug, Deserialize, Serialize)]
pub struct AudioStreamModeList {
/// The supported audio stream mode
#[serde(rename = "audioStreamMode")]
pub audio_stream_mode: String,
/// The supported audio stream mode(s). Some devices (e.g. the Reolink
/// Video Doorbell) advertise more than one, so this must be a list.
#[serde(default, rename = "audioStreamMode")]
pub audio_stream_mode: Vec<String>,
}

/// audioConfigList xml
Expand Down
4 changes: 3 additions & 1 deletion src/talk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,9 @@ pub(crate) async fn main(opt: Opt, reactor: NeoReactor) -> Result<()> {
duplex: talk_ability.duplex_list[config_id].duplex.clone(),
audio_stream_mode: talk_ability.audio_stream_mode_list[config_id]
.audio_stream_mode
.clone(),
.first()
.cloned()
.unwrap_or_default(),
audio_config: talk_ability.audio_config_list[config_id]
.audio_config
.clone(),
Expand Down