-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Description
Description
When using imports, the plugin is not registered on video.js
Steps to reproduce
- Create a new project with
create-react-app. - Add
video.jsandvideo.js-offsest - In a VideoPlayer component (https://docs.videojs.com/tutorial-react.html) add this at the top:
import React from "react";
import videojs from "video.js";
import "videojs-offset";
Results
Expected
The plugin should work ok.
Error output
TypeError: this.offset is not a function
Additional Information
Please include any additional information necessary here. Including the following:
versions
videojs
^7.3.0
I could make this work by registering the plugin manually:
import offset from "videojs-offset";
videojs.registerPlugin("offset", offset);
I've also tried to select a video.js version that corresponds with the one in videojs-offset package.json.
I think what happens is that the plugin is registered for its own version of video.js.
Metadata
Metadata
Assignees
Labels
No labels