@sailfish-ai/recorder 1.0.0-beta-1 → 1.0.0-beta-10

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.
@@ -20971,12 +20971,13 @@ var ReconnectingWebSocket = (
20971
20971
  return ReconnectingWebSocket2;
20972
20972
  }()
20973
20973
  );
20974
+ const version = "1.0.0-beta-10";
20974
20975
  function initializeWebSocket(backendApi, apiKey, sessionId) {
20975
20976
  const wsHost = getWebSocketHost(backendApi);
20976
20977
  const wsScheme = window.location.protocol === "https:" ? "wss" : "ws";
20977
- const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}`;
20978
+ const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}&sender=JS%2FTS&version=${version}`;
20978
20979
  const options = {
20979
- connectionTimeout: 5e3
20980
+ connectionTimeout: 1e4
20980
20981
  };
20981
20982
  const webSocket = new ReconnectingWebSocket(wsUrl, [], options);
20982
20983
  return webSocket;
@@ -20975,12 +20975,13 @@
20975
20975
  return ReconnectingWebSocket2;
20976
20976
  }()
20977
20977
  );
20978
+ const version = "1.0.0-beta-10";
20978
20979
  function initializeWebSocket(backendApi, apiKey, sessionId) {
20979
20980
  const wsHost = getWebSocketHost(backendApi);
20980
20981
  const wsScheme = window.location.protocol === "https:" ? "wss" : "ws";
20981
- const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}`;
20982
+ const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}&sender=JS%2FTS&version=${version}`;
20982
20983
  const options = {
20983
- connectionTimeout: 5e3
20984
+ connectionTimeout: 1e4
20984
20985
  };
20985
20986
  const webSocket = new ReconnectingWebSocket(wsUrl, [], options);
20986
20987
  return webSocket;
@@ -0,0 +1,2 @@
1
+ import { version } from "../package.json";
2
+ export default version;
@@ -0,0 +1,3 @@
1
+ // version.ts
2
+ import { version } from "../package.json";
3
+ export default version;
package/dist/websocket.js CHANGED
@@ -1,10 +1,11 @@
1
1
  import ReconnectingWebSocket from "reconnecting-websocket";
2
+ import version from "./version";
2
3
  export function initializeWebSocket(backendApi, apiKey, sessionId) {
3
4
  const wsHost = getWebSocketHost(backendApi);
4
5
  const wsScheme = window.location.protocol === "https:" ? "wss" : "ws";
5
- const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}`;
6
+ const wsUrl = `${wsScheme}://${wsHost}/ws/notify/?apiKey=${apiKey}&sessionId=${sessionId}&sender=JS%2FTS&version=${version}`;
6
7
  const options = {
7
- connectionTimeout: 5000,
8
+ connectionTimeout: 10000,
8
9
  };
9
10
  const webSocket = new ReconnectingWebSocket(wsUrl, [], options);
10
11
  // This is done automatically via ReconnectingWebSocket
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sailfish-ai/recorder",
3
- "version": "1.0.0-beta-1",
3
+ "version": "1.0.0-beta-10",
4
4
  "publishPublicly": true,
5
5
  "main": "dist/sailfish-recorder.umd.js",
6
6
  "types": "dist/types/index.d.ts",