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

141
Views
WebAudio: createMediaElementSource works the first time, the second time it fails to execute

I'm making a simple dynamic audio player with jquery / js.

The user adds audio tracks locally and they get added into a playlist.

On double click, the song plays, and on double click the song stops.

There is an equalizer, forked from: https://codepen.io/chi-hin-leung/pen/VwppqLL

Scenario: When the user double clicks to play the song, a createMediaElementSource is created.

Problem:

  1. Users plays a song user
  2. then plays another song
  3. user plays the first song again (problem)

The equalizer doesnt work and throws an error. (screenshot)

error screenshot

Ive uploaded the code on codepen. & also on a test server.

mediaElement = trackElement;
console.log("๐ŸŽ‰ MEDIA ELEMENT: ", mediaElement);
sourceNode = context.createMediaElementSource(mediaElement);
console.log("๐ŸŽ‰ SOURCE: ", sourceNode);

PS: view on pc please

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!