collab-project / videojs-record

video.js plugin for recording audio/video/image files
https://collab-project.github.io/videojs-record
MIT License
1.4k stars 317 forks source link

Record plugin seems to not register properly #650

Closed Mariusz071 closed 2 years ago

Mariusz071 commented 2 years ago

Description

Record plugin not registering properly, ending up with the following error in the console:

Steps to reproduce

Relevant snippets from my code - Imports:

import videojs from 'video.js'
import 'videojs-record/dist/videojs.record.js'
import 'recordrtc'

import '@/vendor/offlineRecorder'
import 'video.js/dist/video-js.css'
import 'videojs-record/dist/css/videojs.record.css'

Player initialisation:

this._player = videojs(videoId, {
  controls: false,
  loop: false,
  plugins: {
    record: {
      videoMimeType: 'video/mp4',
      audio: true,
      maxLength: 7200,
      debug: true,
      frameWidth: 1280,
      frameHeight: 720,
      video: {
        width: { min: 640, ideal: 1280, max: 1280 },
        height: { min: 480, ideal: 720, max: 720 },
      },
    },
  },
})

Results

Expected

Plugin should get registered properly and functionality should work.

Actual

Record plugin does not work.

Error output

In the browser's console

video.es.js?f0e2:22449 Uncaught (in promise) Error: plugin "record" does not exist
    at eval (video.es.js?f0e2:22449:1)
    at Array.forEach (<anonymous>)
    at new Player (video.es.js?f0e2:22447:1)
    at videojs (video.es.js?f0e2:28313:1)
    at new VideoWrapper (videoWrapper.js?4bab:30:1)
    at _callee2$ (VM6708 VideoSettings.vue:267:39)
    at tryCatch (videojs.record.js?3966:2309:1)
    at Generator.invoke [as _invoke] (videojs.record.js?3966:2538:1)
    at prototype.<computed> [as next] (videojs.record.js?3966:2361:1)
    at asyncGeneratorStep (asyncToGenerator.js?1da1:3:1)

Additional Information

So issue started to occur when I added latest videojs via yarn - previously in my node_modules there was version 7.17.0 which worked completely fine. Although video.js wasn't present in package.json so my assumption is that is was there because it's one of the dependencies of videojs-record plugin.

Also project is bootstrapped with vue-cli 5.0.4

versions

videojs

videojs - 7.19.2 videojs-record - 4.5.0

browsers

Latest Chrome, FF and Safari

OSes

MacOS 12.2.1

Thanks for help in advance, as I ran out of ideas 🤷‍♂️

thijstriemstra commented 2 years ago

I tested on macOS with https://collab-project.github.io/videojs-record/#/frameworks/webpack and it seems to work fine here:

VIDEOJS: Using video.js 7.19.2 with videojs-record 4.5.0 and recordrtc 5.6.2
thijstriemstra commented 2 years ago

no feedback, closing.