1.0.7 • Published 18 days ago

react-covideo-embed v1.0.7

Weekly downloads
-
License
-
Repository
-
Last release
18 days ago

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

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 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

    apikey (optional)

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

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.

1.0.7

18 days ago

1.0.6

18 days ago

1.0.5

19 days ago

1.0.4

22 days ago

1.0.3

1 month ago

1.0.2

1 month ago

1.0.1

1 month ago

1.0.0

1 month ago

0.1.37

2 months ago

0.1.38

1 month ago

0.1.35

2 months ago

0.1.36

2 months ago

0.1.33

2 months ago

0.1.34

2 months ago

0.1.30

2 months ago

0.1.31

2 months ago

0.1.32

2 months ago

0.1.28

2 months ago

0.1.29

2 months ago

0.1.27

2 months ago

0.1.25

3 months ago

0.1.26

3 months ago

0.1.23

4 months ago

0.1.24

4 months ago

0.1.22

4 months ago

0.1.21

4 months ago

0.1.20

4 months ago

0.1.18

5 months ago

0.1.19

5 months ago

0.1.10

7 months ago

0.1.11

7 months ago

0.1.13

6 months ago

0.1.14

6 months ago

0.1.16

6 months ago

0.1.8

7 months ago

0.1.17

5 months ago

0.1.7

7 months ago

0.1.9

7 months ago

0.1.6

7 months ago

0.1.5

7 months ago

0.1.4

7 months ago

0.1.3

7 months ago

0.1.2

7 months ago

0.1.1

7 months ago

0.1.0

7 months ago