-
Notifications
You must be signed in to change notification settings - Fork 549
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
Comments
You should use the VJS4 branch if you are on the old 4.X |
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:
And I'm building it using webpack. Can you please provide some help on how to fix this? Thanks! |
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, |
@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'; |
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)..
The text was updated successfully, but these errors were encountered: