Bug 186471 - MediaTrackCapabilities.deviceId and groupId are not hashed.
Summary: MediaTrackCapabilities.deviceId and groupId are not hashed.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.13
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-10 01:49 PDT by jianjun.zhu
Modified: 2018-06-12 08:58 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.99 KB, patch)
2018-06-10 01:52 PDT, jianjun.zhu
no flags Details | Formatted Diff | Diff
Patch (7.28 KB, patch)
2018-06-10 23:33 PDT, jianjun.zhu
no flags Details | Formatted Diff | Diff
Patch (7.29 KB, patch)
2018-06-11 18:54 PDT, jianjun.zhu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jianjun.zhu 2018-06-10 01:49:06 PDT
MediaTrackCapabilities.deviceId and groupId are not hashed.
Comment 1 jianjun.zhu 2018-06-10 01:52:03 PDT
Created attachment 342381 [details]
Patch
Comment 2 youenn fablet 2018-06-10 08:26:40 PDT
Can we add a tes validating that track ids match enuerateDevice ids?
Comment 3 jianjun.zhu 2018-06-10 09:00:35 PDT
(In reply to youenn fablet from comment #2)
> Can we add a tes validating that track ids match enuerateDevice ids?

I'll try to add an assertion to MediaStreamTrack-getCapabilities.html.
Comment 4 jianjun.zhu 2018-06-10 23:33:07 PDT
Created attachment 342412 [details]
Patch
Comment 5 Eric Carlson 2018-06-11 09:04:26 PDT
Comment on attachment 342412 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=342412&action=review

Thank you for the fix!

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:47
> +                if(trackKind !== 'audio' && trackKind !== 'video')

Nit: tests typically have a space between "if" and "("

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:51
> +                    if(deviceInfo.deviceId === deviceId && deviceInfo.kind === deviceKind) {

Ditto.

> LayoutTests/fast/mediastream/MediaStreamTrack-getCapabilities.html:89
> +                },e => {

Nit: missing a space between "," and "e"
Comment 6 jianjun.zhu 2018-06-11 18:54:57 PDT
Created attachment 342500 [details]
Patch
Comment 7 Eric Carlson 2018-06-12 07:58:44 PDT
Comment on attachment 342500 [details]
Patch

r=me
Comment 8 Eric Carlson 2018-06-12 08:02:30 PDT
Jianjun - for future reference, a patch doesn't *need* another review once a reviewer give it an "r+". Replace "NOBODY (OOPS!)" with the reviewer's name before you upload the revised patch, mark it "cq?" and any committer can mark it "cq+"
Comment 9 WebKit Commit Bot 2018-06-12 08:28:20 PDT
Comment on attachment 342500 [details]
Patch

Clearing flags on attachment: 342500

Committed r232754: <https://trac.webkit.org/changeset/232754>
Comment 10 WebKit Commit Bot 2018-06-12 08:28:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2018-06-12 08:29:20 PDT
<rdar://problem/41046888>
Comment 12 jianjun.zhu 2018-06-12 08:58:23 PDT
Eric, thanks for reviewing the patch and letting me know the review process.