| Summary: | No sound from HTMLAudioElement when navigator.audioSession.type is set to "transient" or "transient-solo" | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Danny Moerkerke <drmoerkerke> |
| Component: | Media | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | drmoerkerke, jer.noble, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari 17 | ||
| Hardware: | iPhone / iPad | ||
| OS: | iOS 17 | ||
|
Description
Danny Moerkerke
2023-11-09 03:24:44 PST
I had a try on iOS 17.4 and it seems to work as expected, using https://jsfiddle.net/e9ahcb35/. Setting "transient" triggers using https://developer.apple.com/documentation/avfaudio/avaudiosession/category/1616560-ambient. If the silent switch is on, video is muted, otherwise it is not. Maybe that is what you experienced? As of mixing with other apps, I tried the following: 1. Launch music app 2. Open https://jsfiddle.net/e9ahcb35/ and play. I can hear both audio in that case. If the page is backgrounded, audio is stopped, which seems expected as well. Marking as Invalid although it should really be "Behave as expected". @Danny, feel free to reopen the bug especially if there is a particular point I missed. (In reply to youenn fablet from comment #2) > I had a try on iOS 17.4 and it seems to work as expected, using > https://jsfiddle.net/e9ahcb35/. > > Setting "transient" triggers using > https://developer.apple.com/documentation/avfaudio/avaudiosession/category/ > 1616560-ambient. > > If the silent switch is on, video is muted, otherwise it is not. > Maybe that is what you experienced? > > As of mixing with other apps, I tried the following: > 1. Launch music app > 2. Open https://jsfiddle.net/e9ahcb35/ and play. > I can hear both audio in that case. > > If the page is backgrounded, audio is stopped, which seems expected as well. > > Marking as Invalid although it should really be "Behave as expected". > > @Danny, feel free to reopen the bug especially if there is a particular > point I missed. Thanks, when the options "transient" and "transient-solo" are selected, the audio from the web app is now mixed with the audio coming from the Music App on iOS, but on MacOS Sonoma 14.4 the audio from the web app is always mixed with the audio from other apps, regardless to what navigator.audioSession.type is set to. When navigator.audioSession.type is set to "play-and-record" on iOS 17.4 it still pauses the audio from other apps when the mic is accessed from the web app with navigator.mediaDevices.getUserMedia. |