HTML5 New - Could Use a Hand with HTML5 Deployment

Discussion in 'Programming' started by Joe Mahma, Sep 13, 2019.

  1. Joe Mahma

    Joe Mahma Member

    Joined:
    Sep 13, 2019
    Posts:
    2
    Hello, Yoyo:

    I've been loving GameMaker and have built my first HTML5 game. But I have a sound problem. Everything works great except for the first sound.

    For example, most of my buttons use the same sound effect. When the game first loads to the screen, however, the first button click has no sound. After that first press, all other button clicks have sound. And this is the same even if I press other buttons that have different sound effects: the first press has no sound.

    I do have my sound effects in an audio group, and I tried loading the group in the creation event of my game controller, but the first button click is still silent.

    Any thoughts?
     
  2. chamaeleon

    chamaeleon Member

    Joined:
    Jun 21, 2016
    Posts:
    954
    Apparently browsers these days does not want to play sounds until you have interacted with the page to ensure that you cannot annoy people without their permission. I've seen people having an initial room that asks the user if they want sound on or off, and it serves as both allowing the user the choice as well as registering that first interaction so sound can play, before proceeding to the rest of your game.
     
  3. Joe Mahma

    Joe Mahma Member

    Joined:
    Sep 13, 2019
    Posts:
    2
    Yeah, that's what I'm seeing to -- everywhere. The thing is, I found this guy who put his game on his website, and when I go there, the sound is working. I wrote to him in the comments of his YouTube page, but you know how that goes. I heard it can be done through extensions, but I can't figure out extensions.

    Anyway, I'm going to do what you suggest. If anyone else knows how to get around this, please let me know. I'll update my game. . .

    Thanks chamaeleon.
     
    Last edited: Sep 13, 2019

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice