silvermine / videojs-quality-selector

MIT License
183 stars 54 forks source link

Component QualitySelector does not exist (Vue.js 3) #95

Closed mateusz-wyka closed 11 months ago

mateusz-wyka commented 1 year ago

Environment

Describe

I imported silvermine/videojs-quality-selector like this:

import "@silvermine/videojs-quality-selector";
import "@silvermine/videojs-quality-selector/dist/css/quality-selector.css";

When app is ready I execute this:

player.value = videojs(videoPlayer.value, videoPlayerOptions.value, function() {
  let player = this;
  player.controlBar.addChild("QualitySelector");
});

then I get:

Uncaught Error: Component QualitySelector does not exist

I will provide more information if needed. Any ideas what I can do about it?

yokuze commented 11 months ago

@mateusz-wyka You have to call the function that you import, passing in the videojs object. Please see this example:

https://stackblitz.com/edit/vitejs-vite-56ugwh?file=src%2Fmain.ts