@stream-io/video-client 0.0.24 → 0.0.25
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 +7 -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/index.ts +1 -1
- package/package.json +1 -1
- package/src/Call.ts +4 -2
- package/src/client-details.ts +29 -0
- 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;
|
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
|
+
};
|
package/dist/src/sdk-info.d.ts
DELETED