Hello Everyone.
Need help with videojs-resolution-switcher plugin in react.js
I have installed videojs-resolution-switcher, when I am giving plugin parameter the compiler is not detecting videojs-resolution-switcher.
import React from 'react';
import videojs from "video.js";
import videoPath from '../../assets/tryDjango.mp4'
import videoJsResolutionSwitcher from 'videojs-resolution-switcher'
export default class VideoPlayer extends React.Component {
componentDidMount() {
// instantiate Video.js
this.player = videojs(this.videoNode, {
autoplay: true,
controls: true,
plugins: {
videoJsResolutionSwitcher: {
default: 'low'
}
},
sources: [
{ "type": "video/mp4", "src": `${videoPath}?sd`, "label" : 'SD', "res" :'480' },
{ "type": "video/mp4", "src": `${videoPath}?hd`, "label" : 'HD', "res" : '1080' }
],
}, function onPlayerReady() {
console.log('onPlayerReady', this)
});
}
getting the below error
Error: plugin "videoJsResolutionSwitcher" does not exist
any idea ?
I can use the video with out plugin but not able to use plugin.
Reagrds,
Jasham
Hello Everyone.
Need help with videojs-resolution-switcher plugin in react.js
I have installed videojs-resolution-switcher, when I am giving plugin parameter the compiler is not detecting videojs-resolution-switcher.
import React from 'react';
import videojs from "video.js";
import videoPath from '../../assets/tryDjango.mp4'
import videoJsResolutionSwitcher from 'videojs-resolution-switcher'
export default class VideoPlayer extends React.Component {
componentDidMount() {
// instantiate Video.js
this.player = videojs(this.videoNode, {
}
getting the below error
Error: plugin "videoJsResolutionSwitcher" does not exist
any idea ?
I can use the video with out plugin but not able to use plugin.
Reagrds,
Jasham