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

use maplike instead of Object.keys in getStats #851

Merged
merged 5 commits into from Dec 13, 2016

Conversation

fippo
Copy link
Collaborator

@fippo fippo commented Dec 8, 2016

this uses the maplike syntax instead of the older Object.keys() iteration. Maplike is shimmed by adapter for Chrome.

Code is similar to http://w3c.github.io/webrtc-pc/#example

this uses the newer maplike style instead of the older Object.keys()
this uses the newer maplike style instead of the older Object.keys()
this uses the newer maplike style instead of the older Object.keys()
statsString += '<h3>Report ';
statsString += index;
statsString += res.type;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the type field really the same as the index from the previous iteration?
(just reassure me....)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hah. I wanted to point out that change. I don't think it makes sense to have a numeric index here. I tried the report id but that got very long and ugly

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@KaptenJansson as samples-maintainer, does this make sense for you?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it a little confusing that we are adding the type to statsString twice. Maybe add a comment to why?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed the output format slightly in 486ee45 -- now type, timestamp and id are special

@fippo
Copy link
Collaborator Author

fippo commented Dec 8, 2016

@jan-ivar can you please take a look whether this is what we want to show?

@jan-ivar
Copy link
Member

jan-ivar commented Dec 8, 2016

Lgtm.

Copy link
Contributor

@KaptenJansson KaptenJansson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KaptenJansson KaptenJansson merged commit c8c52c4 into webrtc:gh-pages Dec 13, 2016
@fippo fippo deleted the maplike branch December 13, 2016 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants