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

114
Views
Audio plays in all browsers but Safari desktop

I have an issue with Safari desktop. This snippet of code works even on the mobile version of Safari just not on the desktop version (12.1).

js

var targetBeep = "targetBeep";
var atmos = "atmos";

createjs.Sound.registerSound("targetBeep.mp3", targetBeep);
createjs.Sound.registerSound("25372639_dark-tension-atmosphere_by_umcsound_preview.mp3", atmos);

$( ".play" ).css({'cursor': 'pointer'}).click(function() {
  setTimeout(function () {
  createjs.Sound.play(atmos);
  }, 2000);
});

HTML

<div class="play">
  play
</div>

<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>

Is it a problem with the code or is it Safari desktop? If its Safari what can I do to resolve this

var atmos = "atmos";

createjs.Sound.registerSound("https://upload.wikimedia.org/wikipedia/commons/1/12/03may2020-tobefree.mp3", atmos);

$(".play").css({
  'cursor': 'pointer'
}).click(function() {
  setTimeout(function() {
    createjs.Sound.play(atmos);
  }, 2000);
});
<div class="play">
  play
</div>

<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src="https://code.createjs.com/1.0.0/createjs.min.js"></script>

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!