react-covideo-embed
TypeScript icon, indicating that this package has built-in type declarations

1.0.28 • Public • Published

react-covideo-embed

Covideo platform as an embeddable React component.

Installation

npm install react-covideo-embed

PeerDependencies

This package has peer dependencies on react and react-dom version 16. Please ensure that you have these installed in your project.

Usage

Here’s a basic example of how to use react-covideo-embed in a React component:

import React from 'react';
import { CovideoEmbed } from 'react-covideo-embed';
const MyApp = () => {
  return (
    <div>
      <CovideoEmbed />
    </div>
  );
};
export default MyApp;

Demo

Explore the capabilities of react-covideo-embed through our Demo Project. This repository serves as a practical example to understand how different props and configurations can be implemented. To run the demo locally, please follow the instructions available in the project’s README.

Props

apikey

  • Type: string
  • Description: Used for tracking the origin of requests from this npm module.

token (optional)

  • Type: string
  • Description: JWT token from Covideo. If provided, the module's login/logout pages are disabled. Without it, users will need to log in through the module's login page.

env (optional)

  • Type: 'sandbox' | 'production'
  • Description: Determines which Covideo environment to target.
  • Default: 'sandbox'

onVideoInsert (optional)

  • Type: function
  • Description: Callback triggered when a video is inserted.
  • Parameters:
    • shareData: Object containing the URL and HTML of the inserted video.
      • url: string - The URL of the inserted video.
      • thumbnail: string - The HTML of the thumbnail of the inserted video.
      • image: string - The URL of the thumbnail of the inserted video.
      • html: string - The HTML representation of the inserted video.
      • token: string - The auth token used to fetch the shareData.

onVideoInsertError (optional)

  • Type: function
  • Description: Callback triggered when there is an error inserting a video.
  • Parameters:
    • error: unknown - The error occurred during video insert.

onRecordButtonClick (optional)

  • Type: function
  • Description: Callback triggered when the record button is clicked.
  • Parameters:
    • data: Object containing the data for recording a video.
      • token: string - The auth token.

onUploadButtonClick (optional)

  • Type: function
  • Description: Callback triggered when the upload button is clicked.
  • Parameters:
    • data: Object containing the data for uploading a video.
      • token: string - The auth token.

hideFeatures (optional)

  • Type: Array<Feature>

  • Description: Determines which Covideo features to hide. Acceptable values are as follows:

    • insert
    • recordScreen
    • recordBoth
    • recordCam
    • upload
    • trim
    • merge
    • wheelsTV
    • voiceover
    • quickshare
    • folder
    • landingPage
    • CTA
    • reactions
    • aiAssist
    • lesa
    • multiLocation

APIs/Functions

logoutCovideo()

  • Type: function
  • 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.

Author

This package is maintained by Covideo.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.284latest
1.0.28-sandbox.02sandbox
1.0.27-beta.11beta

Version History

VersionDownloads (Last 7 Days)Published
1.0.284
1.0.28-sandbox.02
1.0.272
1.0.27-sandbox.01
1.0.27-beta.11
1.0.27-beta.00
1.0.260
1.0.250
1.0.230
1.0.220
1.0.210
1.0.200
1.0.190
1.0.183
1.0.170
1.0.160
1.0.150
1.0.140
1.0.130
1.0.120
1.0.110
1.0.100
1.0.90
1.0.80
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.20
1.0.10
1.0.00
0.1.380
0.1.370
0.1.360
0.1.350
0.1.340
0.1.330
0.1.320
0.1.310
0.1.300
0.1.290
0.1.280
0.1.270
0.1.260
0.1.250
0.1.240
0.1.230
0.1.220
0.1.210
0.1.200
0.1.190
0.1.180
0.1.1771
0.1.160
0.1.140
0.1.130
0.1.110
0.1.100
0.1.90
0.1.80
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.21
0.1.10
0.1.00

Package Sidebar

Install

npm i react-covideo-embed

Weekly Downloads

85

Version

1.0.28

License

none

Unpacked Size

2.63 MB

Total Files

266

Last publish

Collaborators

  • appadmin-covideo