W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > July 2017

[webrtc-stats] RTCMediaStreamTrackStats is four dictionaries in one

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Mon, 10 Jul 2017 23:10:30 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-241878205-1499728228-sysbot+gh@w3.org>
jan-ivar has just created a new issue for https://github.com/w3c/webrtc-stats:

== RTCMediaStreamTrackStats is four dictionaries in one ==
The description of nearly every member in [RTCMediaStreamTrackStats](https://w3c.github.io/webrtc-stats/#dom-rtcmediastreamtrackstats) starts with "Only valid for..."!

Like https://github.com/w3c/webrtc-stats/pull/191 we can describe this more effectively in WebIDL than with prose:

remoteSource  | video | audio
-----|------- | -------------
false | RTCLocalVideoStreamTrackStats | RTCLocalAudioStreamTrackStats 
true | RTCRemoteVideoStreamTrackStats | RTCRemoteAudioStreamTrackStats

dictionary RTCMediaStreamTrackStats : RTCStats {
    DOMString           trackIdentifier;
    boolean             ended;
    boolean             detached;
    DOMString           kind;
    RTCPriorityType     priority;
dictionary RTCVideoStreamTrackStats : RTCMediaStreamTrackStats {
    unsigned long       frameWidth;
    unsigned long       frameHeight;
    double              framesPerSecond;

dictionary RTCLocalVideoStreamTrackStats : RTCVideoStreamTrackStats {
    unsigned long       framesSent;
    unsigned long       framesCaptured;

dictionary RTCRemoteVideoStreamTrackStats : RTCVideoStreamTrackStats {
    DOMHighResTimeStamp estimatedPlayoutTimestamp;
    unsigned long       framesReceived;
    unsigned long       framesDecoded;
    unsigned long       framesDropped;
    unsigned long       framesCorrupted;
    unsigned long       partialFramesLost;
    unsigned long       fullFramesLost;

dictionary RTCAudioStreamTrackStats : RTCMediaStreamTrackStats {
    double              audioLevel;
    double              totalAudioEnergy;
    boolean             voiceActivityFlag;
    unsigned long long  totalSamplesReceived;
    double              totalSamplesDuration;

dictionary RTCLocalAudioStreamTrackStats : RTCAudioStreamTrackStats {
    double              echoReturnLoss;
    double              echoReturnLossEnhancement;
    unsigned long long  totalSamplesSent;

dictionary RTCRemoteAudioStreamTrackStats : RTCAudioStreamTrackStats {
    DOMHighResTimeStamp estimatedPlayoutTimestamp;
    unsigned long long  concealedSamples;
    unsigned long long  concealmentEvents;
    double              jitterBufferDelay;

If I got some wrong, I blame the prose for being vague.

Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/230 using your GitHub account
Received on Monday, 10 July 2017 23:10:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:40 UTC