wavesurfer.js autoplay on load
See original GitHub issueI am using wavsurfer.js for a site and I have been able to get it working almost the way I want it to. I have several buttons that all load a different track into the player but I would really love to know how to make it is so the the tracks start playing automatically once loaded. for the track selection buttons I have this code that loads the track.
<div class="controls"><button class="btn" onclick="wavesurfer.load('wavesurfer/media/song_01.mp3');"> Play </button>
Any help or ideas would be greatly appreciated as I am new to this. Cheers
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (6 by maintainers)
Top Results From Across the Web
How to detect when Autoplay fails in WaveSurfer.js?
After searching around, I found that WaveSurfer JS uses WebAudio (an object called AudioContext is created). According to the Google page:.
Read more >WaveSurfer Events
wavesurfer.js is an HTML 5 audio player and waveform visualizer, made with JavaScript and ... ready – When audio is loaded, decoded and...
Read more >WaveSurfer Options
option type default
audioRate float 1
audioContext object none
audioScriptProcessor object none
Read more >FAQ
The audio will start playing as you press play. A thin line will be displayed until the whole audio file is downloaded and...
Read more >src/mediaelement.js
load (url, container, peaks, preload) {; const media = document.createElement(this.mediaType);; media.controls = this.params.mediaControls;; media.autoplay ...
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
Oh, sorry, it’s
ready
, notload
event. So:Hi. My wavesufer autoplays wen i load a page with it, i would like to stop auotoplay, how do i stop autoplay?