Closed Tholkappiar closed 9 months ago
Go ahead @Tholkappiar
Due to the browser policy the error is occurring , the user have to perform some events like onclick to eradicate this error ! so I propose the implementation of popup at the very start of the page , to enable or disable the sound for the game , this also gives the user control over the game at the beginning , any other ideas or proposes , feel free to ask . Thank you !
Can you implement the logic as to autoplay the sound when the website shows up, I know the browser handling error is occurring but still is there a way or logic @Tholkappiar
I don't think we need any extra button as on one click sound is turning on @Tholkappiar
So any other ideas or suggestions , or leave the errors to occur in the back !?
Can you specify what exactly the errors are occurring in the backend @Tholkappiar
The error is occuring because of the browser policy which blocks the sounds which are automatically played when opening the website to ensure to avoid unexpected high sounds ! So , the sound can be enabled after the user interaction until , there will no sounds ! And also mousemove events don't work here . Consider a user-initiated action, like clicking a button, to trigger audio playback.Thank you. @Rakesh9100
Okay go ahead @Tholkappiar
Description
Autoplay Issue with Background Music in JavaScript
Problem Description
When attempting to manage background music for a game using JavaScript, an issue arises related to the autoplay policy in browsers. The error message is:
Steps to Reproduce
Kindly Assign this issue to me, Thank you.
Screenshots
Checklist
Code of Conduct