@amityco/ts-sdk 6.20.0 → 6.20.1-0288b23.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"onStreamStopped.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamStopped.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAG,MAAM,YAS9E,CAAC"}
1
+ {"version":3,"file":"onStreamStopped.d.ts","sourceRoot":"","sources":["../../../src/streamRepository/events/onStreamStopped.ts"],"names":[],"mappings":"AAKA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,eAAe,aAAc,MAAM,QAAQ,CAAC,MAAM,MAAM,CAAC,KAAG,MAAM,YAc9E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amityco/ts-sdk",
3
- "version": "6.20.0",
3
+ "version": "6.20.1-0288b23.0",
4
4
  "license": "CC-BY-ND-4.0",
5
5
  "author": "amity.co <developers@amity.co> (https://amity.co)",
6
6
  "description": "Amity Social Cloud Typescript SDK",
@@ -26,9 +26,9 @@ declare global {
26
26
  reconnect_error: Amity.ErrorResponse | undefined;
27
27
  reconnect_failed: Amity.ErrorResponse | undefined;
28
28
 
29
- 'video-streaming.didRecord': Amity.StreamPayload;
30
- 'video-streaming.didStart': Amity.StreamPayload;
31
- 'video-streaming.didStop': Amity.StreamPayload;
29
+ 'v3.video-streaming.didRecord': Amity.StreamPayload;
30
+ 'v3.video-streaming.didStart': Amity.StreamPayload;
31
+ 'v3.video-streaming.didStop': Amity.StreamPayload;
32
32
  };
33
33
 
34
34
  type MqttEvents = {
@@ -121,9 +121,7 @@ export const login = async (
121
121
  // wire websocket events to our event emitter
122
122
  proxyWebsocketEvents(client.ws, client.emitter);
123
123
 
124
- client.ws.once('connect', () => {
125
- client.ws.open();
126
- });
124
+ client.ws.open();
127
125
 
128
126
  client.userId = user.userId;
129
127
 
@@ -15,6 +15,10 @@ const WS_EVENTS = [
15
15
  'sessionStateChange',
16
16
  // for internal use by accessTokenExpiryWatcher
17
17
  'tokenExpired',
18
+
19
+ 'v3.video-streaming.didRecord',
20
+ 'v3.video-streaming.didStart',
21
+ 'v3.video-streaming.didStop',
18
22
  ] as const;
19
23
 
20
24
  const MQTT_EVENTS = [
@@ -29,7 +29,7 @@ export const onStreamRecorded = (callback: Amity.Listener<Amity.Stream>): Amity.
29
29
  return createEventSubscriber(
30
30
  client,
31
31
  'stream/onStreamRecorded',
32
- 'video-streaming.didRecord',
32
+ 'v3.video-streaming.didRecord',
33
33
  filter,
34
34
  );
35
35
  };
@@ -29,7 +29,7 @@ export const onStreamStarted = (callback: Amity.Listener<Amity.Stream>): Amity.U
29
29
  return createEventSubscriber(
30
30
  client,
31
31
  'stream/onStreamStarted',
32
- 'video-streaming.didStart',
32
+ 'v3.video-streaming.didStart',
33
33
  filter,
34
34
  );
35
35
  };
@@ -26,5 +26,10 @@ export const onStreamStopped = (callback: Amity.Listener<Amity.Stream>): Amity.U
26
26
  callback(payload.videoStreamings[0]);
27
27
  };
28
28
 
29
- return createEventSubscriber(client, 'stream/onStreamStarted', 'video-streaming.didStop', filter);
29
+ return createEventSubscriber(
30
+ client,
31
+ 'stream/onStreamStropped',
32
+ 'v3.video-streaming.didStop',
33
+ filter,
34
+ );
30
35
  };