Background-audio handoff for video + repository/player refactor

Hand video playback off to a native audio-only stream when the app is
backgrounded or locked, with no on-device video decode (UR-040). Adds
player_enter/exit_background_audio commands, an audio-only stream URL
for video items across the repository layer, and the frontend handoff
state machine wired into VideoPlayer. Includes accompanying
repository/offline/player refactoring and regenerates the traceability
matrix.
This commit is contained in:
2026-07-22 21:52:07 +02:00
parent 4e6ab017d4
commit 3fbf6afdbc
72 changed files with 6728 additions and 2338 deletions
+17 -5
View File
@@ -1,8 +1,8 @@
use serde::Serialize;
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Arc;
use std::time::Duration;
use tauri::{AppHandle, Emitter};
use serde::Serialize;
use super::{AuthManager, User};
@@ -65,7 +65,10 @@ impl SessionVerifier {
let session = auth_manager.get_session().await;
if let Some(session) = session {
log::debug!("[SessionVerifier] Verifying session for: {}", session.username);
log::debug!(
"[SessionVerifier] Verifying session for: {}",
session.username
);
// Verify the session
match auth_manager
@@ -113,7 +116,10 @@ impl SessionVerifier {
reason: "Session expired".to_string(),
};
if let Err(e) = app.emit("auth:needs-reauth", event) {
log::error!("[SessionVerifier] Failed to emit event: {}", e);
log::error!(
"[SessionVerifier] Failed to emit event: {}",
e
);
}
}
@@ -131,12 +137,18 @@ impl SessionVerifier {
message: e.clone(),
};
if let Err(e) = app.emit("auth:network-error", event) {
log::error!("[SessionVerifier] Failed to emit event: {}", e);
log::error!(
"[SessionVerifier] Failed to emit event: {}",
e
);
}
}
} else {
// Unknown error - log but don't invalidate
log::error!("[SessionVerifier] Unknown error during verification: {}", e);
log::error!(
"[SessionVerifier] Unknown error during verification: {}",
e
);
}
}
}