@snapcall/stream-ui 1.32.2 → 1.33.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 +8257 -11522
- package/dist/stream-ui.js +8221 -11486
- package/dist/types.d.ts +9 -59
- package/package.json +2 -8
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 { Transport } from "mediasoup-client/lib/Transport";
|
|
4
4
|
import * as protooClient from "protoo-client";
|
|
5
|
-
import { CSSProperties } from "react";
|
|
6
5
|
type VideoResolution = 'qvga' | 'vga' | 'hd';
|
|
7
6
|
type PeerId = string;
|
|
8
7
|
type DeviceType = 'webcam' | 'screen' | 'microphone';
|
|
@@ -167,32 +166,6 @@ declare global {
|
|
|
167
166
|
focusMode?: Array<'none' | 'manual' | 'single-shot' | 'continuous'>;
|
|
168
167
|
}
|
|
169
168
|
}
|
|
170
|
-
interface MenuItem {
|
|
171
|
-
id: string;
|
|
172
|
-
title: string;
|
|
173
|
-
jsxIcon?: JSX.Element;
|
|
174
|
-
srcIcon?: string;
|
|
175
|
-
action: () => void;
|
|
176
|
-
danger?: boolean;
|
|
177
|
-
isNew?: boolean;
|
|
178
|
-
}
|
|
179
|
-
interface MenuCategory {
|
|
180
|
-
id: string;
|
|
181
|
-
title?: string;
|
|
182
|
-
items: MenuItem[];
|
|
183
|
-
}
|
|
184
|
-
type DisplayType = 'icon' | 'full';
|
|
185
|
-
interface SettingShortcut {
|
|
186
|
-
id: string;
|
|
187
|
-
displayType: DisplayType;
|
|
188
|
-
}
|
|
189
|
-
interface SettingsCategory extends MenuCategory {
|
|
190
|
-
position?: number;
|
|
191
|
-
items: SettingsItem[];
|
|
192
|
-
}
|
|
193
|
-
interface SettingsItem extends MenuItem {
|
|
194
|
-
position?: number;
|
|
195
|
-
}
|
|
196
169
|
interface AudioLevelListener {
|
|
197
170
|
onAudioLevel?(audioLevel: number, id: string): void;
|
|
198
171
|
onMuteDetection?(id: string): void;
|
|
@@ -424,6 +397,7 @@ interface StreamerEventMap {
|
|
|
424
397
|
localVideoUnavailable: SnapCall.BaseEvent['detail'];
|
|
425
398
|
localVideoAvailable: SnapCall.BaseEvent['detail'];
|
|
426
399
|
microphoneEnabled: SnapCall.BaseEvent['detail'];
|
|
400
|
+
microphoneChange: SnapCall.BaseEvent['detail'];
|
|
427
401
|
agentIdentity: SnapCall.AgentIdentityEvent['detail'];
|
|
428
402
|
peerClosed: SnapCall.StreamEvent['detail'];
|
|
429
403
|
newPeer: SnapCall.PeerInfoEvent['detail'];
|
|
@@ -606,6 +580,7 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
606
580
|
}>;
|
|
607
581
|
createEvents(assets: Array<{
|
|
608
582
|
filename: string;
|
|
583
|
+
duration?: number;
|
|
609
584
|
type: MediaType;
|
|
610
585
|
geolocation?: GeolocationPosition & {
|
|
611
586
|
errorCode?: number;
|
|
@@ -675,35 +650,13 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
675
650
|
}>;
|
|
676
651
|
}
|
|
677
652
|
declare const streamerClient: StreamerClient;
|
|
678
|
-
interface
|
|
679
|
-
icon?: JSX.Element | string;
|
|
680
|
-
subText?: string;
|
|
681
|
-
button?: {
|
|
682
|
-
icon?: JSX.Element | string;
|
|
683
|
-
text: string;
|
|
684
|
-
action: () => void;
|
|
685
|
-
style?: CSSProperties;
|
|
686
|
-
};
|
|
687
|
-
status?: {
|
|
688
|
-
icon?: JSX.Element | string;
|
|
689
|
-
text?: string;
|
|
690
|
-
boldText?: string;
|
|
691
|
-
};
|
|
692
|
-
width?: string;
|
|
693
|
-
backgroundColor?: string;
|
|
694
|
-
messageStyle?: CSSProperties;
|
|
695
|
-
ellipsis?: boolean;
|
|
696
|
-
}
|
|
697
|
-
type NotificationButton = NonNullable<NotificationOptions['button']>;
|
|
698
|
-
interface CustomNotificationButton extends Omit<NotificationButton, 'action'> {
|
|
699
|
-
action: ({ close }: {
|
|
700
|
-
close: () => void;
|
|
701
|
-
}) => void;
|
|
702
|
-
}
|
|
703
|
-
interface SendNotificationOptions extends Omit<NotificationOptions, 'button'> {
|
|
704
|
-
button?: CustomNotificationButton;
|
|
653
|
+
interface SendNotificationOptions {
|
|
705
654
|
duration?: number;
|
|
655
|
+
icon?: JSX.Element;
|
|
706
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Do NOT use this function, it only exists for backward compatibility (Kustomer).
|
|
659
|
+
*/
|
|
707
660
|
declare const sendNotification: (message: string, options?: SendNotificationOptions) => void;
|
|
708
661
|
interface StreamUIMethods {
|
|
709
662
|
initV2: (options: StreamUIInitOptions) => Promise<void>;
|
|
@@ -711,7 +664,6 @@ interface StreamUIMethods {
|
|
|
711
664
|
joinRoom: (token: string, options: StreamUIInitOptions) => Promise<void>;
|
|
712
665
|
setAgentIdentity: typeof streamerClient.setAgentIdentity;
|
|
713
666
|
enableScreenshare: typeof streamerClient.enableScreenshare;
|
|
714
|
-
setExtraSettingsOptions: (extraOptions: SettingsCategory[]) => void;
|
|
715
667
|
sendNotification: typeof sendNotification;
|
|
716
668
|
startRecord: typeof streamerClient.startRecord;
|
|
717
669
|
stopRecord: typeof streamerClient.stopRecord;
|
|
@@ -750,8 +702,6 @@ interface StreamUIBaseOptions {
|
|
|
750
702
|
};
|
|
751
703
|
sharedURL?: string;
|
|
752
704
|
audioTiles?: boolean;
|
|
753
|
-
settingsShortcuts?: Array<SettingShortcut>;
|
|
754
|
-
extraSettingsOptions?: SettingsCategory[];
|
|
755
705
|
controls?: {
|
|
756
706
|
microphone?: ControlSettings;
|
|
757
707
|
camera?: ControlSettings;
|
|
@@ -787,8 +737,8 @@ declare global {
|
|
|
787
737
|
};
|
|
788
738
|
}
|
|
789
739
|
interface MediaSession {
|
|
790
|
-
setMicrophoneActive?: (active: boolean) => void
|
|
791
|
-
setCameraActive?: (active: boolean) => void
|
|
740
|
+
setMicrophoneActive?: (active: boolean) => void | Promise<void>;
|
|
741
|
+
setCameraActive?: (active: boolean) => void | Promise<void>;
|
|
792
742
|
setActionHandler(action: MediaSessionAction | 'togglemicrophone' | 'togglecamera' | 'hangup', handler: MediaSessionActionHandler | null): void;
|
|
793
743
|
}
|
|
794
744
|
interface WindowEventMap {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapcall/stream-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.33.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/stream-ui.js",
|
|
@@ -65,9 +65,7 @@
|
|
|
65
65
|
"qrcode": "^1.5.0",
|
|
66
66
|
"react": "^18.3.1",
|
|
67
67
|
"react-dom": "^18.3.1",
|
|
68
|
-
"react-
|
|
69
|
-
"react-i18next": "^14.1.1",
|
|
70
|
-
"styled-components": "^5.3.3"
|
|
68
|
+
"react-i18next": "^14.1.1"
|
|
71
69
|
},
|
|
72
70
|
"devDependencies": {
|
|
73
71
|
"@localazy/cli": "^1.7.10",
|
|
@@ -80,7 +78,6 @@
|
|
|
80
78
|
"@types/react": "^18.3.2",
|
|
81
79
|
"@types/react-dom": "^18.3.0",
|
|
82
80
|
"@types/react-transition-group": "^4.4.5",
|
|
83
|
-
"@types/styled-components": "^5.1.25",
|
|
84
81
|
"@types/uuid": "^9.0.8",
|
|
85
82
|
"buffer": "^6.0.3",
|
|
86
83
|
"eslint": "^8.16.0",
|
|
@@ -97,7 +94,6 @@
|
|
|
97
94
|
"typescript": "^5.4.5"
|
|
98
95
|
},
|
|
99
96
|
"dependencies": {
|
|
100
|
-
"@lottiefiles/react-lottie-player": "^3.5.3",
|
|
101
97
|
"@mediapipe/selfie_segmentation": "^0.1.1632777926",
|
|
102
98
|
"@sentry/browser": "^7.0.0",
|
|
103
99
|
"@snapcall/design-system": "^1.22.1",
|
|
@@ -109,11 +105,9 @@
|
|
|
109
105
|
"protoo-client": "^4.0.6",
|
|
110
106
|
"qrcode": "^1.5.0",
|
|
111
107
|
"react-hook-form": "^7.51.5",
|
|
112
|
-
"react-hot-toast": "^2.2.0",
|
|
113
108
|
"react-markdown": "^10.1.0",
|
|
114
109
|
"react-stately": "^3.31.1",
|
|
115
110
|
"react-type-animation": "^3.2.0",
|
|
116
|
-
"styled-components": "^5.3.3",
|
|
117
111
|
"uuid": "^9.0.0"
|
|
118
112
|
}
|
|
119
113
|
}
|