react-covideo-embed 0.1.27 → 0.1.29

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
@@ -64,6 +64,22 @@ Explore the capabilities of react-covideo-embed through our [Demo Project](https
64
64
  - **Parameters**:
65
65
  - `error`: `unknown` - The error occurred during video insert.
66
66
 
67
+ ### `onRecordButtonClick` (optional)
68
+
69
+ - **Type**: function
70
+ - **Description**: Callback triggered when the record button is clicked.
71
+ - **Parameters**:
72
+ - `data`: Object containing the data for recording a video.
73
+ - `token`: `string` - The auth token.
74
+
75
+ ### `onUploadButtonClick` (optional)
76
+
77
+ - **Type**: function
78
+ - **Description**: Callback triggered when the upload button is clicked.
79
+ - **Parameters**:
80
+ - `data`: Object containing the data for uploading a video.
81
+ - `token`: `string` - The auth token.
82
+
67
83
  ### `hideFeatures` (optional)
68
84
 
69
85
  - **Type**: `Array<Feature>`
package/build/index.d.ts CHANGED
@@ -31,6 +31,12 @@ export type ShareData = {
31
31
  html: string;
32
32
  token: string;
33
33
  };
34
+ export type RecordData = {
35
+ token: string;
36
+ };
37
+ export type UploadData = {
38
+ token: string;
39
+ };
34
40
  /**
35
41
  * Logout from Covideo.
36
42
  * If called, removes the auth token and other Covideo data from local storage.
@@ -47,6 +53,8 @@ export type CovideoEmbedProps = {
47
53
  env?: Environment | EnvironmentType;
48
54
  /** Which Covideo features to hide */
49
55
  hideFeatures?: Feature[] | FeatureType[];
56
+ /** Used for tracking the origin of requests from this npm module. */
57
+ apikey?: string;
50
58
  /**
51
59
  * Callback triggered when a video is inserted.
52
60
  * @param shareData - Contains the auth token, video url, thumbnail url and HTML of the inserted video.
@@ -57,7 +65,15 @@ export type CovideoEmbedProps = {
57
65
  * @param error - The error occurred during video insert.
58
66
  */
59
67
  onVideoInsertError?: (error: unknown) => void;
60
- /** Used for tracking the origin of requests from this npm module. */
61
- apikey?: string;
68
+ /**
69
+ * Callback triggered when the record button is clicked.
70
+ * @param data - Contains the auth token.
71
+ */
72
+ onRecordButtonClick?: (data: RecordData) => void;
73
+ /**
74
+ * Callback triggered when the upload button is clicked.
75
+ * @param data - Contains the auth token.
76
+ */
77
+ onUploadButtonClick?: (data: UploadData) => void;
62
78
  };
63
79
  export declare const CovideoEmbed: React.FC<CovideoEmbedProps>;