Open yuanchao0310 opened 2 years ago
Makes sense to me, and in terms of implementation, this was implemented in chromium/libwebrtc in M95. However it looks like it was only implemented for the audio case, not the video case. Anyway that's an implementation issue, not a spec issue.
in https://github.com/w3c/webrtc-extensions/blob/main/explainer.md#api-2-sendercapturetimeoffset
senderReceiverTimeOffset = remoteOutboundRtpStats.timestamp - (remoteOutboundRtpStats.remoteTimestamp + remoteInboundRtpStats.roundTripTime / 2);
if receiver is a recv only endpoint, it cannot get remoteInboundRtpStats.roundTripTime, because remoteInboundRtpStats.roundTripTime use SR and RR to get rtt time, that means the receiver must send RTP to remote peer.
so need use remoteOutboundRtpStats.roundTripTime, which can be calculated by XR RTCP at receiver side. after update: