Bug Issue: Audio not playing on phone in HTML5


Pages: 1

Krimm

  • Subscriber - Stencyl Indie
  • *
April 21, 2025, 06:19:42 am
Stencyl Version 4.1.1 build 12210

I've come across some unusual audio issues with HTML5 both on desktop and mobile. When opening an HTML5 site on Windows desktop on Firefox, the music that is meant to loop is not looping until after interacting with the game in some way - in this case, by clicking on a different button meant to play a sound. I don't know if this is a security feature to prevent a window from playing audio until a user interacts with it or something.

Next however, there is an issue with audio on mobile. On my iPhone when opening an HTML5 site, the audio does not play no matter what on Safari. I have both .ogg and .mp3 versions of the audio uploaded with no meta data. On Firefox on my phone though, the audio plays through headphones, but it does not play from the iPhone speakers.

I've uploaded a build of a sample game to my site so it can be tested here: https://bluequillstudios.com/testland/audioissue/audioissue

You can also download a copy of the Stencyl file here:  https://drive.google.com/file/d/11Z8KMJlVelr8YVm101GAwUxFhuSAfrYV/view?usp=sharing


Justin

  • Master Stencyler
  • *
May 06, 2025, 07:27:53 pm
Quote
I don't know if this is a security feature to prevent a window from playing audio until a user interacts with it or something.

Yeah, that's pretty much it.

No issue for me on an iPhone XR, iOS 18.4.1, on Safari. I don't have any headphones to test with.

You don't happen to have silent mode enabled on your phone, do you? I only ask because that personally trips me up sometimes when I don't understand why audio isn't playing when I expect it to on other apps.

If you could view the browser console when you try to load the game and play the sound, that could shed some more light on the issue. (see: Inspecting iOS and iPadOS)


Pages: 1

Details

  • Reported
    April 21, 2025, 06:19:42 am
  • Updated
    May 06, 2025, 07:27:53 pm

  • View Status
    Public
  • Type
    Bug
  • Status
    New
  • Priority
    Normal
  • Version
    (none)
  • Fixed in
    (none)
  • Assigned to
    (none)
  • Category
    (none)

Tags