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

139
Vistas
How to i play notification sound on HTML5 after getting response from webscoket request

I made a function in my HTML 5 using Howler and wants to play the sound when I receive a response from the socket but the sound doesn't play, but the same sound plays when I tried using a button click. This is the function I made for sound

<script>
   var PlayNotificationSound = new Howl ({
     src : ['http://localhost/rystore/resources/assets/sound/notification.ogg'],
     html5: true
});
</script>

And the below code is when I receive a response from the socket

Socket.on("delivery-boy-notification", () =>{
    PlayNotificationSound.play();
    Snackbar.show({text: "You Have Received A New Delivery Order Check Your Inventory"})
})

The message is being shown but the sound is not being played

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