@stream-io/video-client 0.0.24 → 0.0.26

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.
@@ -0,0 +1,7 @@
1
+ import { Device, OS, Sdk } from './gen/video/sfu/models/models';
2
+ export declare const setSdkInfo: (info: Sdk) => void;
3
+ export declare const getSdkInfo: () => Sdk | undefined;
4
+ export declare const setOSInfo: (info: OS) => void;
5
+ export declare const getOSInfo: () => OS | undefined;
6
+ export declare const setDeviceInfo: (info: Device) => void;
7
+ export declare const getDeviceInfo: () => Device | undefined;
@@ -1583,17 +1583,23 @@ export interface CallUserMuted {
1583
1583
  */
1584
1584
  created_at: string;
1585
1585
  /**
1586
- * The type of event: "call.user_muted" in this case
1586
+ *
1587
1587
  * @type {string}
1588
1588
  * @memberof CallUserMuted
1589
1589
  */
1590
- type: string;
1590
+ from_user_id: string;
1591
1591
  /**
1592
1592
  *
1593
1593
  * @type {Array<string>}
1594
1594
  * @memberof CallUserMuted
1595
1595
  */
1596
- user_ids: Array<string>;
1596
+ muted_user_ids: Array<string>;
1597
+ /**
1598
+ * The type of event: "call.user_muted" in this case
1599
+ * @type {string}
1600
+ * @memberof CallUserMuted
1601
+ */
1602
+ type: string;
1597
1603
  }
1598
1604
  /**
1599
1605
  *
package/index.ts CHANGED
@@ -21,5 +21,5 @@ export * from './src/helpers/ViewportTracker';
21
21
 
22
22
  export * from './src/helpers/sound-detector';
23
23
  export * as Browsers from './src/helpers/browsers';
24
- export * from './src/sdk-info';
24
+ export * from './src/client-details';
25
25
  export * from './src/logger';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stream-io/video-client",
3
- "version": "0.0.24",
3
+ "version": "0.0.26",
4
4
  "packageManager": "yarn@3.2.4",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.es.js",
package/src/Call.ts CHANGED
@@ -104,7 +104,7 @@ import {
104
104
  StreamCallEvent,
105
105
  } from './coordinator/connection/types';
106
106
  import { UAParser } from 'ua-parser-js';
107
- import { getSdkInfo } from './sdk-info';
107
+ import { getDeviceInfo, getOSInfo, getSdkInfo } from './client-details';
108
108
  import { isReactNative } from './helpers/platforms';
109
109
  import { getLogger } from './logger';
110
110
 
@@ -776,7 +776,9 @@ export class Call {
776
776
  try {
777
777
  const clientDetails: ClientDetails = {};
778
778
  if (isReactNative()) {
779
- // TODO RN
779
+ // Since RN doesn't support web, sharing browser info is not required
780
+ clientDetails.os = getOSInfo();
781
+ clientDetails.device = getDeviceInfo();
780
782
  } else {
781
783
  const details = new UAParser(navigator.userAgent).getResult();
782
784
  clientDetails.browser = {
@@ -0,0 +1,29 @@
1
+ import { Device, OS, Sdk } from './gen/video/sfu/models/models';
2
+
3
+ let sdkInfo: Sdk | undefined;
4
+ let osInfo: OS | undefined;
5
+ let deviceInfo: Device | undefined;
6
+
7
+ export const setSdkInfo = (info: Sdk) => {
8
+ sdkInfo = info;
9
+ };
10
+
11
+ export const getSdkInfo = () => {
12
+ return sdkInfo;
13
+ };
14
+
15
+ export const setOSInfo = (info: OS) => {
16
+ osInfo = info;
17
+ };
18
+
19
+ export const getOSInfo = () => {
20
+ return osInfo;
21
+ };
22
+
23
+ export const setDeviceInfo = (info: Device) => {
24
+ deviceInfo = info;
25
+ };
26
+
27
+ export const getDeviceInfo = () => {
28
+ return deviceInfo;
29
+ };
@@ -1570,17 +1570,23 @@ export interface CallUserMuted {
1570
1570
  */
1571
1571
  created_at: string;
1572
1572
  /**
1573
- * The type of event: "call.user_muted" in this case
1573
+ *
1574
1574
  * @type {string}
1575
1575
  * @memberof CallUserMuted
1576
1576
  */
1577
- type: string;
1577
+ from_user_id: string;
1578
1578
  /**
1579
1579
  *
1580
1580
  * @type {Array<string>}
1581
1581
  * @memberof CallUserMuted
1582
1582
  */
1583
- user_ids: Array<string>;
1583
+ muted_user_ids: Array<string>;
1584
+ /**
1585
+ * The type of event: "call.user_muted" in this case
1586
+ * @type {string}
1587
+ * @memberof CallUserMuted
1588
+ */
1589
+ type: string;
1584
1590
  }
1585
1591
  /**
1586
1592
  *
@@ -1,3 +0,0 @@
1
- import { Sdk } from './gen/video/sfu/models/models';
2
- export declare const setSdkInfo: (info: Sdk) => void;
3
- export declare const getSdkInfo: () => Sdk | undefined;
package/src/sdk-info.ts DELETED
@@ -1,11 +0,0 @@
1
- import { Sdk } from './gen/video/sfu/models/models';
2
-
3
- let sdkInfo: Sdk | undefined;
4
-
5
- export const setSdkInfo = (info: Sdk) => {
6
- sdkInfo = info;
7
- };
8
-
9
- export const getSdkInfo = () => {
10
- return sdkInfo;
11
- };