TypeError: "component is undefined"
See original GitHub issueSince the update from 3.7.1 to 3.8.0 I get the following error in firefox on page load. But it seems all to work fine…
VIDEOJS: ERROR: TypeError: "component is undefined"
addChild video.js:3539
setupUI videojs.record.js:218
func video.js:1997
dispatcher video.js:1811
trigger video.js:1947
trigger$1 video.js:2832
triggerReady video.js:3784
timeoutId video.js:4438
video.js:80
LogByTypeFactory video.js:80
error video.js:268
dispatcher video.js:1813
trigger video.js:1947
trigger$1 video.js:2832
triggerReady video.js:3784
timeoutId video.js:4438
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Cannot read property 'Component' of undefined - Stack Overflow
A bit late to this, but this sounds like a typescript error. If anyone else comes across this change import React, {Component} from...
Read more >TypeError: Cannot read property 'Component' of undefined ...
I opened a quick repo using create-react-app and this error is not present the way it is in Next.js. So I roughly feel...
Read more >TypeError! How to deal with the undefined “this” in your React ...
It usually appears to refer to an instance of the class, but… Consider this component: When the button is clicked, you get:.
Read more >How to Read React Errors (fix 'Cannot read property of ...
Got an error like this in your React component? ... TypeError: Cannot read property 'map' of undefined at App (App.js:9) at renderWithHooks ...
Read more >Deal with Undefined 'this' in React Event Handlers Correctly
TypeError: Cannot read property 'foo' of undefined. Why? What the this keyword is bound to depends on where it is defined. In this...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I came across this error as well. I was able to fix it by adding pictureInPictureToggle: true in the controlBar options. The setupUI method was breaking otherwise.
Here are my defaultOptions
const defaultVideoJsOptions = { controls: true, controlBar: { fullscreenToggle: false, deviceButton: false, volumePanel: false, recordToggle: false, cameraButton: false, pictureInPictureToggle: true, }, fluid: false, autoMuteDevice: true, height: 90, width: CONTENT_WIDTH, plugins: { wavesurfer: { src: ‘live’, waveColor: ‘#424242’, progressColor: ‘#424242’, cursorColor: ‘#424242’, barWidth: 1, barGap: 2, height: 60, debug: true, cursorWidth: 0, msDisplayMax: 1, hideScrollbar: true, }, record: { video: false, audio: true, audioMimeType: ‘audio/webm’, audioRecorderType: RecordRTC.StereoAudioRecorder, audioChannels: 1, convertEngine: ‘’, maxLength: 1800, // max 30 minutes timeSlice: 2000,// 60000, // timestamp trigger every minute msDisplayMax: 1, height: 60, debug: true } } };
I’ve faced the same issue and @hangloos’ advice
pictureInPictureToggle: true
does work for me, but I don’t really need PIP button…here is the exact error:
and here is the place where
this.player.pipToggle
is undefinedmy options:
{ controls: true, width: 320, height: 240, fluid: false, plugins: { record: { audio: true, video: true, maxLength: 300, debug: true } }, controlBar: { fullscreenToggle: false, volumePanel: false, pipToggle: false, deviceButton: false, pictureInPictureToggle: false } }
I hope it helps