Bug 198516 - Can't capture audio from mic or play through speakers after another app uses devices
Summary: Can't capture audio from mic or play through speakers after another app uses ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 12
Hardware: iPhone / iPad iOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-03 22:22 PDT by Dan
Modified: 2019-08-27 08:54 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2019-06-03 22:22:48 PDT
If another application captures devices while a tab is open, that tab won't be able to get sound from the mic or play sound through the speakers. Seems very similar to this bug: https://bugs.webkit.org/show_bug.cgi?id=179964. I've filed a separate bug report because that bug was resolved over a year ago.

Simple repro: https://codepen.io/dbriggs/pen/OYqprv.

These are the steps:
 1. Capture your mic/cam
 2. Stop capturing
 3. Open a different app (I tested with appear.in) and capture your devices in the app.
 4. Stop capturing in the app and return to Safari.
 5. Try capturing again.

Safari will no longer get sound from your mic. Also, it can't play sound through your speakers. I put a simple audio tag on the page with an mp3 file. Before the issue occurs, you'll hear the audio sample if you click the button to play it. Afterwards, you hear nothing. On refresh, the issue persists. You need to open this page in a new tab for it to work again.

You can also perform the steps in a different order and get the same result. For example, you can switch to the other app while you're still capturing and your existing stream won't be getting audio anymore when you return.

I'm getting this on an iPhone 5S running iOS 12.3.1 but not on my iPad Mini 2 running 12.4 (beta). So it's possible that was already resolved in the beta release. If that's the case, feel free to close this.

Potentially related to this bug (https://bugs.webkit.org/show_bug.cgi?id=180748), although it does sound a bit different.
Comment 1 youenn fablet 2019-06-04 08:28:23 PDT
I cannot repro either on latest iOS beta on an iPhone.
Dan, feel free to try it again on the latest iOS beta.
Comment 2 Dan 2019-06-11 13:16:23 PDT
Okay, that's good! I'd prefer to keep my iPhone on stable if possible since I only have 2 devices and like being able to compare beta and stable. Unless it's easy to revert from beta back to stable? I imagine it's not :) But if it works on my iPad on beta and your iPhone on beta then I reckon it's fixed.
Comment 3 Alexey Proskuryakov 2019-08-27 08:54:48 PDT
https://support.apple.com/en-us/HT203282 documents the procedures for reverting.