So I put my play-sound function in composable function. I need to play audio every time socket sends an event, but there is a problem – I can see what browser`s sound-play-icon appears, but there is no sound of an audio. But if I play it in setInterval, audio in setInterval and the ones played by webSocket works. I have no idea what causes that response. And I know about interaction with DOM to play something. Here is my code, if conditions are right, the only problem is audio
How do I make audio play? Cause sometimes it plays. I need reliable mechanism
I would be very thankful to someone who would tell me what`s the problem
Ive made a composable function, it correctly gets an event. I
ve checked – audio volume is max – 1, I set currentTime to start. No ideas, sry
KiraKristo is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.