PuzzleGuy Posted November 16, 2018 Share Posted November 16, 2018 Hi everyone, My game just got rejected on Instant review due to the following reason: " On iPhone and iPad, games should mute any sound effects or background music when silent mode is enabled. " Ok, but how do I detect if the silent mode is enabled? Research didn't help much, except finding this on one forum: " I've had a response from Apple on this. They've said they don't and never have provided a method for detecting hardware mute switch and don't intend to do so." Also, there are some workarounds, but none of them is for HTML5. Facebook recommends using the WebAudio API for that, but no further info. Did anyone face the same issue? Btw, as I just learned, the purpose of physical silent switch on iOS devices is not to mute user initiated sounds (like games, for instance. You have volume control buttons for that), but to prevent sudden sounds (ie, alerts, phone ringing). So, how do you make your game listen to iOS silent switch and make it muted/unmuted? Shahdee 1 Quote Link to comment Share on other sites More sharing options...
PuzzleGuy Posted November 16, 2018 Author Share Posted November 16, 2018 Sorry, I forgot to mention that the project is made with 'Construct 3', so I'd appreciate if anyone from that area could say something. Shahdee 1 Quote Link to comment Share on other sites More sharing options...
Patrick_NoD Posted November 17, 2018 Share Posted November 17, 2018 I released a few C3 games on FB Instant and have never had an issue with this or had to implement anything specifically for silent mode. My games always just have a single sound toggle button that mutes/unmutes all sounds and music in the game. Quote Link to comment Share on other sites More sharing options...
Noel Posted November 19, 2018 Share Posted November 19, 2018 @PuzzleGuy It might be that you do not pause the sound when needed. Does your sounds/music actually play in in silent mode on iOS (do you manage to repro the issue)? Have you implemented something like this: FBInstant.onPause(function() { // Pause your game and the sound here. // Show a dialog with a "Resume" button that will resume the game // and the sound. }) Quote Link to comment Share on other sites More sharing options...
Shahdee Posted February 20, 2019 Share Posted February 20, 2019 On 11/19/2018 at 11:19 AM, Noel said: @PuzzleGuy It might be that you do not pause the sound when needed. Does your sounds/music actually play in in silent mode on iOS (do you manage to repro the issue)? Have you implemented something like this: FBInstant.onPause(function() { // Pause your game and the sound here. // Show a dialog with a "Resume" button that will resume the game // and the sound. }) I have exactly the same issue as @PuzzleGuy, however my game is made with PIXIJS. I have FBInstant.onPause implemented and it's totally for a different case, when your game goes to background and it has nothing to do with the physical switch. Answering to your question, yes, it's 100% reproducible, the game plays music in the Silent mode. @PuzzleGuy Hey, could you tell me if by this time you've found a solution for this problem? Quote Link to comment Share on other sites More sharing options...
Noel Posted February 20, 2019 Share Posted February 20, 2019 @Shahdee What do you use to play audio files? We recommend using the Web Audio API as it should work fine with the mute switch on Apple devices. Quote Link to comment Share on other sites More sharing options...
Shahdee Posted February 20, 2019 Share Posted February 20, 2019 1 hour ago, Noel said: @Shahdee What do you use to play audio files? We recommend using the Web Audio API as it should work fine with the mute switch on Apple devices. I'm using this https://github.com/pixijs/pixi-sound Quote Link to comment Share on other sites More sharing options...
Shahdee Posted February 20, 2019 Share Posted February 20, 2019 Ok, cool. Tried to use Howler and it does indeed support this Silent switch without any extra work from my side. Noel 1 Quote Link to comment Share on other sites More sharing options...
Reborned Posted February 21, 2019 Share Posted February 21, 2019 On 11/16/2018 at 11:06 AM, PuzzleGuy said: Sorry, I forgot to mention that the project is made with 'Construct 3', so I'd appreciate if anyone from that area could say something. I use C3 too and usually get my games reproved when I send them with only mp4/ogg sound files. When i convert all the audio to webm and send to review again, the game gets approved. Try it. You can add the same ogg audio files again in the projet that C3 will convert to webm Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.