Closed yu0307 closed 2 years ago
Can you check if you can access the wavesurfer version nr, e.g:
// create player
var player = videojs('myAudio', options, function() {
// print version information at startup
var msg = 'Using video.js '+ videojs.VERSION +
' with videojs-wavesurfer ' + videojs.getPluginVersion('wavesurfer') +
' and wavesurfer.js ' + WaveSurfer.VERSION;
videojs.log(msg);
// load file
player.src({src: 'media/hal.wav', type: 'audio/wav'});
});
Can you check if you can access the wavesurfer version nr, e.g:
// create player var player = videojs('myAudio', options, function() { // print version information at startup var msg = 'Using video.js '+ videojs.VERSION + ' with videojs-wavesurfer ' + videojs.getPluginVersion('wavesurfer') + ' and wavesurfer.js ' + WaveSurfer.VERSION; videojs.log(msg); // load file player.src({src: 'media/hal.wav', type: 'audio/wav'}); });
No sir, the execution never reaches the callback. it's like wavesurfer was never initialized correctly.
Have you tried https://collab-project.github.io/videojs-wavesurfer/#/vue? Please check if that works for you.
Have you tried https://collab-project.github.io/videojs-wavesurfer/#/vue? Please check if that works for you.
Yes, I have copied everything from that snippet and tried that, but not really working. I felt like the snippet isn't working for Vue3.
Yes, I have copied everything from that snippet and tried that
Instead of copying the snippet, follow all instructions and you'll have a working vue project. From there you can figure out the issue in your project.
I felt like the snippet isn't working for Vue3.
The @vue/cli
package is using vue3 afaik.
Yes, I have copied everything from that snippet and tried that
Instead of copying the snippet, follow all instructions and you'll have a working vue project. From there you can figure out the issue in your project.
I felt like the snippet isn't working for Vue3.
The
@vue/cli
package is using vue3 afaik.
Sorry, I mean I followed the instructions from there, and I walked through my code and even matching character cases and trying to get a working model, but still with no success. Were you able to replicate the error as well?
Were you able to replicate the error as well?
I'll give it a try at some point.
@thijstriemstra any news on the above? I'm also encountering the same issue.
Looks like vue had a new major release (v5). I followed the guide and ended up with errors while running npm run serve
. I'll take a look at the problem later.
ERROR Failed to compile with 5 errors 3:43:14 PM
error in ./src/components/VideoJSWavesurfer.vue?vue&type=script&lang=js
Module not found: Error: Can't resolve 'video.js/dist/video-js.css' in '/private/tmp/videojs-wavesurfer-app/src/components'
error in ./src/components/VideoJSWavesurfer.vue?vue&type=script&lang=js
Module not found: Error: Can't resolve 'videojs-wavesurfer/dist/css/videojs.wavesurfer.css' in '/private/tmp/videojs-wavesurfer-app/src/components'
error in ./src/components/VideoJSWavesurfer.vue?vue&type=script&lang=js
Module not found: Error: Can't resolve 'video.js' in '/private/tmp/videojs-wavesurfer-app/src/components'
error in ./src/components/VideoJSWavesurfer.vue?vue&type=script&lang=js
Module not found: Error: Can't resolve 'wavesurfer.js' in '/private/tmp/videojs-wavesurfer-app/src/components'
error in ./src/components/VideoJSWavesurfer.vue?vue&type=script&lang=js
Module not found: Error: Can't resolve 'videojs-wavesurfer/dist/videojs.wavesurfer.js' in '/private/tmp/videojs-wavesurfer-app/src/components'
I fixed the issue in the guide, please try again.
@thijstriemstra it doesn't work,
VIDEOJS: Using video.js 8.3.0 with videojs-wavesurfer 3.9.0, wavesurfer.js 6.6.4 and vue.js 3.3.4
Description
When using wavesurfer plugin, it seems the surfer never gets initiated which result in params not found within the wavesurfermiddleware.
Steps to reproduce
Vue component file
Results
Expected
Please describe what you expected to see. wavesufer should display
Actual
when using the component and loading a webm file via the medias prop.getting error The error is coming from videojs.wavesurfer.js -> WavesurferMiddleware()-> var backend=this.player.wavesurfer().surfer.params.backend;
Seems wavesurfer().sufer is undefined.
Error output
Versions
videojs/wavesurfer
video.js:7.17 videojs-wavesurfer:3.8.0 wavesurfer.js:6.0.1
Browsers
chrome
OSes
Linux