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:
@@ -34,10 +34,10 @@ function generateUUID(): string {
|
||||
|
||||
function getOrCreateInstanceId(): string {
|
||||
try {
|
||||
let id = localStorage.getItem(INSTANCE_ID_KEY);
|
||||
let id = sessionStorage.getItem(INSTANCE_ID_KEY);
|
||||
if (!id) {
|
||||
id = generateUUID();
|
||||
localStorage.setItem(INSTANCE_ID_KEY, id);
|
||||
sessionStorage.setItem(INSTANCE_ID_KEY, id);
|
||||
}
|
||||
return id;
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user