Skip to content
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

Uncaught TypeError: videojs.getComponent is not a function #341

Closed
irfanfadilah opened this issue Dec 14, 2015 · 4 comments
Closed

Uncaught TypeError: videojs.getComponent is not a function #341

irfanfadilah opened this issue Dec 14, 2015 · 4 comments

Comments

@irfanfadilah
Copy link
Contributor

When I add Youtube.min.js (v2.0.3) it's raise "Uncaught TypeError: videojs.getComponent is not a function"..

The error was in this line: var Tech = videojs.getComponent('Tech');

Did I miss something..?

Additional information: VideoJS (v4.12.15)..

@eXon
Copy link
Collaborator

eXon commented Dec 14, 2015

You should use the VJS4 branch if you are on the old 4.X

@tausiffarooqi
Copy link

Hello,

Sorry, I know this thread is closed, but I'm getting the same error even though I'm using version 5.x of video.js. These are the versions I'm using:

"video.js": "5.4.4",
"videojs-youtube": "2.0.7"

And I'm building it using webpack. Can you please provide some help on how to fix this? Thanks!

@irfanfadilah
Copy link
Contributor Author

Hi @tausiffarooqi,

I haven't tried VideoJS v5.x with VideoJS YouTube v2.x yet, but can you make sure the VideoJS YouTube is loaded after VideoJS? And also check (via view page source) if the VideoJS file you use is v5.x,

@tausiffarooqi
Copy link

@irfanfadilah - Thanks for the reply! Yes, I do have it in the right order. After going through the comments in issue #343 I seem to have got it working. I'm now importing the plugins like this:

import videojs from 'video.js';
import 'imports?define=>false!videojs-youtube';

Previously I had it like this (which wasn't working):

import videojs from 'video.js';
import 'videojs-youtube';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants