surmon-china / videojs-player

@videojs player component for @vuejs(3) and React.

Home Page:https://github.surmon.me/videojs-player

Repository from Github https://github.comsurmon-china/videojs-playerRepository from Github https://github.comsurmon-china/videojs-player

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')

Hi @cerclecheung

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 ?