question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TypeError: "component is undefined"

See original GitHub issue

Since 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:closed
  • Created 4 years ago
  • Comments:14 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
hanglooscommented, Nov 6, 2019

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

0reactions
alienpavlovcommented, Nov 22, 2019

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

and here is the place where this.player.pipToggle is undefined image

my 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

Read more comments on GitHub >

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

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found