Using videojs-youtube with vue-video-player in nuxt (VIDEOJS: ERROR: The "youtube" tech is undefined)
citananda opened this issue · comments
Hi all,
I am trying to use videojs-youtube plugin in nuxt, but I face the error :
VIDEOJS: ERROR: The "youtube" tech is undefined. Skipped browser support check for that tech.
I read all the issues, but I don't find the way to use this combination.
I am using :
- vue-video-player 5.0.2,
- videojs-youtube 2.6.1,
- nuxt 2.11
Here is my /plugins/nuxt-video-player-plugin.js
import Vue from 'vue'
if (process.browser) {
const VueVideoPlayer = require('vue-video-player/dist/ssr')
Vue.use(VueVideoPlayer)
}
Other information : when I use a video that doesn't require a video plugin, it works, so my only problem is to be able to use youtube plugin.
require('videojs-youtube')
Thanks for your reply, I tried to add that line in the Vue component file, it doen't work, I face the same error
Do you mean that I should add that line in another place ?
The solution is to use https://www.npmjs.com/package/vue-plyr