Skip to content

How to ignore Iphone mute switch #312

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
MarsTsaiCoding opened this issue Jan 8, 2019 · 7 comments
Open

How to ignore Iphone mute switch #312

MarsTsaiCoding opened this issue Jan 8, 2019 · 7 comments

Comments

@MarsTsaiCoding
Copy link

MarsTsaiCoding commented Jan 8, 2019

I want when the iphone mute switch is turned on keep music play
Is there any solution? btw i use web audio api play music

iphone 6
QQ browser

@justinborror
Copy link

justinborror commented Jan 8, 2019 via email

@MarsTsaiCoding
Copy link
Author

MarsTsaiCoding commented Jan 8, 2019

@justinborror Thank you for your reply, but I don’t understand what you mean. "activate the music app" i run my website in QQ browser

@justinborror
Copy link

justinborror commented Jan 8, 2019 via email

@MarsTsaiCoding MarsTsaiCoding reopened this Jan 8, 2019
@MarsTsaiCoding
Copy link
Author

MarsTsaiCoding commented Jan 8, 2019

@justinborror sor , I still confused do you have Skype?

@MarsTsaiCoding
Copy link
Author

MarsTsaiCoding commented Jan 8, 2019

@justinborror for example like this website use web audio api play music
when i use QQ browser open this website and turn on iphone mute switch , is mute , but i want unmute , btw other browser is working ex. chrome , native browser

@banjerluke
Copy link

There is a way to unlock audio from the Web Audio API while the iPhone/iPad ringer switch is off. The trick is to play a short bit of silence from an HTML5 audio tag. This "unlocks" the audio for that browser window and lets the Web Audio API audio come through.

Here's a gist with the code I use:
https://gist.github.com/banjerluke/b8dd69000d9d874d52602e222fdf6646

@MarsTsaiCoding
Copy link
Author

@banjerluke thank you , it's working , you made my day ,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants