This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 25189 - Mandatory errorCallback is missing in examples for getStats.
Summary: Mandatory errorCallback is missing in examples for getStats.
Status: RESOLVED FIXED
Alias: None
Product: WebRTC Working Group
Classification: Unclassified
Component: WebRTC API (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Web RTC Working Group
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-28 08:53 UTC by Kiran
Modified: 2014-06-09 08:38 UTC (History)
2 users (show)

See Also:


Attachments

Description Kiran 2014-03-28 08:53:16 UTC
errorCallback is mandatory for getStats. But errorCallback is missing in examples while calling getStats in section 7.7, Example 1.

pc.getStats(selector, function (report) {
    baselineReport = report;
});

pc.getStats(selector, function (report) {
        currentReport = report;
        processStats();
    });

should be like

pc.getStats(selector, function (report) {
    baselineReport = report;
},logError);

pc.getStats(selector, function (report) {
        currentReport = report;
        processStats();
    }, logError);

References:
[1] http://dev.w3.org/2011/webrtc/editor/webrtc.html
[2] http://www.w3.org/TR/webrtc/
Comment 1 Adam Bergkvist 2014-06-09 08:38:27 UTC
Thanks for spotting this.

We might need to take a closer look at the stats examples to see if they still are valid.

Proposed fix: https://github.com/fluffy/webrtc-w3c/commit/7e3b3d724afc19bc82b3ad622319947655888233