MoOx / pjax

Easily enable fast Ajax navigation on any website (using pushState + xhr)
MIT License
1.46k stars 125 forks source link

Audio Keep Repeating #202

Open farishrf opened 5 years ago

farishrf commented 5 years ago

There is an issue the Audio is keep repeating, not only the audio even javascript code

This is the code if(response.replysound != 'undefined' && response.replysound){ alert(14); var audio = new Audio('./sound.mp3'); audio.play(); } Explain: When I enter the page thats contain Audio or any code JS. and go another page like home, I wait 5 seconds and Its keep Alerting 14, and playing audio! I've tried everything I can but its not work. I hope you guys fix it.

BehindTheMath commented 5 years ago

You need to show some more code if you want help.

farishrf commented 5 years ago

Well, thats it https://hastebin.com/asodarepaw.js as u can see in line 84 there is an alert , audio. What is the problem? I'll tell u while moving from page to page using pjax its execute the line 84 etc.