'VideoJS how to register YouTube plugin via ES6 Modules?

I've been trying to decipher how to do this and scrolling through walls of text of documentation to find that videojs don't actually explain how to register any of their own plugins, and only explain how to write your own.

From the documentation for https://github.com/videojs/videojs-youtube it states I must include a script tag and import a file. But I don't really want to do that and would rather import it via and es6 module with all my other dependencies since I'm using Laravel + Vue.

For example I've tried; import 'videojs-youtube/dist/Youtube.min'; import vjsYoutube from 'videojs-youtube'; and a few other variants.

How can I register this plugin? I feel like I've tried pretty much every standard way of doing things like this, and the fact that the documentation is so bare is actually very confusing.



Solution 1:[1]

In my vue3 project with video.js, this works for me.

import 'videojs-youtube/dist/Youtube.min.js';

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 alan