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

172
Views
Js/jQuery to play a short sound without user intervention

Before you tell me this is something I should never do, please know this is for an internal application, and is audio feedback for someone across the room running a barcode scanner.

This is a very specific purpose.

The form has two fields, one filled by a scale, and one by a barcode reader, and both output as keyboard data followed by

The user isn't looking at the screen so won't have the visual feedback making sure the correct data goes in the correct field.

I can get audio feedback when the submit is pressed via something like:

jQuery('#weight_submit').click( () => new Audio('/sounds/chime.wav').play() );

Prior to submit we also want to play another sound after the data is submitted to the other input box, on a .focusin or .focusout event, but the console says there isn't permissions. (Chrome)

Even if I could enable this on just THIS workstation, but I'm open to ideas

Please advise, and thank you!

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

0

You could try allowing auto play on Chrome.
Try this one:

You can disable the autoplay policy entirely by using a command line flag: chrome.exe --autoplay-policy=no-user-gesture-required.
This allows you to test your website as if user were strongly engaged with your site and playback autoplay would be always allowed.

Taken from: https://developer.chrome.com/blog/autoplay/#:~:text=You%20can%20disable%20the%20autoplay,autoplay%20would%20be%20always%20allowed.

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!