[Webkit-unassigned] [Bug 202405] Regression: iOS 13.1 MediaStreamTrack.enabled = false kills audio track

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Oct 2 04:54:59 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=202405

--- Comment #5 from daginge at confrere.com ---
Word fo warning to others who might try the replaceTrack workaround. I'm seeing some serious delays post unmuting in certain cases on Chromium-based WebRTC engines (Safari included). Firefox seems unaffected. So don't go changing all of your muting code to replaceTrack, it might cause some other painful issues, best to keep this to iOS 13 only.

FWIW here is my workaround code:

const audioTrack = this.mediaStream.stream.getAudioTracks()[0];
const audioSender = this.pc
  .getSenders()
  .find(
    s => (s.track && s.track.kind === "audio") || s.track === null
  );
audioSender.replaceTrack(action.isMuted ? null : audioTrack);

And remember to stop doing track.enabled whereever you might do that in your code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20191002/eb7c09d8/attachment-0001.html>


More information about the webkit-unassigned mailing list