ChromeGaming / Dot-Box

Dot-Box is a game where players take turns drawing lines between dots to create boxes. The player who completes the most boxes wins. It's a simple yet strategic game enjoyed by people of all ages.
https://chromegaming.github.io/Dot-Box/
MIT License
95 stars 181 forks source link

[Bug]: Mute functionality #370

Open soniya-malviy opened 2 weeks ago

soniya-malviy commented 2 weeks ago

Give a brief about the bug ✍️

In mute functionality when user click on the mute button the background music will stop but still the sound when user click on dots will not stop . If user want to mute it means they want to stop sound completely right so game sound also need to mute.

What is the expected behavior? πŸ€”

Adding functionality to mute the the sound is not proper it will only stop background music but still game or chance or clicking on dot music is not stopping.

Provide step by step information reproduce the bug πŸ“„

i will add functionality when user click on the mute button than they are able to stop music completely whether it is background music or game music.

Select program in which you are contributing

GSSoC24

Code of Conduct

github-actions[bot] commented 2 weeks ago

Hey @soniya-malviy! πŸ‘‹

πŸ‘‰ Thanks for opening this issue. We appreciate your contribution and will look into it as soon as possible. πŸ‘‰ Don’t forget to star our Dot-Box and Follow Us on GitHub πŸ‘‰ Make sure you join our Discord, we have created separate channels for all projects

Aradhyajha commented 2 weeks ago

Hii @soniya-malviy please assign this issue to me To implement mute functionality for an audio or video , add a button and use JavaScript to toggle the muted property of the media element. For example, in your HTML, add a video element and a button: . Then, in your JavaScript file, add an event listener to the button that toggles the muted state of the video: document.getElementById('muteButton').addEventListener('click', () => { const video = document.getElementById('myVideo'); video.muted = !video.muted; document.getElementById('muteButton').textContent = video.muted ? 'Unmute' : 'Mute'; });. This allows users to mute and unmute the video by clicking the button.