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

99
Views
Stop looping audio with javascript but completing playing iteration
<audio loop id="effect" src="/assets/web/audio/effect.mp3"></audio>

<script>document.getElementById('effect').pause();</script> 

I stop a playing audio this way, the problem is it ends abruptly in the moment I run the javascript code. It's probably tricky but I wonder how could I stop it but allowing it to complete the playing iteration?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

document.getElementById('effect').loop = false;

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/loop

about 4 years ago · Juan Pablo Isaza Report
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!