Bug 173081
| Summary: | navigator.mediaDevices should be instance of EventTarget | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Stefan Fochler <stefanf> |
| Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ashvayka, eric.carlson, jeremyj-wk, jer.noble, stefanf, webkit-bug-importer, youennf |
| Priority: | P2 | Keywords: | InRadar |
| Version: | Safari Technology Preview | ||
| Hardware: | Mac | ||
| OS: | macOS 10.12 | ||
Stefan Fochler
Overview:
navigator.mediaDevices does not implement EventTarget, although the current Media Capture specification draft states (in the WebIDL section below https://w3c.github.io/mediacapture-main/#mediadevices), that MediaDevices and thus navigator.mediaDevices inherits from the EventTarget.
Steps to Reproduce:
1. Open the Web Inspector on any page
2. Try using the EventTarget's methods (addEventListener...) on navigator.mediaDevices
Actual Result:
The desired methods are not available. navigator.mediaDevices instanceof EventTarget === false
Expected Result:
One can use addEventListener and removeEventListener to listen for the "devicechange" event.
Build Date & Hardware:
Safari TP 33 on macOS 10.12.5
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/32666694>
Alexey Shvayka
r233761 fixed `navigator.mediaDevices` to extend EventTarget.
*** This bug has been marked as a duplicate of bug 187575 ***