WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
239978
replaceTrack with different constraints stops sending packets
https://bugs.webkit.org/show_bug.cgi?id=239978
Summary
replaceTrack with different constraints stops sending packets
makarand
Reported
2022-05-02 12:19:04 PDT
One of our (twilio) customers noticed this bug. They found it on iOS 15.4, but I see that we can reproduce it on Safari 15.4 running on MacOS as well. Easy repro steps using
https://codepen.io/makarand-patwardhan/pen/yLvyJgB
1. Click on Start Demo: This will establish webrtc between two peer connection with one party publishing an audio track 2. Notice that packets are flowing nicely between Peers. 3. Check on Music Mode and click on Update Track This will cause a new audio track to get acquired using different constrains than used originally. This new track is then used to replaceTrack (
https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpSender/replaceTrack
) At this point notice that the packets stop flowing and after about 20 seconds you see an error "A MediaStreamTrack ended due to a capture failure" on console. Notice that in Step 3 if you did not change the music Mode (that is use the same constraints as before you do not see this error)
Attachments
Patch
(1.98 KB, patch)
2022-05-04 04:15 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(1.98 KB, patch)
2022-05-04 23:48 PDT
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2022-05-02 12:26:56 PDT
This might be related or similar to
https://bugs.webkit.org/show_bug.cgi?id=239956
, probably a fall out of using VPIO for audio rendering.
Radar WebKit Bug Importer
Comment 2
2022-05-02 12:27:10 PDT
<
rdar://problem/92624773
>
youenn fablet
Comment 3
2022-05-04 04:15:39 PDT
Created
attachment 458788
[details]
Patch
Eric Carlson
Comment 4
2022-05-04 08:27:31 PDT
Comment on
attachment 458788
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=458788&action=review
> Source/WebCore/ChangeLog:9 > + We should always reconfigure thr microphone processor even if we are not using it,
s/thr/the/
makarand
Comment 5
2022-05-04 09:27:47 PDT
Hello Youenn, Thank you for looking at this - Can you please let us know which version will have the fix ? And in the meanwhile what can our customer do to workaround this?
youenn fablet
Comment 6
2022-05-04 23:39:40 PDT
In the fiddle, the workaround is to not stop the audio track before getting another one (or stop it after getting the new one). Another approach is to stop audio rendering just before starting capture. And restart audio rendering once capture started.
youenn fablet
Comment 7
2022-05-04 23:48:28 PDT
Created
attachment 458853
[details]
Patch for landing
EWS
Comment 8
2022-05-05 02:50:07 PDT
Committed
r293827
(
250300@main
): <
https://commits.webkit.org/250300@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 458853
[details]
.
Ostap
Comment 9
2022-05-06 03:27:30 PDT
Hello, Which version will have the fix? We have tried one of the latest builds in
https://webkit.org/build-archives/#mac-monterey-x86_64%20arm64
MAY 6, 2022, 12:25 PM GMT+3, and we could still reproduce the issue.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug