0.1.18 • Published 1 year ago

react-covideo-embed v0.1.18

Weekly downloads
-
License
-
Repository
-
Last release
1 year 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

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.

1.0.27-sandbox.0

7 months ago

1.0.32-test.0

6 months ago

1.0.29

6 months ago

1.0.28

7 months ago

1.0.27

7 months ago

1.0.33

5 months ago

1.0.32

6 months ago

1.0.31

6 months ago

1.0.30

6 months ago

1.0.37

3 months ago

1.0.36

4 months ago

1.0.35

4 months ago

1.0.34

5 months ago

1.0.39

3 months ago

1.0.38

3 months ago

1.0.31-sandbox.0

6 months ago

1.0.40

3 months ago

1.0.35-sandbox.0

5 months ago

1.0.32-sandbox.0

6 months ago

1.0.28-sandbox.0

7 months ago

1.0.27-beta.0

7 months ago

1.0.27-beta.1

7 months ago

1.0.26

7 months ago

1.0.19

8 months ago

1.0.22

8 months ago

1.0.21

8 months ago

1.0.20

8 months ago

1.0.25

8 months ago

1.0.23

8 months ago

1.0.18

11 months ago

1.0.17

11 months ago

1.0.16

11 months ago

1.0.9

1 year ago

1.0.11

12 months ago

1.0.10

12 months ago

1.0.15

11 months ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

12 months ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago

0.1.37

1 year ago

0.1.38

1 year ago

0.1.35

1 year ago

0.1.36

1 year ago

0.1.33

1 year ago

0.1.34

1 year ago

0.1.30

1 year ago

0.1.31

1 year ago

0.1.32

1 year ago

0.1.28

1 year ago

0.1.29

1 year ago

0.1.27

1 year ago

0.1.25

1 year ago

0.1.26

1 year ago

0.1.23

1 year ago

0.1.24

1 year ago

0.1.22

1 year ago

0.1.21

1 year ago

0.1.20

1 year ago

0.1.18

1 year ago

0.1.19

1 year ago

0.1.10

2 years ago

0.1.11

2 years ago

0.1.13

2 years ago

0.1.14

2 years ago

0.1.16

2 years ago

0.1.8

2 years ago

0.1.17

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.4

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago