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

217
Views
How To Skip Silence in Audio In JavaScript

I have searched a lot about this but I can't find any solid code snippet of anything like that that explains how this would work.

Google Podcasts web app does this and I would like to learn how this works for a web app I'm building.

A lot of podcast apps let you skip silences even as small as half a second long silences.

How can I do this with JavaScript?

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

0

You can try this:

    <script>
    function skip(s) {
    var aud = document.getElementById("myAudio");
    aud.currentTime = vid.currentTime +  s;
    }
    </script>
<script>
while true {if document.getElementById('myAudio').currentTime == 5 {skip(0.5)}}
    <audio id='myAudio' src=potcast.mp3 controls><br>
    <button onclick=skip(0.5)>Skip</button> <!-- 0.5s = skip(0.5) -->

How to use it?

  1. You copy the code into your project. (Could be a HTML-Page)
  2. Style the Button
  3. Set the skip duration to 0.5 (or wat you want)
  4. Set the src= to your audio-file-name
  5. Style the audio player (or use your potcast-plyer)
  6. Try it.
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!