4 ms·
I do not hear any music on an iphone 15. Tried Firefox and Safari.
by Gys 3y ago
I do not hear any music on an iphone 15. Tried Firefox and Safari.
- basil-rash 3y agoIs your hardware mute switch enabled?
- Gys 3y agoThat was the problem, thanks :) So I learned something today: apps like Spotify will play regardless of the hardware mute. But a browser clearly mutes.
- basil-rash 3y agoYes, the AVAudioSession.Category parameter defaults to “soloAmbient”, signifying the sound playback is non primary and nonmixable. This pauses all other audio, respects the mute switch, and pauses on lock. For cases when the sound playback is central to the successful use of the application, the “playback” Category should be used. This allows audi to be generated even when the hardware mute is enabled and the screen is locked, and has options for mixing. This is set by apps like Spotify, Apple Music, and Safari when playing video content. I do not know of a way in HTML to configure this, I think it’s up to Safari to interpret the context based on user intention. It is possible that if the app defaulted to mute and had a user feature that started the audio session, Safari might assign it the “playback” Category. https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616509-playback https://developer.apple.com/documentation/avfaudio/avaudiose...
- pierrec 3y agoI don't have the real device but I tested it on Safari on iPhone 15 using BrowserStack and it seemed to work.
- natebc 3y agoi didn't get music with Firefox on Windows either. Will keep trying though. Edit: Oddly, if i open and close uBlockOrigin (nothing listed as blocked) then the animation will proceed frame by frame. One frame for open, one frame for close. Dropped an issue for you on your github.