GameTwoThree Posted December 14, 2014 Share Posted December 14, 2014 So I need to pause audio in game, when the window is out of focus on mobile. Does anyone have any code snippet to deal with that? Thanks. Quote Link to comment Share on other sites More sharing options...
alex_h Posted December 23, 2014 Share Posted December 23, 2014 You want to look at window.onblur and window.onfocus As to how you pause / mute the audio, that will depend on what code library you are using to play your sounds with. 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.