react-covideo-embed 1.0.82-test.2 → 1.0.82
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/.eslintrc +56 -0
- package/build/index.js +623 -623
- package/build/index.js.map +1 -1
- package/build/react-covideo-embed.esm.js +6082 -6105
- package/build/react-covideo-embed.esm.js.map +1 -1
- package/dist/app/pages/preview/PreviewVideoPlayer.d.ts +1 -0
- package/dist/app/pages/recordv1/ChooseRecordingOptions.d.ts +2 -1
- package/dist/app/pages/recordv1/ModalRecordingVideoSettings.d.ts +2 -1
- package/dist/app/pages/recordv1/RecordCam.d.ts +3 -1
- package/dist/app/pages/recordv1/RecordingHeadingWithRouteGuard.d.ts +2 -1
- package/dist/app/pages/recordv1/detailsPreview/DetailsPreview.d.ts +1 -1
- package/dist/app/pages/recordv1/detailsPreview/types.d.ts +2 -1
- package/dist/index.d.ts +24 -0
- package/dist/lib/api/analytics/index.d.ts +3 -0
- package/dist/lib/api/analytics/types.d.ts +19 -0
- package/dist/lib/api/analytics/useUpdateStatsHotspotMutation.d.ts +3 -0
- package/dist/lib/api/analytics/useUpdateViewMutation.d.ts +3 -0
- package/dist/lib/api/analytics/utils.d.ts +1 -0
- package/dist/lib/api/index.d.ts +1 -0
- package/dist/lib/context/ConfigurationContext.d.ts +7 -1
- package/package.json +42 -37
- package/.vscode/settings.json +0 -12
- package/dist/index.js +0 -4567
- package/dist/index.js.map +0 -1
- package/dist/react-covideo-embed.css +0 -1
- package/dist/react-covideo-embed.esm.js +0 -18407
- package/dist/react-covideo-embed.esm.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PreviewVideoPlayer: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const ChooseRecordingOptions: ({ extendStyles, showPreview, onStartUpladingVoiceOverHandler, }: {
|
|
1
|
+
export declare const ChooseRecordingOptions: ({ extendStyles, showPreview, onStartUpladingVoiceOverHandler, autoStartCam, }: {
|
|
2
2
|
extendStyles?: {
|
|
3
3
|
mainRecordContentWrapper?: React.CSSProperties;
|
|
4
4
|
showRecorderWrapper?: React.CSSProperties;
|
|
@@ -7,4 +7,5 @@ export declare const ChooseRecordingOptions: ({ extendStyles, showPreview, onSta
|
|
|
7
7
|
showPreview?: boolean;
|
|
8
8
|
onStartUpladingVoiceOverHandler?: (blob: Blob) => void;
|
|
9
9
|
showLegacyRecorderSwitch: boolean;
|
|
10
|
+
autoStartCam?: boolean;
|
|
10
11
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
interface IProps {
|
|
2
2
|
handleModalClose: () => void;
|
|
3
|
+
onSave?: () => void;
|
|
3
4
|
}
|
|
4
|
-
export declare const ModalRecordingVideosSettings: ({ handleModalClose }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
export declare const ModalRecordingVideosSettings: ({ handleModalClose, onSave, }: IProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
6
|
export {};
|
|
@@ -2,10 +2,12 @@ interface ScreenRecorderProps {
|
|
|
2
2
|
screenStream: MediaStream;
|
|
3
3
|
stopAllStreams: () => void;
|
|
4
4
|
handleGoToRecordHome: () => void;
|
|
5
|
+
onOpenRecordingSettings?: () => void;
|
|
5
6
|
showPreview?: boolean;
|
|
7
|
+
autoSaveOnFinish?: boolean;
|
|
6
8
|
onStartUpladingVoiceOverHandler?: (blob: Blob) => void;
|
|
7
9
|
toggleCamera: () => Promise<void>;
|
|
8
10
|
isCameraToggled: boolean;
|
|
9
11
|
}
|
|
10
|
-
export declare const RecordCam: ({ screenStream, stopAllStreams, handleGoToRecordHome, showPreview, onStartUpladingVoiceOverHandler, toggleCamera, isCameraToggled, }: ScreenRecorderProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const RecordCam: ({ screenStream, stopAllStreams, handleGoToRecordHome, onOpenRecordingSettings, showPreview, autoSaveOnFinish, onStartUpladingVoiceOverHandler, toggleCamera, isCameraToggled, }: ScreenRecorderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -4,6 +4,7 @@ interface RecordingControlProps {
|
|
|
4
4
|
status: RECORDING_STATUS;
|
|
5
5
|
handleGoToRecordHome: () => void;
|
|
6
6
|
teleprompterActions?: React.ReactNode;
|
|
7
|
+
onOpenRecordingSettings?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const RecordingHeaderWithRouteGuard: ({ status, handleGoToRecordHome, teleprompterActions, }: RecordingControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const RecordingHeaderWithRouteGuard: ({ status, handleGoToRecordHome, teleprompterActions, onOpenRecordingSettings, }: RecordingControlProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { DetailsRecordingPreviewProps } from './types';
|
|
2
|
-
export declare const DetailsRecordingPreview: ({ videoBlob, handleGoToRecordHome, }: DetailsRecordingPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export declare const DetailsRecordingPreview: ({ videoBlob, handleGoToRecordHome, autoSave, }: DetailsRecordingPreviewProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { InventoryItem } from
|
|
1
|
+
import { InventoryItem } from 'lib/context';
|
|
2
2
|
type VideoAttribute = {
|
|
3
3
|
value: any;
|
|
4
4
|
attributeId: number;
|
|
@@ -17,6 +17,7 @@ type VideoAttribute = {
|
|
|
17
17
|
export interface DetailsRecordingPreviewProps {
|
|
18
18
|
videoBlob: Blob;
|
|
19
19
|
handleGoToRecordHome: () => void;
|
|
20
|
+
autoSave?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export type FolderOption = {
|
|
22
23
|
value: string | number;
|
package/dist/index.d.ts
CHANGED
|
@@ -33,6 +33,12 @@ export declare enum Environment {
|
|
|
33
33
|
STAGING = "staging",
|
|
34
34
|
PRODUCTION = "production"
|
|
35
35
|
}
|
|
36
|
+
export declare enum Flow {
|
|
37
|
+
FULL = "full",
|
|
38
|
+
RECORD_CAMERA_ONLY = "recordCameraOnly",
|
|
39
|
+
PREVIEW_VIDEO = "previewVideo"
|
|
40
|
+
}
|
|
41
|
+
export type FlowType = 'full' | 'recordCameraOnly' | 'previewVideo';
|
|
36
42
|
export type EnvironmentType = 'development' | 'sandbox' | 'staging' | 'production';
|
|
37
43
|
export type ShareData = {
|
|
38
44
|
url: string;
|
|
@@ -47,6 +53,13 @@ export type RecordData = {
|
|
|
47
53
|
export type UploadData = {
|
|
48
54
|
token: string;
|
|
49
55
|
};
|
|
56
|
+
export type VideoRecordedData = {
|
|
57
|
+
token: string;
|
|
58
|
+
videoId: number;
|
|
59
|
+
};
|
|
60
|
+
export type VideoPreviewData = {
|
|
61
|
+
videoId: string;
|
|
62
|
+
};
|
|
50
63
|
/**
|
|
51
64
|
* Logout from Covideo.
|
|
52
65
|
* If called, removes the auth token and other Covideo data from local storage.
|
|
@@ -65,6 +78,12 @@ export type CovideoEmbedProps = {
|
|
|
65
78
|
env?: Environment | EnvironmentType;
|
|
66
79
|
/** Which Covideo features to hide */
|
|
67
80
|
hideFeatures?: Feature[] | FeatureType[];
|
|
81
|
+
/** Which product flow to use */
|
|
82
|
+
flow?: Flow | FlowType;
|
|
83
|
+
/** Optional preview video id that triggers internal navigation to /preview/:videoId. */
|
|
84
|
+
previewVideoId?: string;
|
|
85
|
+
/** Enables analytics tracking in the player. */
|
|
86
|
+
shouldTrackAnalytics?: boolean;
|
|
68
87
|
/**
|
|
69
88
|
* Callback triggered when a video is inserted.
|
|
70
89
|
* @param shareData - Contains the auth token, video url, thumbnail url and HTML of the inserted video.
|
|
@@ -85,6 +104,11 @@ export type CovideoEmbedProps = {
|
|
|
85
104
|
* @param data - Contains the auth token.
|
|
86
105
|
*/
|
|
87
106
|
onUploadButtonClick?: (data: UploadData) => void;
|
|
107
|
+
/**
|
|
108
|
+
* Callback triggered when a video recording is successfully saved.
|
|
109
|
+
* @param data - Contains the auth token and saved video id.
|
|
110
|
+
*/
|
|
111
|
+
onVideoRecorded?: (data: VideoRecordedData) => void;
|
|
88
112
|
/** Used for switching theme */
|
|
89
113
|
whitelabel?: WHITELABEL;
|
|
90
114
|
gtmId?: string;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface UpdateStatsHotspotParams {
|
|
2
|
+
data: {
|
|
3
|
+
hotSpotData: string;
|
|
4
|
+
viewerId: number;
|
|
5
|
+
};
|
|
6
|
+
shortUrl: string;
|
|
7
|
+
}
|
|
8
|
+
export interface UpdateViewResponse {
|
|
9
|
+
success: boolean;
|
|
10
|
+
shortUrl: string;
|
|
11
|
+
mocked?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface UpdateStatsHotspotResponse {
|
|
14
|
+
success: boolean;
|
|
15
|
+
shortUrl: string;
|
|
16
|
+
hotSpotData: string;
|
|
17
|
+
viewerId: number;
|
|
18
|
+
mocked?: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UpdateStatsHotspotParams, UpdateStatsHotspotResponse } from './types';
|
|
2
|
+
export declare const updateStatsHotspotMutation: ({ data, shortUrl, }: UpdateStatsHotspotParams) => Promise<UpdateStatsHotspotResponse>;
|
|
3
|
+
export declare const useUpdateStatsHotspotMutation: () => import("react-query").UseMutationResult<UpdateStatsHotspotResponse, Error, UpdateStatsHotspotParams, unknown>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { UpdateViewResponse } from './types';
|
|
2
|
+
export declare const updateViewMutation: (shortUrl: string) => Promise<UpdateViewResponse>;
|
|
3
|
+
export declare const useUpdateViewMutation: () => import("react-query").UseMutationResult<UpdateViewResponse, Error, string, unknown>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const isDevelopmentMock: () => boolean;
|
package/dist/lib/api/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ENVIRONMENT } from 'lib/config';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
+
import { Flow, FlowType, VideoRecordedData } from '../../index';
|
|
3
4
|
export declare enum WHITELABEL {
|
|
4
5
|
CDK = "cdk"
|
|
5
6
|
}
|
|
@@ -32,8 +33,12 @@ interface ConfigurationProviderProps {
|
|
|
32
33
|
onUploadButtonClick?: (data: {
|
|
33
34
|
token: string;
|
|
34
35
|
}) => void;
|
|
36
|
+
onVideoRecorded?: (data: VideoRecordedData) => void;
|
|
35
37
|
reRender: () => void;
|
|
36
38
|
whitelabel?: WHITELABEL;
|
|
39
|
+
shouldTrackAnalytics?: boolean;
|
|
40
|
+
flow?: Flow | FlowType;
|
|
41
|
+
previewVideoId?: string;
|
|
37
42
|
}
|
|
38
43
|
type ShowFeature = {
|
|
39
44
|
showInsertFeature: boolean;
|
|
@@ -62,7 +67,8 @@ type ShowFeature = {
|
|
|
62
67
|
showSsoFeature: boolean;
|
|
63
68
|
showVinReelsFeature: boolean;
|
|
64
69
|
};
|
|
65
|
-
type IConfigurationContext = ConfigurationProviderProps & ShowFeature & {
|
|
70
|
+
type IConfigurationContext = Omit<ConfigurationProviderProps, 'flow'> & ShowFeature & {
|
|
71
|
+
flow: Flow | FlowType;
|
|
66
72
|
hasExternalJwt: boolean;
|
|
67
73
|
containerWidth: number;
|
|
68
74
|
containerHeight: number;
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-covideo-embed",
|
|
3
|
-
"version": "1.0.82
|
|
3
|
+
"version": "1.0.82",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Covideo platform as an embeddable React component.",
|
|
6
|
-
"main": "
|
|
7
|
-
"module": "
|
|
8
|
-
"types": "
|
|
6
|
+
"main": "build/index.js",
|
|
7
|
+
"module": "build/react-covideo-embed.esm.js",
|
|
8
|
+
"types": "build/index.d.ts",
|
|
9
9
|
"scripts": {
|
|
10
10
|
"start": "vite build --watch",
|
|
11
11
|
"build": "vite build && tsc -p tsconfig.build.json",
|
|
@@ -22,59 +22,61 @@
|
|
|
22
22
|
"node": ">=20.19.0"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
|
-
"
|
|
26
|
-
"react-dom": ">=16",
|
|
27
|
-
"styled-components": "5.3.11",
|
|
28
|
-
"react-icons": "5.0.1",
|
|
29
|
-
"react-query": "^3.39.2",
|
|
30
|
-
"react-select": "^5.7.7",
|
|
25
|
+
"@mediapipe/tasks-vision": "^0.10.15",
|
|
31
26
|
"axios": "^1.0.0",
|
|
32
|
-
"
|
|
33
|
-
"react-i18next": ">=14",
|
|
34
|
-
"react-covideo-common": ">=0.1.57",
|
|
35
|
-
"react-covideo-ai-assist": ">=0.0.41",
|
|
36
|
-
"react-modal": "^3.16.0",
|
|
37
|
-
"react-slider": "^2.0.0",
|
|
38
|
-
"react-toastify": ">=8",
|
|
39
|
-
"lottie-react": "^2.4.0",
|
|
40
|
-
"formik": "^2.2.9",
|
|
27
|
+
"color-convert": "^2.0.1",
|
|
41
28
|
"dayjs": "^1.11.6",
|
|
42
|
-
"
|
|
29
|
+
"droplr-api": "1.0.0",
|
|
30
|
+
"file-saver": "^2.0.5",
|
|
31
|
+
"formik": "^2.2.9",
|
|
32
|
+
"i18next": ">=23",
|
|
43
33
|
"js-cookie": "2.2.1",
|
|
44
34
|
"jwt-decode": "^3.1.2",
|
|
35
|
+
"lodash": "^4.17.21",
|
|
36
|
+
"lottie-react": "^2.4.0",
|
|
37
|
+
"rc-progress": "^3.4.1",
|
|
38
|
+
"react": ">=16",
|
|
45
39
|
"react-beautiful-dnd": "^13.1.1",
|
|
46
40
|
"react-compound-slider": "^3.4.0",
|
|
41
|
+
"react-covideo-ai-assist": ">=0.0.41",
|
|
42
|
+
"react-covideo-common": ">=0.1.57",
|
|
43
|
+
"react-dom": ">=16",
|
|
47
44
|
"react-dropzone": "11.3.2",
|
|
48
45
|
"react-full-screen": "^1.1.1",
|
|
46
|
+
"react-i18next": ">=14",
|
|
47
|
+
"react-icons": "5.0.1",
|
|
49
48
|
"react-infinite-scroll-component": "6.1.0",
|
|
49
|
+
"react-modal": "^3.16.0",
|
|
50
|
+
"react-query": "^3.39.2",
|
|
50
51
|
"react-resize-detector": "^9.1.0",
|
|
51
|
-
"react-router-dom": "5.3.4",
|
|
52
52
|
"react-router": "5.3.4",
|
|
53
|
+
"react-router-dom": "5.3.4",
|
|
53
54
|
"react-scroll": "^1.9.0",
|
|
55
|
+
"react-select": "^5.7.7",
|
|
56
|
+
"react-slider": "^2.0.0",
|
|
54
57
|
"react-spinners": "^0.13.6",
|
|
58
|
+
"react-toastify": ">=8",
|
|
55
59
|
"recordrtc": "^5.6.2",
|
|
56
|
-
"
|
|
60
|
+
"styled-components": "5.3.11",
|
|
57
61
|
"worker-timers": "5.1.9",
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"droplr-api": "1.0.0",
|
|
61
|
-
"file-saver": "^2.0.5",
|
|
62
|
-
"rc-progress": "^3.4.1"
|
|
62
|
+
"yup": "0.29.3",
|
|
63
|
+
"react-is": "18.0.0"
|
|
63
64
|
},
|
|
64
65
|
"dependencies": {
|
|
66
|
+
"assert": "^2.1.0",
|
|
65
67
|
"buffer": "^6.0.3",
|
|
66
|
-
"path-browserify": "^1.0.1",
|
|
67
|
-
"os-browserify": "^0.3.0",
|
|
68
68
|
"constants-browserify": "^1.0.0",
|
|
69
|
-
"
|
|
70
|
-
"
|
|
69
|
+
"os-browserify": "^0.3.0",
|
|
70
|
+
"path-browserify": "^1.0.1",
|
|
71
|
+
"react-is": "18.0.0",
|
|
72
|
+
"stream-browserify": "^3.0.0"
|
|
71
73
|
},
|
|
72
74
|
"devDependencies": {
|
|
73
75
|
"@eslint/js": "^9.0.0",
|
|
74
76
|
"@mediapipe/tasks-vision": "^0.10.15",
|
|
75
|
-
"@storybook/addon-links": "^10.3.
|
|
76
|
-
"@storybook/addon-themes": "^10.3.
|
|
77
|
-
"@storybook/react-vite": "^10.3.
|
|
77
|
+
"@storybook/addon-links": "^10.3.5",
|
|
78
|
+
"@storybook/addon-themes": "^10.3.5",
|
|
79
|
+
"@storybook/react-vite": "^10.3.5",
|
|
78
80
|
"@types/color-convert": "^2.0.0",
|
|
79
81
|
"@types/file-saver": "^2.0.5",
|
|
80
82
|
"@types/js-cookie": "^3.0.6",
|
|
@@ -124,16 +126,16 @@
|
|
|
124
126
|
"react-modal": "^3.16.0",
|
|
125
127
|
"react-query": "^3.39.2",
|
|
126
128
|
"react-resize-detector": "^9.1.0",
|
|
127
|
-
"react-router-dom": "5.3.4",
|
|
128
129
|
"react-router": "5.3.4",
|
|
130
|
+
"react-router-dom": "5.3.4",
|
|
129
131
|
"react-scroll": "^1.9.0",
|
|
130
132
|
"react-select": "^5.7.7",
|
|
131
133
|
"react-slider": "^2.0.0",
|
|
132
134
|
"react-spinners": "^0.13.6",
|
|
133
135
|
"react-toastify": "^8.0.0",
|
|
134
136
|
"recordrtc": "^5.6.2",
|
|
137
|
+
"storybook": "10.3.5",
|
|
135
138
|
"stream-browserify": "^3.0.0",
|
|
136
|
-
"storybook": "^10.3.1",
|
|
137
139
|
"styled-components": "5.3.11",
|
|
138
140
|
"tslib": "^2.8.1",
|
|
139
141
|
"typescript": "^5.9.2",
|
|
@@ -146,6 +148,9 @@
|
|
|
146
148
|
},
|
|
147
149
|
"overrides": {
|
|
148
150
|
"axios": "^1.13.6",
|
|
149
|
-
"follow-redirects": "^1.15.11"
|
|
151
|
+
"follow-redirects": "^1.15.11",
|
|
152
|
+
"styled-components": {
|
|
153
|
+
"react-is": "18.0.0"
|
|
154
|
+
}
|
|
150
155
|
}
|
|
151
156
|
}
|
package/.vscode/settings.json
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"editor.formatOnSave": true,
|
|
3
|
-
"editor.formatOnSaveMode": "file",
|
|
4
|
-
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
|
|
5
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
|
6
|
-
"[typescript]": {
|
|
7
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
8
|
-
},
|
|
9
|
-
"[typescriptreact]": {
|
|
10
|
-
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
|
11
|
-
}
|
|
12
|
-
}
|