Skip to content
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

Not enough arguments to mozRTCPeerConnection.getStats #1

Open
oleg-ria opened this issue Dec 11, 2014 · 7 comments
Open

Not enough arguments to mozRTCPeerConnection.getStats #1

oleg-ria opened this issue Dec 11, 2014 · 7 comments

Comments

@oleg-ria
Copy link

Hi, in firefox it does not work. Got error "Not enough arguments to mozRTCPeerConnection.getStats". Error fires on line 155

@ulifigueroa
Copy link

That's because in the Firefox implementation the getStats function need to receive a MediaStreamTrack, like this:

peer.getStats(
    mediaStreamTrack,
    function (res) {
        var items = [];
        res.forEach(function (result) {
            items.push(result);
        });
        cb(items);
    },
    cb
);

@ulifigueroa
Copy link

#2

@igorpavlov-zz
Copy link

+1

@ulifigueroa
Copy link

@muaz-khan you should close this issue and pull request #2 since you already pushed the change to the master branch.

@simkesd
Copy link

simkesd commented Jan 5, 2018

@ulifigueroa How did this work out for you?

From my understanding window.getStats from this library is actually calculating and returning stats that cover both audio/video (at least for Chrome). Aren't you restricting it to just single track (audio or video)?

@ulifigueroa
Copy link

@simkesd I'm sorry, I don't know, I posted this fix in 2015 so probably it's not up to date

@bFraley
Copy link

bFraley commented Feb 1, 2018

I'm working on an RTC stats UI for an application and came across this project, and this issue. For others, and contributors who want to look at updating this project:

The current Chrome implementation is RTCPeerConnection.getStats with info here: https://www.chromestatus.com/feature/5665052275245056

Mozilla uses the RTCStatsReport interface that provides a variety of RTC connection information and is documented here: https://developer.mozilla.org/en-US/docs/Web/API/RTCStatsReport

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants