@snapcall/stream-ui 1.4.1 → 1.5.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.
- package/dist/stream-ui.esm.js +944 -373
- package/dist/stream-ui.js +943 -372
- package/dist/stream-ui.umd.js +350 -180
- package/dist/types.d.ts +8 -13
- package/package.json +6 -2
package/dist/types.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import * as mediasoupClient from "mediasoup-client";
|
|
|
2
2
|
import { types } from "mediasoup-client";
|
|
3
3
|
import * as protooClient from "protoo-client";
|
|
4
4
|
import { Transport } from "mediasoup-client/lib/Transport";
|
|
5
|
-
import { MediaKind } from "mediasoup-client/lib/RtpParameters";
|
|
6
5
|
import { CSSProperties } from "react";
|
|
7
6
|
interface MenuItem {
|
|
8
7
|
id: string;
|
|
@@ -99,6 +98,9 @@ declare global {
|
|
|
99
98
|
step: number;
|
|
100
99
|
};
|
|
101
100
|
}
|
|
101
|
+
interface HTMLMediaElement {
|
|
102
|
+
sinkId?: string;
|
|
103
|
+
}
|
|
102
104
|
}
|
|
103
105
|
interface AudioLevelListener {
|
|
104
106
|
onAudioLevel?(audioLevel: number, id: string): void;
|
|
@@ -126,17 +128,13 @@ declare class AudioRenderer {
|
|
|
126
128
|
destroy(): void;
|
|
127
129
|
setSource(srcObject: MediaStream): void;
|
|
128
130
|
setSink(sinkId: string): Promise<void>;
|
|
131
|
+
getSink(): string | undefined;
|
|
129
132
|
play(): Promise<void>;
|
|
130
133
|
}
|
|
131
134
|
interface DeviceRequest {
|
|
132
135
|
requestId: string;
|
|
133
136
|
deviceType: DeviceType;
|
|
134
137
|
}
|
|
135
|
-
interface WebRTCTransportData {
|
|
136
|
-
kind: MediaKind;
|
|
137
|
-
transport: Transport;
|
|
138
|
-
disconnectTimeout: number | undefined;
|
|
139
|
-
}
|
|
140
138
|
interface CustomMessage {
|
|
141
139
|
chunks: Array<{
|
|
142
140
|
index: number;
|
|
@@ -282,12 +280,6 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
282
280
|
profile: Profile;
|
|
283
281
|
protooTransport: protooClient.WebSocketTransport;
|
|
284
282
|
protoo: protooClient.Peer;
|
|
285
|
-
mediasoupDevice: mediasoupClient.types.Device;
|
|
286
|
-
routerRtpCapabilities: mediasoupClient.types.RtpCapabilities;
|
|
287
|
-
recvVideoTransports?: WebRTCTransportData;
|
|
288
|
-
sendVideoTransports?: WebRTCTransportData;
|
|
289
|
-
recvAudioTransports?: WebRTCTransportData;
|
|
290
|
-
sendAudioTransports?: WebRTCTransportData;
|
|
291
283
|
micProducer?: mediasoupClient.types.Producer;
|
|
292
284
|
webcamProducer: mediasoupClient.types.Producer | null;
|
|
293
285
|
screenshareProducer: mediasoupClient.types.Producer | null;
|
|
@@ -373,13 +365,14 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
373
365
|
device: MediaDeviceInfo | null;
|
|
374
366
|
resolution: VideoResolution;
|
|
375
367
|
};
|
|
368
|
+
getCurrentMicrophoneId(): string | undefined;
|
|
369
|
+
getCurrentSpeakerId(): string;
|
|
376
370
|
setWebcamResolution(resolution: VideoResolution): Promise<void>;
|
|
377
371
|
createAudioRenderer(consumerId: string): AudioRenderer;
|
|
378
372
|
deleteAudioRenderer(consumerId: string): void;
|
|
379
373
|
playAudioRenderer(consumerId: string): Promise<void>;
|
|
380
374
|
setAudioSink(sinkId: string): Promise<void>;
|
|
381
375
|
dispatchEvent(event: SnapcallEvent<keyof StreamerEventMap>): boolean;
|
|
382
|
-
getShareLinkData(url: string): Promise<any>;
|
|
383
376
|
setConfig(config: Partial<Config>): void;
|
|
384
377
|
}
|
|
385
378
|
declare const streamerClient: StreamerClient;
|
|
@@ -426,6 +419,7 @@ interface StreamUIMethods {
|
|
|
426
419
|
getState: typeof streamerClient.getState;
|
|
427
420
|
setProfile: typeof streamerClient.setProfile;
|
|
428
421
|
setConfig: typeof streamerClient.setConfig;
|
|
422
|
+
setLogLevel: (level: number) => void;
|
|
429
423
|
}
|
|
430
424
|
interface ControlSettings {
|
|
431
425
|
available?: boolean;
|
|
@@ -448,6 +442,7 @@ interface StreamUIBaseOptions {
|
|
|
448
442
|
showMenuButton?: boolean;
|
|
449
443
|
GDPRDisclaimer?: boolean;
|
|
450
444
|
streamApiURL?: string;
|
|
445
|
+
language?: string;
|
|
451
446
|
}
|
|
452
447
|
interface StreamUIInitOptions extends StreamUIBaseOptions {
|
|
453
448
|
element: HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapcall/stream-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/stream-ui.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"build:npm": "parcel build --no-source-maps",
|
|
31
31
|
"build:s3": "parcel build --no-source-maps --target umd",
|
|
32
32
|
"typecheck": "tsc --noEmit",
|
|
33
|
-
"lint": "eslint src --ext .ts,.tsx",
|
|
33
|
+
"lint": "eslint src streamerClient --ext .ts,.tsx",
|
|
34
34
|
"prettier": "prettier --check ."
|
|
35
35
|
},
|
|
36
36
|
"keywords": [],
|
|
@@ -39,6 +39,7 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@sentry/browser": "^7.0.0",
|
|
41
41
|
"bowser": "^2.11.0",
|
|
42
|
+
"i18next": "^21.9.1",
|
|
42
43
|
"inobounce": "^0.2.1",
|
|
43
44
|
"mediasoup-client": "^3.6.52",
|
|
44
45
|
"protoo-client": "^4.0.6",
|
|
@@ -46,6 +47,7 @@
|
|
|
46
47
|
"react": "^17.0.2",
|
|
47
48
|
"react-dom": "^17.0.2",
|
|
48
49
|
"react-hot-toast": "^2.2.0",
|
|
50
|
+
"react-i18next": "^11.18.5",
|
|
49
51
|
"styled-components": "^5.3.3"
|
|
50
52
|
},
|
|
51
53
|
"devDependencies": {
|
|
@@ -69,6 +71,7 @@
|
|
|
69
71
|
"@sentry/browser": "^7.0.0",
|
|
70
72
|
"@types/youtube": "^0.0.47",
|
|
71
73
|
"bowser": "^2.11.0",
|
|
74
|
+
"i18next": "^21.9.1",
|
|
72
75
|
"inobounce": "^0.2.1",
|
|
73
76
|
"mediasoup-client": "^3.6.52",
|
|
74
77
|
"protoo-client": "^4.0.6",
|
|
@@ -76,6 +79,7 @@
|
|
|
76
79
|
"react": "^17.0.2",
|
|
77
80
|
"react-dom": "^17.0.2",
|
|
78
81
|
"react-hot-toast": "^2.2.0",
|
|
82
|
+
"react-i18next": "^11.18.5",
|
|
79
83
|
"styled-components": "^5.3.3",
|
|
80
84
|
"uuid": "^8.3.2"
|
|
81
85
|
}
|