@snapcall/stream-ui 1.37.5 → 1.38.0-beta.2
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 +4594 -4757
- package/dist/stream-ui.js +4590 -4753
- package/dist/types.d.ts +129 -29
- package/package.json +6 -6
package/dist/types.d.ts
CHANGED
|
@@ -14,15 +14,10 @@ interface Step {
|
|
|
14
14
|
token: string;
|
|
15
15
|
title: string;
|
|
16
16
|
config?: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
image_url: string;
|
|
20
|
-
source?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
image_url?: string;
|
|
21
19
|
button_text?: string;
|
|
22
|
-
|
|
23
|
-
upload?: boolean;
|
|
24
|
-
allow_video?: boolean;
|
|
25
|
-
allow_screensharing?: boolean;
|
|
20
|
+
use_workspace_logo?: boolean;
|
|
26
21
|
};
|
|
27
22
|
translation: {
|
|
28
23
|
title?: string;
|
|
@@ -38,25 +33,77 @@ interface Flow {
|
|
|
38
33
|
token: string;
|
|
39
34
|
name: string;
|
|
40
35
|
is_default: number;
|
|
36
|
+
config?: {
|
|
37
|
+
description?: string;
|
|
38
|
+
image_url?: string;
|
|
39
|
+
output_language?: string;
|
|
40
|
+
stock_detection?: boolean;
|
|
41
|
+
source?: string;
|
|
42
|
+
geolocation?: boolean;
|
|
43
|
+
external_links?: Array<{
|
|
44
|
+
title: string;
|
|
45
|
+
url: string;
|
|
46
|
+
}>;
|
|
47
|
+
call?: {
|
|
48
|
+
waiting_room?: boolean;
|
|
49
|
+
waiting_room_title?: string;
|
|
50
|
+
waiting_room_description?: string;
|
|
51
|
+
waiting_room_image_url?: string;
|
|
52
|
+
video?: boolean;
|
|
53
|
+
screensharing?: boolean;
|
|
54
|
+
recording?: boolean;
|
|
55
|
+
snapshot?: boolean;
|
|
56
|
+
pointer?: boolean;
|
|
57
|
+
};
|
|
58
|
+
acknowledgment?: {
|
|
59
|
+
enabled: boolean;
|
|
60
|
+
isPublic: boolean;
|
|
61
|
+
hideAi: boolean;
|
|
62
|
+
};
|
|
63
|
+
docupass?: boolean;
|
|
64
|
+
};
|
|
41
65
|
steps: Array<Step>;
|
|
42
66
|
}
|
|
43
|
-
interface
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
67
|
+
interface StreamInfo {
|
|
68
|
+
type: 'assist' | 'instant' | 'schedule';
|
|
69
|
+
defaultPublicPage?: {
|
|
70
|
+
token: string;
|
|
71
|
+
};
|
|
72
|
+
streamer_instance?: 'recorder';
|
|
73
|
+
plan: {
|
|
74
|
+
id: number;
|
|
75
|
+
name: string;
|
|
76
|
+
users_limit: number;
|
|
77
|
+
interactions_limit: number;
|
|
78
|
+
calls_interactions_limit: number;
|
|
79
|
+
clips_interactions_limit: number;
|
|
80
|
+
is_addon: 0;
|
|
81
|
+
permissions: Permissions;
|
|
82
|
+
quantity: number;
|
|
83
|
+
status: string;
|
|
84
|
+
};
|
|
85
|
+
recordings?: {
|
|
86
|
+
enabled: true;
|
|
87
|
+
video: true;
|
|
88
|
+
};
|
|
89
|
+
company_id: number;
|
|
90
|
+
flow: Flow;
|
|
91
|
+
defaultVideoBackground?: string;
|
|
92
|
+
videoBackgrounds?: Array<string>;
|
|
93
|
+
company: {
|
|
94
|
+
name: string;
|
|
95
|
+
company_name: string;
|
|
96
|
+
avatar_url?: string;
|
|
97
|
+
terminate_enabled?: boolean;
|
|
98
|
+
ai_blocked?: boolean;
|
|
99
|
+
hide_stream_invite?: boolean;
|
|
100
|
+
};
|
|
48
101
|
}
|
|
49
102
|
interface InitResult {
|
|
50
|
-
|
|
51
|
-
flow?: Flow;
|
|
52
|
-
flowV0?: FlowV0;
|
|
53
|
-
hideStreamInvite?: boolean;
|
|
54
|
-
videoBackgrounds?: Array<string>;
|
|
55
|
-
defaultVideoBackground?: string;
|
|
103
|
+
peerId: string;
|
|
56
104
|
}
|
|
57
105
|
interface JoinOptions {
|
|
58
106
|
languageCode?: string;
|
|
59
|
-
flowToken?: string;
|
|
60
107
|
recorder?: boolean;
|
|
61
108
|
apiKey?: string;
|
|
62
109
|
email?: string;
|
|
@@ -105,11 +152,13 @@ interface StreamerState extends PeerState {
|
|
|
105
152
|
peers: Array<PeerState>;
|
|
106
153
|
joinOptions: JoinOptions;
|
|
107
154
|
clientId: string;
|
|
155
|
+
drawerEnabled: boolean;
|
|
108
156
|
}
|
|
109
157
|
interface ProducerData {
|
|
110
158
|
producerId: string;
|
|
111
159
|
deviceType: DeviceType;
|
|
112
160
|
paused: boolean;
|
|
161
|
+
appData: Record<string, any>;
|
|
113
162
|
}
|
|
114
163
|
interface PeerInfo {
|
|
115
164
|
id?: PeerId;
|
|
@@ -124,6 +173,9 @@ type ProducerId = string;
|
|
|
124
173
|
interface ConsumerData {
|
|
125
174
|
mediaSoupConsumer: types.Consumer;
|
|
126
175
|
deviceType?: DeviceType;
|
|
176
|
+
producerId: ProducerId;
|
|
177
|
+
peerId: PeerId;
|
|
178
|
+
appData?: Record<string, any>;
|
|
127
179
|
}
|
|
128
180
|
interface DevicesState {
|
|
129
181
|
microphone: {
|
|
@@ -301,6 +353,25 @@ type EventAnswer = {
|
|
|
301
353
|
};
|
|
302
354
|
created_at?: string;
|
|
303
355
|
};
|
|
356
|
+
declare class VideoDrawer {
|
|
357
|
+
consumerId: string;
|
|
358
|
+
peerId: string;
|
|
359
|
+
producerId: string;
|
|
360
|
+
deviceType: DeviceType;
|
|
361
|
+
constructor({ deviceType, canvas, video, consumerId, peerId, producerId, }: {
|
|
362
|
+
deviceType: DeviceType;
|
|
363
|
+
canvas: HTMLCanvasElement;
|
|
364
|
+
video: HTMLVideoElement;
|
|
365
|
+
consumerId: string;
|
|
366
|
+
peerId: string;
|
|
367
|
+
producerId: string;
|
|
368
|
+
});
|
|
369
|
+
onFrame(): void;
|
|
370
|
+
onFrameScreen(): void;
|
|
371
|
+
setVideoDrawerDisplay(video: HTMLVideoElement): void;
|
|
372
|
+
createStream(): Promise<MediaStream>;
|
|
373
|
+
clean(): Promise<void>;
|
|
374
|
+
}
|
|
304
375
|
interface DeviceRequest {
|
|
305
376
|
requestId: string;
|
|
306
377
|
deviceType: DeviceType;
|
|
@@ -338,6 +409,10 @@ declare global {
|
|
|
338
409
|
displayName?: string;
|
|
339
410
|
profile: Profile;
|
|
340
411
|
}>;
|
|
412
|
+
export type CustomVideoEnabledEvent = SnapcallEvent<{
|
|
413
|
+
deviceType: DeviceType;
|
|
414
|
+
appData: Record<string, any>;
|
|
415
|
+
}>;
|
|
341
416
|
export type RequestAccessEvent = SnapcallEvent<{
|
|
342
417
|
success: boolean;
|
|
343
418
|
message?: string;
|
|
@@ -374,6 +449,7 @@ declare global {
|
|
|
374
449
|
mediaId?: string;
|
|
375
450
|
deviceType: DeviceType;
|
|
376
451
|
paused: boolean;
|
|
452
|
+
appData?: Record<string, any>;
|
|
377
453
|
}>;
|
|
378
454
|
export type NetworkStateEvent = SnapcallEvent<{
|
|
379
455
|
isOk: boolean;
|
|
@@ -411,6 +487,14 @@ declare global {
|
|
|
411
487
|
sizeInBytes?: number;
|
|
412
488
|
success: boolean;
|
|
413
489
|
}>;
|
|
490
|
+
export type DrawerStoppedEvent = SnapcallEvent<{
|
|
491
|
+
peerId: string;
|
|
492
|
+
mediaId: string;
|
|
493
|
+
}>;
|
|
494
|
+
export type DrawerStartedEvent = SnapcallEvent<{
|
|
495
|
+
peerId: string;
|
|
496
|
+
mediaId: string;
|
|
497
|
+
}>;
|
|
414
498
|
export type AudioLevelEvent = SnapcallEvent<{
|
|
415
499
|
audioLevel: number;
|
|
416
500
|
}>;
|
|
@@ -455,6 +539,8 @@ interface StreamerEventMap {
|
|
|
455
539
|
profileUpdate: SnapCall.ProfileUpdateEvent['detail'];
|
|
456
540
|
webcamsUpdate: SnapCall.WebcamUpdateEvent['detail'];
|
|
457
541
|
customMessage: SnapCall.CustomMessageEvent['detail'];
|
|
542
|
+
drawerStopped: SnapCall.BaseEvent['detail'];
|
|
543
|
+
drawerStarted: SnapCall.BaseEvent['detail'];
|
|
458
544
|
mediaStart: SnapCall.MediaEvent['detail'];
|
|
459
545
|
mediaStop: SnapCall.MediaEvent['detail'];
|
|
460
546
|
mediaPause: SnapCall.MediaEvent['detail'];
|
|
@@ -464,6 +550,8 @@ interface StreamerEventMap {
|
|
|
464
550
|
defaultAudioDeviceChange: SnapCall.AudioDeviceEvent['detail'];
|
|
465
551
|
screenshareEnabled: SnapCall.BaseEvent['detail'];
|
|
466
552
|
screenshareDisabled: SnapCall.BaseEvent['detail'];
|
|
553
|
+
customVideoEnabled: SnapCall.CustomVideoEnabledEvent['detail'];
|
|
554
|
+
customVideoDisabled: SnapCall.CustomVideoEnabledEvent['detail'];
|
|
467
555
|
localVideoRotate: SnapCall.BaseEvent['detail'];
|
|
468
556
|
enterRoom: SnapCall.PeersInfoEvent['detail'];
|
|
469
557
|
displayName: SnapCall.PeerInfoEvent['detail'];
|
|
@@ -526,6 +614,7 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
526
614
|
webcamProducer: mediasoupClient.types.Producer | null;
|
|
527
615
|
screenshareVideoProducer?: mediasoupClient.types.Producer;
|
|
528
616
|
screenshareAudioProducer?: mediasoupClient.types.Producer;
|
|
617
|
+
customVideoProducer?: mediasoupClient.types.Producer;
|
|
529
618
|
pendingDeviceRequest: Record<string, DeviceRequest>;
|
|
530
619
|
joinOptions: JoinOptions;
|
|
531
620
|
audioInputDefaultDevice?: MediaDeviceInfo;
|
|
@@ -541,7 +630,7 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
541
630
|
onStartSpeak(): void;
|
|
542
631
|
onStopSpeak(): void;
|
|
543
632
|
generateToken(bid: string): Promise<string>;
|
|
544
|
-
init(room
|
|
633
|
+
init(room: string, streamInfo: StreamInfo, options?: JoinOptions): Promise<InitResult>;
|
|
545
634
|
onTransportManyDisconnections(transport: mediasoupClient.types.Transport): void;
|
|
546
635
|
onTransportStateChangeNetwork(transport: mediasoupClient.types.Transport, isOk: boolean): void;
|
|
547
636
|
onNetworkLog(transport: mediasoupClient.types.Transport, log: NetworkLog): void;
|
|
@@ -572,6 +661,15 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
572
661
|
endCall(): void;
|
|
573
662
|
terminateRoom(): void;
|
|
574
663
|
isVideoZoomAvailable(): boolean;
|
|
664
|
+
drawer?: VideoDrawer | undefined;
|
|
665
|
+
stopDrawer(): Promise<void>;
|
|
666
|
+
drawInVideo({ peerId, mediaId, deviceType, videoElement, canvasElement, }: {
|
|
667
|
+
peerId: string;
|
|
668
|
+
mediaId?: string;
|
|
669
|
+
deviceType: DeviceType;
|
|
670
|
+
videoElement: HTMLVideoElement;
|
|
671
|
+
canvasElement: HTMLCanvasElement;
|
|
672
|
+
}): Promise<void>;
|
|
575
673
|
processMediaPermissionsAndResolveRequests(constraints: MediaStreamConstraints): Promise<void>;
|
|
576
674
|
handleGetUserMediaError(deviceType: DeviceType, getUserMediaPromise: Promise<MediaStream>): Promise<MediaStream>;
|
|
577
675
|
restartIce(transport: mediasoupClient.types.Transport): Promise<void>;
|
|
@@ -594,6 +692,12 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
594
692
|
zoomVideo(): Promise<void>;
|
|
595
693
|
unzoomVideo(): Promise<void>;
|
|
596
694
|
disableVideo(): Promise<void>;
|
|
695
|
+
enableCustomVideo(options: {
|
|
696
|
+
mediaStream?: MediaStream;
|
|
697
|
+
deviceType: DeviceType;
|
|
698
|
+
appData: Record<string, any>;
|
|
699
|
+
}): Promise<void>;
|
|
700
|
+
disableCustomVideo(): Promise<void>;
|
|
597
701
|
enableScreenshare(options?: {
|
|
598
702
|
mediaStream?: MediaStream;
|
|
599
703
|
audioTransportOption: 'mix' | 'none' | 'classic';
|
|
@@ -631,11 +735,12 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
631
735
|
peerId: PeerId;
|
|
632
736
|
producersData: Array<ProducerData>;
|
|
633
737
|
}): void;
|
|
634
|
-
consumeProducer({ peerId, producerId, deviceType, paused, }: {
|
|
738
|
+
consumeProducer({ peerId, producerId, deviceType, paused, appData, }: {
|
|
635
739
|
peerId: PeerId;
|
|
636
740
|
producerId: ProducerId;
|
|
637
741
|
deviceType: DeviceType;
|
|
638
742
|
paused: boolean;
|
|
743
|
+
appData: Record<string, any>;
|
|
639
744
|
}): Promise<void>;
|
|
640
745
|
setDisplayName(displayName: string): Promise<void>;
|
|
641
746
|
setProfile(profile: Profile): Promise<void>;
|
|
@@ -733,13 +838,8 @@ interface StreamUIBaseOptions {
|
|
|
733
838
|
email?: string;
|
|
734
839
|
headless?: boolean;
|
|
735
840
|
greeting?: boolean;
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
enabledModes: Array<'video' | 'screen' | 'photo' | 'audio' | 'upload'>;
|
|
739
|
-
enabled: boolean;
|
|
740
|
-
defaultMode?: 'photo' | 'video' | 'audio' | 'screen' | 'upload';
|
|
741
|
-
skipOnboarding?: boolean;
|
|
742
|
-
};
|
|
841
|
+
flow?: Flow;
|
|
842
|
+
isRecorder?: boolean;
|
|
743
843
|
sharedURL?: string;
|
|
744
844
|
audioTiles?: boolean;
|
|
745
845
|
controls?: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapcall/stream-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.38.0-beta.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/stream-ui.js",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"license": "ISC",
|
|
58
58
|
"peerDependencies": {
|
|
59
59
|
"bowser": "^2.11.0",
|
|
60
|
-
"i18next": "^
|
|
60
|
+
"i18next": "^25.5.2",
|
|
61
61
|
"inobounce": "^0.2.1",
|
|
62
62
|
"mediasoup-client": "^3.15.6",
|
|
63
63
|
"protoo-client": "^4.0.6",
|
|
64
64
|
"qrcode": "^1.5.4",
|
|
65
|
-
"react": "^
|
|
66
|
-
"react-dom": "^
|
|
67
|
-
"react-i18next": "^
|
|
65
|
+
"react": "^19.1.1",
|
|
66
|
+
"react-dom": "^19.1.1",
|
|
67
|
+
"react-i18next": "^15.7.3"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@localazy/cli": "^2.0.8",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
96
|
"@mediapipe/selfie_segmentation": "^0.1.1675465747",
|
|
97
|
-
"@snapcall/design-system": "^1.23.
|
|
97
|
+
"@snapcall/design-system": "^1.23.3",
|
|
98
98
|
"@tanstack/react-query": "^5.81.5",
|
|
99
99
|
"bowser": "^2.11.0",
|
|
100
100
|
"classnames": "^2.5.1",
|