luceroweb / haunted-house-game

https://luceroweb.github.io/haunted-house-game/
1 stars 12 forks source link

No sound playing automatically after the home page loads #96

Open jdaniels22 opened 2 years ago

jdaniels22 commented 2 years ago

Devices

iMac macOS Big Sur Version ​​11.6

Safari 15.0

Description

No sound playing automatically after the home page loads

Expected Behavior

The user should expect that the sound would automatically play, instead of having to push the button to play

Actual Behavior

Upon reloading the game, the sound is not automatically playing

Steps to Reproduce Issue

  1. Open up game link https://luceroweb.github.io/haunted-house-game/#/
  2. Reload page
alberme commented 2 years ago

Hi @jdaniels22 unfortunately auto playing audio on first page load without user gestures, such as clicking a button, is a security limitation of modern browsers. Based on my time constraints, I may or may not continue finding an optimal solution but for now my minimal viable solution is the user would need to toggle the audio button or click one of the start game buttons to get audio playing.

cc @luceroweb @lreyes-qae

SmiJa commented 2 years ago

@jdaniels22 we have chosen to reject this ticket because of it being a limitation of the browser.

cc: @luceroweb @lreyes-qae @alberme