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

56
Views
html audio keeps getting interrupted

I have a web based kisok, running on a raspberry pi, which plays sound continuously and displays information. Problem is that the audio gets interrupted when other things are happening. You hear lots of short pauses. For example when sometimes when I receive a mqtt message using (using Paho mqtt library) there is a pause. Or if I'm running a slideshow, there are lots of pauses when it's presumably loading the next image.

Is there any way to avoid this or can anyone explain why it happens?

I've noticed that if the audio player is isolated in a separate tab (chrome) it is unaffected by the other activities. But I would much prefer to keep everything on one page if possible.

Thanks!

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

0

I could imagine what is happening is the sound may be 2s long and if you get multiple "pings" this must completely play through still. The bypass is to pause the sound, set currentTime to 0 and re-play each message.

The result is that if you have ten messages coming in real quick, you'll hear 10 alerts but perhaps 0.1s 0.1s 0.1s ... 2s

mysound.pause();
mysound.currentTime = 0;
mysound.play();
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!