Skip to content

Commit

Permalink
Merge pull request #3005 from henbos/240919_FixTimestamp
Browse files Browse the repository at this point in the history
Fix timestamp definition to align with webrtc-stats
  • Loading branch information
henbos authored Oct 3, 2024
2 parents 0c2ee4b + 09f394b commit 0a51ae3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
16 changes: 16 additions & 0 deletions amendments.json
Original file line number Diff line number Diff line change
Expand Up @@ -1080,5 +1080,21 @@
"web-platform-tests/wpt#47707"
]
}
],
"stats-timestamp": [
{
"description": "Use Performance.timeOrigin + Performance.now() for stats timestamps",
"type": "correction",
"status": "candidate",
"difftype": "modify",
"id": 50,
"pr": 3005,
"tests": [
"webrtc/RTCPeerConnection-getStats-timestamp.https.html"
],
"testUpdates": [
"web-platform-tests/wpt#48361"
]
}
]
}
2 changes: 1 addition & 1 deletion base-rec.html
Original file line number Diff line number Diff line change
Expand Up @@ -15215,7 +15215,7 @@ <h4 id="dictionary-rtcstats-members">
<dt>
<dfn data-idl="field" data-export="" data-dfn-type="dict-member" id="dom-rtcstats-timestamp" data-title="timestamp" data-dfn-for="RTCStats" data-type="DOMHighResTimeStamp"><code>timestamp</code></dfn> of type <span class="idlMemberType">DOMHighResTimeStamp</span>
</dt>
<dd>
<dd id="stats-timestamp">
<p data-tests="RTCPeerConnection-getStats.https.html" class="has-tests">
The <a data-link-type="idl" href="#dom-rtcstats-timestamp" class="internalDFN" id="ref-for-dom-rtcstats-timestamp-3"><code><code>timestamp</code></code></a>, of type <a data-link-type="idl" data-type="typedef" href="https://www.w3.org/TR/hr-time-2/#dom-domhighrestimestamp"><code>DOMHighResTimeStamp</code></a>,
associated with this object. The time is relative to the UNIX
Expand Down
9 changes: 5 additions & 4 deletions webrtc.html
Original file line number Diff line number Diff line change
Expand Up @@ -10729,7 +10729,7 @@ <h2>
<dfn data-idl="">timestamp</dfn> of type
{{DOMHighResTimeStamp}}, required
</dt>
<dd>
<dd id="stats-timestamp">
<p>
The {{timestamp}} indicating the most recent time a frame
from an RTP packet, originating from this source, was
Expand Down Expand Up @@ -15840,9 +15840,10 @@ <h2>
</dt>
<dd>
<p data-tests="RTCPeerConnection-getStats.https.html">
The {{timestamp}}, of type {{DOMHighResTimeStamp}},
associated with this object. The time is relative to the UNIX
epoch (Jan 1, 1970, UTC). For statistics that came from a
Timestamps are expressed with {{DOMHighResTimeStamp}}
[[HIGHRES-TIME]], and are defined as
{{Performance.timeOrigin}} + {{Performance.now()}} at the time
the information is collected. For statistics that came from a
remote source (e.g., from received RTCP packets),
{{timestamp}} represents the time at which the information
arrived at the local endpoint. The remote timestamp can be
Expand Down

0 comments on commit 0a51ae3

Please sign in to comment.