Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

113
Vistas
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
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda