VueJS 3, Wavesurfer.js + microphone
See original GitHub issueHello!
I tried to create an app based on VueJS3 and Wavesurfer.js that would visualize microphone input. Unfortunately, microphone plugin does not work.
I can load audio using this.waveRecorder.load('https://wavesurfer-js.org/example/media/demo.wav')
, and in this case, wavesurfer will work. But, if I use microphone plugin, I can’t see visualization of microphone input.
I have codepen.
And there is another thing.
If I load audio using this.waveRecorder.load('https://wavesurfer-js.org/example/media/demo.wav')
, and change stop_recording method to
stop_recording() {
this.isRecording = false;
this.waveRecorder.playPause();
}
microphone plugin will work, after the second attempt to turn on (The loaded file will reset). And this also will reduce canvas refresh time.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8
Top Results From Across the Web
Vue+Wavesurfer.js - CodePen
1. <!-- Use preprocessors via the lang attribute! e.g. <template lang="pug"> --> ; 2. <template> ; 3. <div id="app"> ; 4. <div v-if="isRecording"...
Read more >Vue Wrapper for wavesurfer.js
Vue Wrapper for wavesurfer.js ; Dynamic island Player using Vue.js and Howler.js · 27 October 2022 ; A simple keyboard synthesizer built with...
Read more >Microphone plugin - wavesurfer.js
Microphone plugin. Visualizes audio input from a microphone in wavesurfer.js instances. Quick start. Microphone: Start / Stop.
Read more >wavesurfer.js
wavesurfer.js is an HTML 5 audio player and waveform visualizer, made with JavaScript and Web Audio.
Read more >WaveSurfer Methods
wavesurfer.js is an HTML 5 audio player and waveform visualizer, made with JavaScript and Web Audio.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I uploaded code to codepen in the post upper. If you don’t see this, I will attach code here.
I use this code and I don’t know, why microphone plugin doesn’t work. Any suggestions?
Perhaps a browser restriction that requires user input before accessing the microphone is cascading down into the way the plugin captures the audio, and thus preventing it from capturing unless the code executes in the context of a click.