Game automatically mutes music that is playing on iPhone

15 views
Skip to first unread message

Jonatan Van Hove

unread,
Mar 27, 2015, 1:27:07 PM3/27/15
to haxef...@googlegroups.com
The game I'm currently working on an iOS has a mute button.
That value is stored, so if you mute it, kill the app, and launch it again, it is still muted.

When I start the game, and iTunes is playing (or any other music service like podcast, radio, ...) it fades to complete silence.
If I then swipe up from outside the screen, I get the little menu with wifi/bluetooth/sleep/etc... and I can start the music again.

Is there any way to get it to be so that launching the app while it's muted, doesn't stop the music?
I know this is possible in other games, wondering how to get this into HaxeFlixel.

What I've tried:
- setting FlxG.sound.muted = true in Gameclass.hx
- setting FlxG.sound.muted = true in create of PlayState()
- calling FlxG.sound.destroy(); in Playstate

Reply all
Reply to author
Forward
0 new messages