Answer the question
In order to leave comments, you need to log in
How to import a library or file where you need to pass parameters?
jsfiddle.net/Hussnain1/ctLmx4fz/1
https://github.com/Hussnain1/Video.js-HD-Toggle-Plugin
This is another without example
https://github.com/Futurelearn/video-js-hd-toggle- ...
don't understand how to connect it in Vue component. In both cases, there is a problem with passing data to the plugin, in addition to the deprecated code that is 10 years old.
Here is what I found
https://stackoverflow.com/questions/29923879/pass-...
https://github.com/videojs/video.js/issues/3473
https://github.com/videojs/video.js /issues/3691
And these options are also already outdated, or they require a very serious improvement, update.
Again, sculpting everything into a component is insane, it already has 350+ lines, so it will be necessary to take it out to a file and transfer data there, as I understand it.
<script>
"use strict";
import {mapGetters, mapActions} from 'vuex';
import videojs from 'video.js';
const videojs = import('video_js_hd_toggler.js').then(toggleHD => toggleHD(videojs, ''urlSD, 'urlHD')); // add button plugin
// const videojs = (await import('video_js_hd_toggler.js'))(someoptions);
// import toggleHD from './../../../assets/js/video_js_hd_toggler'; // params required like videojs
export default {
name: "public_video_player",
props: {
options: {
type: Object,
},
},
data() {
return {
player: null,
}
},
Answer the question
In order to leave comments, you need to log in
I wrote my plugin following the example https://github.com/collab-project/videojs-record/t...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question