@snapcall/stream-ui 1.26.0 → 1.27.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 +628 -304
- package/dist/stream-ui.js +636 -312
- package/dist/types.d.ts +31 -10
- package/package.json +3 -2
package/dist/types.d.ts
CHANGED
|
@@ -15,8 +15,10 @@ interface Step {
|
|
|
15
15
|
default_type: 'video' | 'audio' | 'screen' | 'image';
|
|
16
16
|
token: string;
|
|
17
17
|
title: string;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
config?: {
|
|
19
|
+
description: string;
|
|
20
|
+
image_url: string;
|
|
21
|
+
};
|
|
20
22
|
translation: {
|
|
21
23
|
title?: string;
|
|
22
24
|
description?: string;
|
|
@@ -40,6 +42,7 @@ interface InitResult {
|
|
|
40
42
|
flow?: Flow;
|
|
41
43
|
flowV0?: FlowV0;
|
|
42
44
|
videoUpload?: boolean;
|
|
45
|
+
hideStreamInvite?: boolean;
|
|
43
46
|
}
|
|
44
47
|
interface JoinOptions {
|
|
45
48
|
languageCode?: string;
|
|
@@ -90,6 +93,7 @@ interface StreamerState extends PeerState {
|
|
|
90
93
|
waitingRoomAccess: boolean;
|
|
91
94
|
peers: Array<PeerState>;
|
|
92
95
|
joinOptions: JoinOptions;
|
|
96
|
+
clientId: string;
|
|
93
97
|
}
|
|
94
98
|
interface ProducerData {
|
|
95
99
|
producerId: string;
|
|
@@ -217,6 +221,7 @@ interface MediapipeOptions {
|
|
|
217
221
|
background?: CanvasImageSource;
|
|
218
222
|
blurLevel?: number;
|
|
219
223
|
}
|
|
224
|
+
type MediaType = 'image' | 'video' | 'audio' | 'screenshare';
|
|
220
225
|
interface DeviceRequest {
|
|
221
226
|
requestId: string;
|
|
222
227
|
deviceType: DeviceType;
|
|
@@ -230,7 +235,7 @@ interface CustomMessage {
|
|
|
230
235
|
}
|
|
231
236
|
declare global {
|
|
232
237
|
export namespace SnapCall {
|
|
233
|
-
export { Permissions, Permission };
|
|
238
|
+
export { Permissions, Permission, MediaType };
|
|
234
239
|
export type SnapcallEvent<T> = CustomEvent<T>;
|
|
235
240
|
export type PeersInfoEvent = SnapcallEvent<{
|
|
236
241
|
videoRecordStarted: boolean;
|
|
@@ -314,8 +319,10 @@ declare global {
|
|
|
314
319
|
avatarUrl?: string;
|
|
315
320
|
}>;
|
|
316
321
|
export type RecordStoppedEvent = SnapcallEvent<{
|
|
317
|
-
|
|
318
|
-
|
|
322
|
+
filename: string;
|
|
323
|
+
durationMs?: number;
|
|
324
|
+
sizeInBytes?: number;
|
|
325
|
+
success: boolean;
|
|
319
326
|
}>;
|
|
320
327
|
export type AudioLevelEvent = SnapcallEvent<{
|
|
321
328
|
audioLevel: number;
|
|
@@ -512,14 +519,20 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
512
519
|
}): void;
|
|
513
520
|
saveCapture(base64Image: string): Promise<{
|
|
514
521
|
url: string;
|
|
515
|
-
|
|
522
|
+
filename: string;
|
|
516
523
|
}>;
|
|
517
|
-
|
|
524
|
+
uploadAsset(file: any): Promise<{
|
|
518
525
|
url?: string;
|
|
519
|
-
|
|
520
|
-
success: boolean;
|
|
526
|
+
filename: string;
|
|
521
527
|
}>;
|
|
522
|
-
|
|
528
|
+
createEvents(assets: Array<{
|
|
529
|
+
filename: string;
|
|
530
|
+
type: MediaType;
|
|
531
|
+
}>): Promise<{
|
|
532
|
+
success: boolean;
|
|
533
|
+
filename: string;
|
|
534
|
+
id: number;
|
|
535
|
+
}[]>;
|
|
523
536
|
captureVideo(videoElement?: HTMLVideoElement): Promise<string>;
|
|
524
537
|
requestLocalVideo(element: HTMLVideoElement): {
|
|
525
538
|
facingMode: string;
|
|
@@ -564,6 +577,13 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
564
577
|
stopRecord(): Promise<void>;
|
|
565
578
|
getPublicPage(token: string): Promise<PublicPage>;
|
|
566
579
|
getWaitingRequests(): Promise<WaitingRequests>;
|
|
580
|
+
readAsset(file: string): Promise<{
|
|
581
|
+
url: string;
|
|
582
|
+
thumbnailUrl?: string;
|
|
583
|
+
}>;
|
|
584
|
+
deleteAsset(file: string): Promise<{
|
|
585
|
+
status: boolean;
|
|
586
|
+
}>;
|
|
567
587
|
}
|
|
568
588
|
declare const streamerClient: StreamerClient;
|
|
569
589
|
interface NotificationOptions {
|
|
@@ -661,6 +681,7 @@ interface StreamUIBaseOptions {
|
|
|
661
681
|
apiUrl?: string;
|
|
662
682
|
tracking?: boolean;
|
|
663
683
|
language?: string;
|
|
684
|
+
disableSessionFetching?: boolean;
|
|
664
685
|
}
|
|
665
686
|
interface StreamUIInitOptions extends StreamUIBaseOptions {
|
|
666
687
|
element: HTMLElement;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snapcall/stream-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.27.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"main": "dist/stream-ui.js",
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"scripts": {
|
|
39
39
|
"dev": "npm run serve",
|
|
40
40
|
"serve": "APP_ENV=local parcel serve --https --host 0.0.0.0 --target html",
|
|
41
|
+
"servewin": "parcel serve --https --host 0.0.0.0 --target html",
|
|
41
42
|
"build": "parcel build",
|
|
42
43
|
"build:npm": "parcel build --no-source-maps --target main --target module --target types",
|
|
43
44
|
"build:s3": "parcel build --no-source-maps --target umd --target html",
|
|
@@ -97,6 +98,7 @@
|
|
|
97
98
|
"@mediapipe/selfie_segmentation": "^0.1.1632777926",
|
|
98
99
|
"@sentry/browser": "^7.0.0",
|
|
99
100
|
"@snapcall/design-system": "^1.19.1",
|
|
101
|
+
"@tanstack/react-query": "^5.59.0",
|
|
100
102
|
"@types/youtube": "^0.0.50",
|
|
101
103
|
"bowser": "^2.11.0",
|
|
102
104
|
"classnames": "^2.3.2",
|
|
@@ -105,7 +107,6 @@
|
|
|
105
107
|
"qrcode": "^1.5.0",
|
|
106
108
|
"react-hook-form": "^7.51.5",
|
|
107
109
|
"react-hot-toast": "^2.2.0",
|
|
108
|
-
"react-query": "^3.39.3",
|
|
109
110
|
"react-stately": "^3.31.1",
|
|
110
111
|
"styled-components": "^5.3.3",
|
|
111
112
|
"uuid": "^9.0.0"
|