skip/remove "play" button after loader is complete?

247 views
Skip to first unread message

Annika Terrortante

unread,
Dec 23, 2018, 5:16:08 PM12/23/18
to excaliburjs
How can i skip the play button?

I would like the game to direct start after the loader was completed.
Specially for testing stuff its very annoying when i allways need to click...
also i would like to make my "own" start button then in a extra scene, with some options etc.

i was sadly not able to figure it out so far with the doc :(


Erik Onarheim

unread,
Dec 23, 2018, 5:47:32 PM12/23/18
to excaliburjs

---------- Forwarded message ---------
From: Erik Onarheim <erik.o...@gmail.com>
Date: Sun, Dec 23, 2018, 16:45
Subject: Re: [excaliburjs] skip/remove "play" button after loader is complete?
To: Annika Terrortante <annix...@googlemail.com>


Hi Annika,

To suppress the play button, use the `suppress PlayButton = true` property. 


To customize the play button, you can override the `playButtonFactory()` and custom element out.

I'll make an issue to make this more prominent in the docs.

Sorry about that, let me know if you have any questions or problems.

Cheers,
Erik

--
You received this message because you are subscribed to the Google Groups "excaliburjs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to excaliburjs...@googlegroups.com.
To post to this group, send email to excal...@googlegroups.com.
Visit this group at https://groups.google.com/group/excaliburjs.
To view this discussion on the web visit https://groups.google.com/d/msgid/excaliburjs/60df8954-4258-430b-aee7-89cb7dbb96d2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Annika Terrortante

unread,
Dec 24, 2018, 5:25:38 AM12/24/18
to excaliburjs
hi, thank you =)

i use the
loader.suppressPlayButton = true; property but it seems to have no effect :(

Erik Onarheim

unread,
Dec 24, 2018, 10:10:10 AM12/24/18
to excaliburjs
Hi Annika,

Apologies I mispoke before, the suppressPlayButton needs to set as an engine property.


The play button is meant to workaround Chrome blocking audio without a user gesture https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#webaudio, as such using suppressPlayButton=true in Chrome will cause the loader to freeze (suppressPlayButton=true in another browser like firefox or in a headless testing environment will still work though since they do not have audio context restrictions yet)

I've added an issue for Chrome to allow the loader to continue with a warning about audio context in the console.

Annika Terrortante

unread,
Dec 28, 2018, 3:04:57 PM12/28/18
to excaliburjs
thank you =)
Reply all
Reply to author
Forward
0 new messages