October 22, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video