-
-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RecordToggle can't be found #721
Comments
can you try the same without react? |
Just tried the following on the video-only example:
In this case it is working .. would you suggest me try with the same versions as in the example? |
Update: I have tried with those versions, the problem is still persisting. |
I have got around the initial error with the following conditional: const RecordToggle = videojs.getComponent(
'RecordToggle',
) as unknown as typeof videojs.Button
const ComponentToExtend = RecordToggle ? RecordToggle : videojs.getComponent('Button')
class CustomRecordToggleComponent extends ComponentToExtend {
...
} And now I'm getting: |
can you reproduce it with https://collab-project.github.io/videojs-record/#/frameworks/react? |
I'm trying now, hopefully I will reproduce it. |
I haven't been able to reproduce it with the official example. We're thinking of updating it directly to 8+. |
Description
I'm using React and I'm creating a custom
recordToggle
by extending the baseRecordToggle
class, as follows:It was working fine until I've updated
video.js
from7.13.3
to7.21.1
, I'm getting the following error:TypeError: Class extends value undefined is not a constructor or null
.This is because the
videojs.getComponent('RecordToggle')
returnsundefined
since the package update.Are you aware of any change that could have led to this? I've debugged the modules and the recording components seem to be correctly registered to the
videojs
instance, but when the client code is reached, the recording components (i.e.RecordToggle
) suddenly disappeared.I have not found any
unregisterComponent
method .. I'm assuming there could be 2 different instances ofvideojs
, could you help me?Steps to reproduce
I don't have a minimal reproducible example, but I can add that the following is the import sequence used:
Expected
The
videojs.getComponent('RecordToggle')
should work as before, therefore the app wouldn't crash.Actual
The app crashes.
Error output
TypeError: Class extends value undefined is not a constructor or null
Additional Information
versions
videojs
7.21.1
, the version ofvideojs-record
is4.5.0
.browsers
Chrome 125.0.6422.77, it also shows up in incognito.
OSes
MacOS 14.4
The text was updated successfully, but these errors were encountered: