Bug 173081

Summary: navigator.mediaDevices should be instance of EventTarget
Product: WebKit Reporter: Stefan Fochler <stefanf>
Component: New BugsAssignee: 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
Reported 2017-06-07 15:52:34 PDT
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
Radar WebKit Bug Importer
Comment 1 2017-06-08 21:46:03 PDT
Alexey Shvayka
Comment 2 2021-03-16 19:26:50 PDT
r233761 fixed `navigator.mediaDevices` to extend EventTarget. *** This bug has been marked as a duplicate of bug 187575 ***
Note You need to log in before you can comment on or make changes to this bug.