@sailfish-ai/recorder 1.6.2 → 1.6.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -132,6 +132,8 @@ function handleVisibilityChange() {
132
132
  }
133
133
  // Initialize event listeners for visibility change and page unload
134
134
  document.addEventListener("visibilitychange", handleVisibilityChange);
135
+ // Clearing window.name on refresh to generate and retain a new sessionId
136
+ window.addEventListener("beforeunload", () => window.name = "");
135
137
  function storeCredentialsAndConnection({ apiKey, backendApi, }) {
136
138
  sessionStorage.setItem("sailfishApiKey", apiKey);
137
139
  sessionStorage.setItem("sailfishBackendApi", backendApi);