-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Inconsistent behaviour between HTML5 and Web Audio when mute button is activated on iOS #753
Comments
I'm on 10.3.1 and having no issues whatsoever. Which phone model are you using? |
@NathanLawrence iPhone 6 using safari browser. You? |
Well I also can not play the iPhone (6 and 6s) using iOS 10 and the latest version (10.3.2). What I realized is that the problem is that in iOS AutoStart does not work and does not work the function goes standalone, but if you create a simple button to play, it's works just push the button that works. Is this a problem for Howler.js or iOS? Detail did the tests in both Safari and Chorme the result was the same. Edit: I tested the same simple code in two Android and it worked (the code is similar to the basic so I put the bugger and small things). |
Okay if it's just because of auto start then it's more of an iOS feature, but I guess example should be updated to have a play button as you suggested. Anyway currently I'm trying to skip howler and the web audio API entirely, instead using HTML5 audio, as I only need basic playback features, but need good cross browser support. |
This is very odd. I wonder why I'm having trouble recreating this. It might be worth trying to build some sort of test profiler. Did you find a workaround with Howler, or did you have to give up? |
@NathanLawrence I gave up Howler because I realised I don't need it so far, just using plain HTML5 player. |
UPDATE: Sorry, i just restarted the device and started working. |
did anyone make it work with cordova ios 10.3.2? |
I'm unable to reproduce this issue on 10.3.2 or 10.3.3. Is anyone still having this issue, and if so, can you post steps to reproduce? |
@goldfire i haven't used this since, but just tried again as in the OP without issues this time. It sounds silly, but it might be because my device was muted. The radio player demo disregards the iPhone's mute button, but the web audio demo actually takes it into account. My apologies for the confusion, feel free to close. Still curious why the mute button sometimes works and sometimes doesn't. |
Anecdotally, I’ve also had people report issues to my Howler based repo on iOS because their devices were muted and they didn’t realize. It has caused some confusion and hair pulling in the past for us as well. |
+1 for this issue. Its not really an issue but more of an inconsistency. When my iPhone is muted and i load into my game, all the sounds seem to play. But when a new Howl is added and a sound played from it, it starts playing and then cuts off promptly. Might have something to do with 'unlocking' sounds because its a new Howl? I understand the device is on mute, but you would expect either all the sounds to play, or none of them. Using iPhone6S iOS 10.3.3 |
I am experiencing the AutoStart errors on my iphone 6 running 10.3.2. However, as soon as I manually push a button that triggers a sound (htm5 or web audio), the AutoStart functionality works as expected from then onwards. I'm also experiencing the problem with not hearing sound when my iphone is muted (silent mode). I can experience this problem even with the demos on the howler front page. While listening to the audio sprites demo, as soon as I flick the switch to turn the phone off silent, audio immediately comes alive. This is only a problem using web audio and sound is not muted when using html5. |
Unless I'm misunderstanding, this is the expected behavior. If the physical mute switch is on, then you should not hear any sound until you switch it un-muted. Closing for now, but will re-open if I was understanding the issue incorrectly or different information is provided. |
@goldfire the thing is on iOS when your device's mute switch is on, sounds do play! They are just less reliable, some will play, some will not. I am not sure if this is something that can be handled within howler or not, but ideally I would just expect some consistency in the sense that when your device is set to mute, you either hear all sounds, or none of them, not an unpleasant mixed result. |
@kanemason Are you referring to when HTML5 audio and Web Audio are mixed? HTML5 Audio seems to play regardless of the mute status, and I'm unaware of a way to fix this (if someone knows of a way I'd be happy to get it integrated). I've been unable to reproduce a scenario where this doesn't work consistently with Web Audio to this point. |
@goldfire we are using both html5 audio (for background music) and web audio. And we have multiple audio sprites loaded and playing at a time. |
@goldfire There is a way to make web audio play w/ the mute switch set to silent. If you play a short, silent <audio> sound the web audio will switch from muted to unmuted and play the same way as HTML audio. That's the only way I have found to make it consistent. IMO web audio should NOT be tied to the ringer volume and should be have the same as HTML audio. I posted an example of code that makes web audio play like <audio> here: I actually have some information in addition to that answer- |
@goldfire We've been having this issue with Howler on iOS ourselves. The problem turned out to be that HTML5 Audio will unlock upon user interaction, but not if the actual play happens in the #1008 enables HTML5 Audio unlocking similar to the WebAudio unlock. |
I was running the "Basic Functions" demo on https://howlerjs.com and observed that the "Run web audio tests" does not produce any sound on my iPhone (iOS 10.3.1).
I'd love to understand why, considering that http://caniuse.com/#feat=audio-api shows Web Audio API should work on iOS Safari?
The text was updated successfully, but these errors were encountered: