@snapcall/stream-ui 1.26.1 → 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 +440 -199
- package/dist/stream-ui.js +449 -208
- package/dist/types.d.ts +29 -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;
|
|
@@ -219,6 +221,7 @@ interface MediapipeOptions {
|
|
|
219
221
|
background?: CanvasImageSource;
|
|
220
222
|
blurLevel?: number;
|
|
221
223
|
}
|
|
224
|
+
type MediaType = 'image' | 'video' | 'audio' | 'screenshare';
|
|
222
225
|
interface DeviceRequest {
|
|
223
226
|
requestId: string;
|
|
224
227
|
deviceType: DeviceType;
|
|
@@ -232,7 +235,7 @@ interface CustomMessage {
|
|
|
232
235
|
}
|
|
233
236
|
declare global {
|
|
234
237
|
export namespace SnapCall {
|
|
235
|
-
export { Permissions, Permission };
|
|
238
|
+
export { Permissions, Permission, MediaType };
|
|
236
239
|
export type SnapcallEvent<T> = CustomEvent<T>;
|
|
237
240
|
export type PeersInfoEvent = SnapcallEvent<{
|
|
238
241
|
videoRecordStarted: boolean;
|
|
@@ -316,8 +319,10 @@ declare global {
|
|
|
316
319
|
avatarUrl?: string;
|
|
317
320
|
}>;
|
|
318
321
|
export type RecordStoppedEvent = SnapcallEvent<{
|
|
319
|
-
|
|
320
|
-
|
|
322
|
+
filename: string;
|
|
323
|
+
durationMs?: number;
|
|
324
|
+
sizeInBytes?: number;
|
|
325
|
+
success: boolean;
|
|
321
326
|
}>;
|
|
322
327
|
export type AudioLevelEvent = SnapcallEvent<{
|
|
323
328
|
audioLevel: number;
|
|
@@ -514,14 +519,20 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
514
519
|
}): void;
|
|
515
520
|
saveCapture(base64Image: string): Promise<{
|
|
516
521
|
url: string;
|
|
517
|
-
|
|
522
|
+
filename: string;
|
|
518
523
|
}>;
|
|
519
|
-
|
|
524
|
+
uploadAsset(file: any): Promise<{
|
|
520
525
|
url?: string;
|
|
521
|
-
|
|
522
|
-
success: boolean;
|
|
526
|
+
filename: string;
|
|
523
527
|
}>;
|
|
524
|
-
|
|
528
|
+
createEvents(assets: Array<{
|
|
529
|
+
filename: string;
|
|
530
|
+
type: MediaType;
|
|
531
|
+
}>): Promise<{
|
|
532
|
+
success: boolean;
|
|
533
|
+
filename: string;
|
|
534
|
+
id: number;
|
|
535
|
+
}[]>;
|
|
525
536
|
captureVideo(videoElement?: HTMLVideoElement): Promise<string>;
|
|
526
537
|
requestLocalVideo(element: HTMLVideoElement): {
|
|
527
538
|
facingMode: string;
|
|
@@ -566,6 +577,13 @@ declare class StreamerClient extends StreamerEventTargetType implements AudioLev
|
|
|
566
577
|
stopRecord(): Promise<void>;
|
|
567
578
|
getPublicPage(token: string): Promise<PublicPage>;
|
|
568
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
|
+
}>;
|
|
569
587
|
}
|
|
570
588
|
declare const streamerClient: StreamerClient;
|
|
571
589
|
interface NotificationOptions {
|
|
@@ -663,6 +681,7 @@ interface StreamUIBaseOptions {
|
|
|
663
681
|
apiUrl?: string;
|
|
664
682
|
tracking?: boolean;
|
|
665
683
|
language?: string;
|
|
684
|
+
disableSessionFetching?: boolean;
|
|
666
685
|
}
|
|
667
686
|
interface StreamUIInitOptions extends StreamUIBaseOptions {
|
|
668
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"
|