Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Wavesurfer create region on event

I have a list of editable caption blocks - where users can add/remove caption blocks + in each block they can type/delete text too.

I want to:

  1. create/delete a region in wavesurfer each time a user clicks the add/remove button
  2. add/remove text in the region each time the user adds types/deletes the text

Here is a sample of my code.

    // Create a wavesurfer object
    var wavesurfer = WaveSurfer.create({
      container: document.getElementById("waveform"),

      // Visual preferences & settings
      waveColor: '#242844',
      progressColor: 'yellow',
      backgroundColor: "white",
      barWidth: 1,
      hideScrollbar: true,
      scrollParent: true,
      partialRender: true,
      interact: false,

      plugins: [
        WaveSurfer.timeline.create({
          container: document.getElementById("timeline")
        }),

        WaveSurfer.regions.create({
          regionsMinLength: 2,
          regions: []
        })
      ]
    });
    wavesurfer.load('https://ia800508.us.archive.org/15/items/LoveThemeFromTheGodfather/02LoveThemeFromTheGodfather.mp3');
    wavesurfer.regions.disableDragSelection()
    wavesurfer.setVolume(0)

How can I create this functionality?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!