Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fix(recording): include output.mp4 in camera-only health check

Richie McIlroyc6ea3b922a6b
diff --git a/crates/recording/src/instant_recording.rs b/crates/recording/src/instant_recording.rs
index abd6f3ffa..1befc82fd 100644
--- a/crates/recording/src/instant_recording.rs
+++ b/crates/recording/src/instant_recording.rs
@@ -190,7 +190,12 @@ impl Message<Stop> for Actor {
}
};
- let health = if has_segments {
+ let has_output_mp4 = segments_dir.join("output.mp4").exists()
+ && std::fs::metadata(segments_dir.join("output.mp4"))
+ .map(|m| m.len() > 0)
+ .unwrap_or(false);
+
+ let health = if has_segments || has_output_mp4 {
crate::RecordingHealth::Healthy
} else if has_init {
crate::RecordingHealth::Degraded {