webrtc-stats
webrtc-stats copied to clipboard
Lifetime of "outbound-rtp"
The type definition for "outbound-rtp" says:
Statistics for an outbound <a>RTP stream</a> that is currently sent with this
{{RTCPeerConnection}} object.
But The RTP statistics hierarchy says:
RTP monitored objects are not deleted.
The intent being not to delete "outbound-rtp" stats objects, the first paragraph should say "that is currently sent or has ever been sent by this RTCPeerConnection". This is a simple PR.
But note that the modern getStats() implementation in chromium does not implement this. And if it did...
- How can you tell which RTP streams are active and which are old? Do we need a new stat?
- What happens to trackId, senderId, mediaSourceId and transportId of an inactive rtp stream?
Alternatively, we could make the spec align with current implementations and say that they are deleted when the sender is reconfiured to send a different ssrc or if the sender stops sending.
Have we discussed this before @alvestrand ?
Add a clarification that they are not deleted but if not sending the timestamp is stale
We should:
- Stop deleting stats
- lastPacketSentTimestamp tells you if the track is on or off
- we ought to have a boolean saying "BYE sent" (in which case sending more packets is illegal)
Suggestion: boolean for RTCP_BYE?
need a "received BYE" on inbound-rtp too.
both at the sender and receiver. Sent bye vs received bye
Resolved in #667 and #668