@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.
- package/CHANGELOG.md +14 -0
- package/dist/index.browser.es.js +19 -3
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +22 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.es.js +19 -3
- package/dist/index.es.js.map +1 -1
- package/dist/src/client-details.d.ts +7 -0
- package/dist/src/gen/coordinator/index.d.ts +9 -3
- package/index.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +4 -2
- package/src/client-details.ts +29 -0
- package/src/gen/coordinator/index.ts +9 -3
- package/dist/src/sdk-info.d.ts +0 -3
- package/src/sdk-info.ts +0 -11
|
@@ -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
|
-
*
|
|
1586
|
+
*
|
|
1587
1587
|
* @type {string}
|
|
1588
1588
|
* @memberof CallUserMuted
|
|
1589
1589
|
*/
|
|
1590
|
-
|
|
1590
|
+
from_user_id: string;
|
|
1591
1591
|
/**
|
|
1592
1592
|
*
|
|
1593
1593
|
* @type {Array<string>}
|
|
1594
1594
|
* @memberof CallUserMuted
|
|
1595
1595
|
*/
|
|
1596
|
-
|
|
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
package/package.json
CHANGED
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 './
|
|
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
|
-
//
|
|
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
|
-
*
|
|
1573
|
+
*
|
|
1574
1574
|
* @type {string}
|
|
1575
1575
|
* @memberof CallUserMuted
|
|
1576
1576
|
*/
|
|
1577
|
-
|
|
1577
|
+
from_user_id: string;
|
|
1578
1578
|
/**
|
|
1579
1579
|
*
|
|
1580
1580
|
* @type {Array<string>}
|
|
1581
1581
|
* @memberof CallUserMuted
|
|
1582
1582
|
*/
|
|
1583
|
-
|
|
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
|
*
|
package/dist/src/sdk-info.d.ts
DELETED