react-covideo-embed 0.1.2 → 0.1.4
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
CHANGED
|
@@ -20,7 +20,7 @@ Here’s a basic example of how to use react-covideo-embed in a React component:
|
|
|
20
20
|
|
|
21
21
|
```jsx
|
|
22
22
|
import React from 'react';
|
|
23
|
-
import CovideoEmbed from 'react-covideo-embed';
|
|
23
|
+
import { CovideoEmbed } from 'react-covideo-embed';
|
|
24
24
|
const MyApp = () => {
|
|
25
25
|
return (
|
|
26
26
|
<div>
|
|
@@ -75,7 +75,6 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
|
|
|
75
75
|
- `recordScreen`
|
|
76
76
|
- `recordBoth`
|
|
77
77
|
- `recordCam`
|
|
78
|
-
- `record`
|
|
79
78
|
- `upload`
|
|
80
79
|
- `trim`
|
|
81
80
|
- `merge`
|
|
@@ -83,6 +82,9 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
|
|
|
83
82
|
- `voiceover`
|
|
84
83
|
- `quickshare`
|
|
85
84
|
- `folder`
|
|
85
|
+
- `landingPage`
|
|
86
|
+
- `CTA`
|
|
87
|
+
- `reactions`
|
|
86
88
|
|
|
87
89
|
## Author
|
|
88
90
|
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
html: string;
|
|
28
|
+
};
|
|
29
|
+
export type CovideoEmbedProps = {
|
|
30
|
+
/**
|
|
31
|
+
* JWT token from Covideo.
|
|
32
|
+
* If provided, disables the module's login/logout pages.
|
|
33
|
+
* If not provided, users need to log in through the module's login page.
|
|
34
|
+
*/
|
|
35
|
+
token?: string;
|
|
36
|
+
/** Which Covideo environment to target */
|
|
37
|
+
env?: Environment | EnvironmentType;
|
|
38
|
+
/** Which Covideo features to hide */
|
|
39
|
+
hideFeatures?: Feature[] | FeatureType[];
|
|
40
|
+
/**
|
|
41
|
+
* Callback triggered when a video is inserted.
|
|
42
|
+
* @param shareData - Contains the URL and HTML of the inserted video.
|
|
43
|
+
*/
|
|
44
|
+
onVideoInsert?: (shareData: ShareData) => void;
|
|
45
|
+
/**
|
|
46
|
+
* Callback triggered when there is an error inserting a video.
|
|
47
|
+
* @param error - The error occurred during video insert.
|
|
48
|
+
*/
|
|
49
|
+
onVideoInsertError?: (error: unknown) => void;
|
|
50
|
+
};
|
|
51
|
+
export declare const CovideoEmbed: React.FC<CovideoEmbedProps>;
|
package/build/index.d.ts
CHANGED
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* JWT token from Covideo.
|
|
7
|
-
* If provided, disables the module's login/logout pages.
|
|
8
|
-
* If not provided, users need to log in through the module's login page.
|
|
9
|
-
*/
|
|
10
|
-
token?: string;
|
|
11
|
-
/** Which Covideo environment to target */
|
|
12
|
-
env?: 'sandbox' | 'production';
|
|
13
|
-
/** Which Covideo features to hide */
|
|
14
|
-
hideFeatures?: Feature[];
|
|
15
|
-
/**
|
|
16
|
-
* Callback triggered when a video is inserted.
|
|
17
|
-
* @param shareData - Contains the URL and HTML of the inserted video.
|
|
18
|
-
*/
|
|
19
|
-
onVideoInsert?: (shareData: {
|
|
20
|
-
url: string;
|
|
21
|
-
html: string;
|
|
22
|
-
}) => void;
|
|
23
|
-
/**
|
|
24
|
-
* Callback triggered when there is an error inserting a video.
|
|
25
|
-
* @param error - The error occurred during video insert.
|
|
26
|
-
*/
|
|
27
|
-
onVideoInsertError?: (error: unknown) => void;
|
|
28
|
-
}
|
|
29
|
-
declare const Covideo: React.FC<Props>;
|
|
30
|
-
export default Covideo;
|
|
1
|
+
export { CovideoEmbed, Environment, Feature } from './app/CovideoEmbed';
|
|
2
|
+
export type { CovideoEmbedProps, EnvironmentType, FeatureType, ShareData, } from './app/CovideoEmbed';
|
|
3
|
+
import { CovideoEmbed } from './app/CovideoEmbed';
|
|
4
|
+
export default CovideoEmbed;
|