Hice una función en mi HTML 5 usando Howler y quiero reproducir el sonido cuando recibo una respuesta del socket pero el sonido no se reproduce, pero se reproduce el mismo sonido cuando intento hacer clic en un botón. Esta es la función que hice para el sonido.
<script> var PlayNotificationSound = new Howl ({ src : ['http://localhost/rystore/resources/assets/sound/notification.ogg'], html5: true }); </script>Y el siguiente código es cuando recibo una respuesta del socket
Socket.on("delivery-boy-notification", () =>{ PlayNotificationSound.play(); Snackbar.show({text: "You Have Received A New Delivery Order Check Your Inventory"}) })El mensaje se muestra pero el sonido no se reproduce