sei-ec-remote / project-1-issues

Open new issues here
1 stars 2 forks source link

Audio is being unpredictable #229

Closed JohnArochaDev closed 9 months ago

JohnArochaDev commented 9 months ago

What's the problem you're trying to solve?

My background audio works sometimes and wont other times

Post any code you think might be relevant (one fenced block per file)

        <audio src="audio/backgroundsound.mp3" autoplay>
                <embed 
                src="audio/backgroundsound.mp3" 
                loop="true" 
                hidden="true" 
                autostart="true">
        </audio>

If you see an error message, post it here. If you don't, what unexpected behavior are you seeing?

none

What is your best guess as to the source of the problem?

no clue ive been trying to figure it out

What things have you already tried to solve the problem?

everything online

Paste a link to your repository here

https://github.com/jpjpjppj/Battleship

nayaba commented 9 months ago

Is this audio meant to be playing the entire time, or only when a square is clicked on?

nayaba commented 9 months ago

It could be that chromium browsers do not allow autoplay. It's not a best practice to autoplay audio, as there are people who use screen readers who need to be able to hear the screen reader over any audio in order to interact with the site. You might consider creating a button to start audio.

JohnArochaDev commented 9 months ago

Thanks!

JohnArochaDev commented 9 months ago

Ill try that

JohnArochaDev commented 9 months ago

Can you hop in a room with me? Im really struggling with this