Summary: | (Safari 15 - iOS15): Increased audio latency on streaming via webrtc | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | asanand | ||||
Component: | WebRTC | Assignee: | youenn fablet <youennf> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | ap, bfulgham, cdumez, eric.carlson, ews-watchlist, glenn, jer.noble, philipj, sergio, sun.shin, vfarley, webkit-bug-importer, youennf | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | Safari 15 | ||||||
Hardware: | iPhone / iPad | ||||||
OS: | iOS 15 | ||||||
Attachments: |
|
Description
asanand
2022-02-09 07:03:40 PST
Could you please clarify if this is a new issue in Safari 15.4 beta, or if it affects shipping Safari too? Also, is the application capturing microphone? It is not unexpected that web audio will get you the lowest latency. (In reply to Alexey Proskuryakov from comment #1) > Could you please clarify if this is a new issue in Safari 15.4 beta, or if > it affects shipping Safari too? It affects shipping safari too (In reply to youenn fablet from comment #2) > Also, is the application capturing microphone? > It is not unexpected that web audio will get you the lowest latency. The application is not capturing microphone. What should be the difference in latency between playing with and without WebAudio. (In reply to asanand from comment #4) > (In reply to youenn fablet from comment #2) > > Also, is the application capturing microphone? > > It is not unexpected that web audio will get you the lowest latency. > > The application is not capturing microphone. > > What should be the difference in latency between playing with and without > WebAudio. A small latency is better for reactiveness, less so for battery life and stability. With WebAudio, spec mentions a small audio quantum so we tune the audio renderer accordingly. For regular audio, we do a different set up but I can see some applications wanting to get low latency for incoming WebRTC audio. We could look at implementing https://w3c.github.io/webrtc-extensions/#dom-rtcrtpreceiver-playoutdelay so that your application could provide a hint about this. Can you provide more info on your usecase? (In reply to youenn fablet from comment #5) > (In reply to asanand from comment #4) > > (In reply to youenn fablet from comment #2) > > > Also, is the application capturing microphone? > > > It is not unexpected that web audio will get you the lowest latency. > > > > The application is not capturing microphone. > > > > What should be the difference in latency between playing with and without > > WebAudio. > > A small latency is better for reactiveness, less so for battery life and > stability. > With WebAudio, spec mentions a small audio quantum so we tune the audio > renderer accordingly. > For regular audio, we do a different set up but I can see some applications > wanting to get low latency for incoming WebRTC audio. > > We could look at implementing > https://w3c.github.io/webrtc-extensions/#dom-rtcrtpreceiver-playoutdelay so > that your application could provide a hint about this. > > Can you provide more info on your usecase? We are having application for cloud gaming where we stream audio/video with optional upstream(mic streams) (In reply to youenn fablet from comment #5) > (In reply to asanand from comment #4) > > (In reply to youenn fablet from comment #2) > > > Also, is the application capturing microphone? > > > It is not unexpected that web audio will get you the lowest latency. > > > > The application is not capturing microphone. > > > > What should be the difference in latency between playing with and without > > WebAudio. > > A small latency is better for reactiveness, less so for battery life and > stability. > With WebAudio, spec mentions a small audio quantum so we tune the audio > renderer accordingly. > For regular audio, we do a different set up but I can see some applications > wanting to get low latency for incoming WebRTC audio. > > We could look at implementing > https://w3c.github.io/webrtc-extensions/#dom-rtcrtpreceiver-playoutdelay so > that your application could provide a hint about this. > > Can you provide more info on your usecase? When can we expect a fix for this issue where we could provide a hint as mentioned here > We could look at implementing > https://w3c.github.io/webrtc-extensions/#dom-rtcrtpreceiver-playoutdelay so > that your application could provide a hint about this. Youenn, could you please provide an update on the fix for this? Created attachment 456906 [details]
Patch
Committed r292563 (249401@main): <https://commits.webkit.org/249401@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456906 [details]. (In reply to youenn fablet from comment #10) > Created attachment 456906 [details] > Patch Which Safari version should have this fix ? This fix shipped with Safari 15.5 (all platforms). Still observing an additional ~50ms of latency after this patch. Could we please reevaluate whether the preferred buffer size could be further reduced to address the audio latency, or whether a different approach could be considered to resolve this? |