Find alternative to popup #17

Closed
opened 2024-10-02 20:51:28 +02:00 by wish13yt · 2 comments
wish13yt commented 2024-10-02 20:51:28 +02:00 (Migrated from github.com)

The popup is starting to make my PC unable to locally test new builds. (lag)

Possible Solutions

  • Make/use a button (like the mute button)
  • Don't play music until the webpage has been interacted with
The popup is starting to make my PC unable to locally test new builds. (lag) # Possible Solutions - Make/use a button (like the mute button) - Don't play music until the webpage has been interacted with
5quirre1 commented 2024-10-03 00:15:48 +02:00 (Migrated from github.com)

Alr, So the popup is meant to activate the music since the bug did not allow it to play. I think this is a great idea plus we know more code so we could probably fix it. The popup can be taken away but we probably do the thing when the music plays only when you interact with the screen.

Tho let's figure it out once I finish everything plz ^^

Alr, So the popup is meant to activate the music since the bug did not allow it to play. I think this is a great idea plus we know more code so we could probably fix it. The popup can be taken away but we probably do the thing when the music plays only when you interact with the screen. Tho let's figure it out once I finish everything plz ^^
wish13yt commented 2024-10-20 17:29:32 +02:00 (Migrated from github.com)

Solution found

const ks = new Audio('https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3')
let userinteraction = 0
document.addEventListener('click',()=>{
if(userinteraction) return;
userinteraction++;
ks.play()
})

# Solution found const ks = new Audio('https://file-examples-com.github.io/uploads/2017/11/file_example_MP3_700KB.mp3') let userinteraction = 0 document.addEventListener('click',()=>{ if(userinteraction) return; userinteraction++; ks.play() })
This discussion has been locked. Commenting is limited to contributors.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
wish/freakybob.site#17
No description provided.