Lightspeed-react icon indicating copy to clipboard operation
Lightspeed-react copied to clipboard

Add playoutDelayHint to webrtc receiver for smoother video playback

Open mgroshans opened this issue 2 years ago • 1 comments

In general the idea is to alleviate stuttering that can occur even without packet loss due to inconsistent packet timing by adding a small buffer before playback.

This specific setting seems only partially supported and has changed names several times. In the latest extensions spec[1], it is defined as simply playoutDelay but only the slightly older name playoutDelayHint property appears to have any effect on my testing for Chrome 99.0.4844.51 on Windows 10. There appears to be an open issue to add support for Firefox[2].

[1] https://w3c.github.io/webrtc-extensions/#rtcrtpreceiver-interface [2] https://bugzilla.mozilla.org/show_bug.cgi?id=1592988

mgroshans avatar Mar 12 '22 04:03 mgroshans

Since this adds latency it may be more desirable to make it optional or add it to the configuration, but I will leave that up to maintainers. I also think it's somewhat (but not wholly) redundant if https://github.com/GRVYDEV/Lightspeed-webrtc/issues/30 is implemented.

And lastly I'll just emphasize that this will not fix all stuttering. Specifically it will only address stuttering that occurs even without packet loss; any stuttering caused by packet loss will remain.

mgroshans avatar Mar 12 '22 04:03 mgroshans