surmon-china / videojs-player

@videojs player component for @vuejs(3) and React.
https://github.surmon.me/videojs-player
MIT License
5.27k stars 1.13k forks source link

Using videojs-youtube with vue-video-player in nuxt (VIDEOJS: ERROR: The "youtube" tech is undefined) #339

Open citananda opened 4 years ago

citananda commented 4 years ago

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 :

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.

cerclecheung commented 4 years ago

require('videojs-youtube')

citananda commented 3 years ago

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 ?

citananda commented 3 years ago

The solution is to use https://www.npmjs.com/package/vue-plyr