Migrate instance ID storage from localStorage to sessionStorage

Switch instance ID storage from localStorage to sessionStorage in useWebRenderer composable to ensure better session management and prevent data persistence across browser sessions.

Also update the DirectOggFlacSink implementation to improve backpressure handling, streamline the OGG chaining logic, and add proper Safari range header support for the stream endpoint.
This commit is contained in:
2026-02-28 14:10:38 +01:00
parent ca8702fd7f
commit de74c7b431
5 changed files with 187 additions and 271 deletions

View File

@@ -116,15 +116,16 @@ impl RendererRegistry {
Ok((stream_url, udn))
}
/// Retourne le DirectOggFlacHandle pour l'endpoint /stream (clonable).
pub fn get_flac_handle(
/// Retourne un DirectOggFlacStream pour l'endpoint /stream.
/// Chaque appel retourne un wrapper sur le même reader persistant.
pub fn get_stream(
&self,
instance_id: &str,
) -> Option<pmoaudio_ext::sinks::DirectOggFlacHandle> {
) -> Option<pmoaudio_ext::sinks::DirectOggFlacStream> {
self.instances
.read()
.get(instance_id)
.map(|i| i.flac_handle.clone())
.map(|i| i.flac_handle.get_stream())
}
/// Retourne le PipelineHandle par UDN (pour les handlers UPnP)