OiO.lk Blog jQuery Is there any way for play an audio without user interaction?
jQuery

Is there any way for play an audio without user interaction?


I have a Vue Js project. I use SignalR. The data flow is continuous and I follow it on ‘watch’.

watch: {
jobListAmount(newValue, oldValue) {
  if (newValue - oldValue == 1) {
    document.getElementById("clkSoundPlay").click();
  }

<button id="clkSoundPlay" @click="onClickSoundPlay" style="display: none;"></button>

I tried click a none display button with javascript but it is not work for me.
Is there any way to do this?



You need to sign in to view this answers

Exit mobile version