CreateJS / SoundJS

A Javascript library for working with Audio. It provides a consistent API for loading and playing audio on different browsers and devices. Currently supports WebAudio, HTML5 Audio, Cordova / PhoneGap, and a Flash fallback.
http://createjs.com/
MIT License
4.42k stars 838 forks source link

How to ignore Iphone mute switch #312

Open MarsCaiWORD opened 5 years ago

MarsCaiWORD commented 5 years ago

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 commented 5 years ago

Yes you got to go to settings and activate the music app to draw over other apps or settings or you can try to go to volume control an set it from there it might be easier

On Tue, Jan 8, 2019, 12:20 AM 蔡建台TSAI,CHIEN-TAI <notifications@github.com wrote:

I want when the iphone mute switch is turned on keep music play Is there any solution?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/CreateJS/SoundJS/issues/312, or mute the thread https://github.com/notifications/unsubscribe-auth/AlY9wFpsqur2J3VSB5t3npOlGfuJWQClks5vBDilgaJpZM4Z01yQ .

MarsCaiWORD commented 5 years ago

@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 commented 5 years ago

Ok go to you phone settings an look for a setting that alows you to draw 1app over another then set your browser to do that ovwr the phone muting

On Tue, Jan 8, 2019, 2:38 AM 蔡建台TSAI,CHIEN-TAI <notifications@github.com wrote:

@justinborror https://github.com/justinborror Thank you for your reply, but I don’t understand what you mean. "activate the music app" i run in QQ browser

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/CreateJS/SoundJS/issues/312#issuecomment-452216915, or mute the thread https://github.com/notifications/unsubscribe-auth/AlY9wBibYrwjsiC9J_byRXSm5G4mJ1Yrks5vBFkcgaJpZM4Z01yQ .

MarsCaiWORD commented 5 years ago

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

MarsCaiWORD commented 5 years ago

@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 commented 5 years ago

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

MarsCaiWORD commented 5 years ago

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