fix: recording

closes #9
This commit is contained in:
2025-06-20 10:30:22 +01:00
parent aea0feef05
commit b1ebf75244
3 changed files with 21 additions and 9 deletions

View File

@ -378,10 +378,17 @@ impl Overseer for ZapStreamOverseer {
_ => false,
});
match var {
Some(var) => egress.push(EgressType::Recorder(EgressConfig {
name: "dvr".to_string(),
variants: [var.id()].into(),
})),
Some(var) => {
// take all streams in the same group as the matching video resolution (video+audio)
let vars_in_group = cfg
.variants
.iter()
.filter(|v| v.group_id() == var.group_id());
egress.push(EgressType::Recorder(EgressConfig {
name: "dvr".to_string(),
variants: vars_in_group.map(|v| v.id()).collect(),
}))
}
None => {
warn!(
"Invalid DVR config, no variant found with height {}",