Skip to content

RTCStatsType out of sync with webrtc-pc #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
milkypostman opened this issue Jan 5, 2015 · 6 comments
Closed

RTCStatsType out of sync with webrtc-pc #5

milkypostman opened this issue Jan 5, 2015 · 6 comments
Assignees

Comments

@milkypostman
Copy link

The RTCStatsType in webrtc-stats is out of sync with RTCStatsType in webrtc-pc.

  1. In webrtc-stats there is no hyphen before rtp.
  2. There are missing stats types from the webrtc-pc documentation.
@vr000m
Copy link
Contributor

vr000m commented Jan 5, 2015

Thank you for the feedback, Donald. This was discussed at TPAC14 and there are active PRs under discussion which fix the issue.

AFAIU, the RTCStatsType defined in webrtc-stats are the correct ones and we are currently working out how best to document this to avoid this kind of discrepancy between the two documents.

@alvestrand
Copy link
Contributor

@dontcallmedom promised to find the link to the TAG document which says whether we should have hyphens or not.

@dontcallmedom
Copy link
Member

re hyphens in inboundrtp/outboundrtp vs hyphenated version, the TAG guidance is to use hyphens for enum values:

Enum values: Lowercase, dash-delimited

@alvestrand
Copy link
Contributor

alvestrand commented May 31, 2016

Two items:

  • Need to add the dashes in the stats document
  • Need to sort out things so that one of the places is clearly authoritative

First one is editorial. Separated out as #50

@alvestrand
Copy link
Contributor

Note: Extensible enums don't currently exist. Filed bug at whatwg/webidl#184

@alvestrand
Copy link
Contributor

Correct extensible enum bug: https://www.w3.org/Bugs/Public/show_bug.cgi?id=27048

alvestrand added a commit that referenced this issue Nov 23, 2016
KaptenJansson pushed a commit to webrtcHacks/adapter that referenced this issue Dec 13, 2016
* chrome shim: move getStats

this moves getStats so it overrides on the prototype, not as
part of the constructor.

* chrome shim: dont override RTCPeerConnection

dont override the unprefixed RTCPeerConnection if it exists.

* chrome shim: dont shim promises on unprefixed PC

dont attempt to shim promises using callbacks if we have
support for native promises.

* chrome shim: fix generateCertificate bug

this restores the old (and correct) logic of checking for
webkitRTCPeerConnection.generateCertificate

* chrome: return spec stats when supported

this returns spec-stats when they are supported. Support
is determined by checking for the length of
  RTCPeerConnection.prototype.getStats.length
which is 2 for the Chrome legacy API and 0 if the new
getStats implementation is available.

This is a breaking change, the types and contents of those
statistics will be different.

* Revert "chrome shim: dont shim promises on unprefixed PC"

This reverts commit 1693ded.

* chrome: only promisfy createOffer/Answer < M52

promisifys createOffer and createAnswer only in
Chrome < M52. This is due to
  https://bugs.chromium.org/p/chromium/issues/detail?id=619289
which was discovered a bit late.

* chrome: add hyphen in stats type

This adds the hyphen in a number of stats types.
See w3c/webrtc-stats#5 for
the details.

* chrome: remove object stats behaviour

removes iterating over the Map with Object.keys()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants