react-covideo-embed 0.1.9 → 0.1.11
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/README.md +7 -0
- package/build/index.d.ts +57 -4
- package/build/index.js +1 -1
- package/build/lib/components/Container.d.ts +5 -2
- package/build/lib/config.d.ts +6 -1
- package/build/lib/utils/functions.d.ts +1 -0
- package/package.json +1 -1
- package/build/app/CovideoEmbed.d.ts +0 -52
package/README.md
CHANGED
|
@@ -82,6 +82,13 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
|
|
|
82
82
|
- `CTA`
|
|
83
83
|
- `reactions`
|
|
84
84
|
|
|
85
|
+
## APIs/Functions
|
|
86
|
+
|
|
87
|
+
### `logoutCovideo()`
|
|
88
|
+
|
|
89
|
+
- **Type**: `function`
|
|
90
|
+
- **Description**: Log out from Covideo and clear local storage entries associated with Covideo. To reflect the logout status, the CovideoEmbed component should be re-rendered after this function is called.
|
|
91
|
+
|
|
85
92
|
## Author
|
|
86
93
|
|
|
87
94
|
This package is maintained by Covideo.
|
package/build/index.d.ts
CHANGED
|
@@ -1,4 +1,57 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.css';
|
|
3
|
+
export declare enum Feature {
|
|
4
|
+
UPLOAD = "upload",
|
|
5
|
+
FOLDER = "folder",
|
|
6
|
+
RECORD_SCREEN = "recordScreen",
|
|
7
|
+
MERGE = "merge",
|
|
8
|
+
RECORD_CAM = "recordCam",
|
|
9
|
+
WHEELS_TV = "wheelsTV",
|
|
10
|
+
RECORD_BOTH = "recordBoth",
|
|
11
|
+
TRIM = "trim",
|
|
12
|
+
INSERT = "insert",
|
|
13
|
+
LANDING_PAGE = "landingPage",
|
|
14
|
+
QUICKSHARE = "quickshare",
|
|
15
|
+
CTA = "CTA",
|
|
16
|
+
VOICEOVER = "voiceover",
|
|
17
|
+
REACTIONS = "reactions"
|
|
18
|
+
}
|
|
19
|
+
export type FeatureType = 'insert' | 'recordScreen' | 'recordBoth' | 'recordCam' | 'upload' | 'trim' | 'merge' | 'wheelsTV' | 'voiceover' | 'quickshare' | 'folder' | 'landingPage' | 'CTA' | 'reactions';
|
|
20
|
+
export declare enum Environment {
|
|
21
|
+
SANDBOX = "sandbox",
|
|
22
|
+
PRODUCTION = "production"
|
|
23
|
+
}
|
|
24
|
+
export type EnvironmentType = 'sandbox' | 'production';
|
|
25
|
+
export type ShareData = {
|
|
26
|
+
url: string;
|
|
27
|
+
thumbnail: string;
|
|
28
|
+
html: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* Logout from Covideo.
|
|
32
|
+
* If called, removes the auth token and other Covideo data from local storage.
|
|
33
|
+
*/
|
|
34
|
+
export declare function logoutCovideo(): void;
|
|
35
|
+
export type CovideoEmbedProps = {
|
|
36
|
+
/**
|
|
37
|
+
* JWT token from Covideo.
|
|
38
|
+
* If provided, disables the module's login/logout pages.
|
|
39
|
+
* If not provided, users need to log in through the module's login page.
|
|
40
|
+
*/
|
|
41
|
+
token?: string;
|
|
42
|
+
/** Which Covideo environment to target */
|
|
43
|
+
env?: Environment | EnvironmentType;
|
|
44
|
+
/** Which Covideo features to hide */
|
|
45
|
+
hideFeatures?: Feature[] | FeatureType[];
|
|
46
|
+
/**
|
|
47
|
+
* Callback triggered when a video is inserted.
|
|
48
|
+
* @param shareData - Contains the video url, thumbnail url and HTML of the inserted video.
|
|
49
|
+
*/
|
|
50
|
+
onVideoInsert?: (shareData: ShareData) => void;
|
|
51
|
+
/**
|
|
52
|
+
* Callback triggered when there is an error inserting a video.
|
|
53
|
+
* @param error - The error occurred during video insert.
|
|
54
|
+
*/
|
|
55
|
+
onVideoInsertError?: (error: unknown) => void;
|
|
56
|
+
};
|
|
57
|
+
export declare const CovideoEmbed: React.FC<CovideoEmbedProps>;
|