<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>173081</bug_id>
          
          <creation_ts>2017-06-07 15:52:34 -0700</creation_ts>
          <short_desc>navigator.mediaDevices should be instance of EventTarget</short_desc>
          <delta_ts>2021-03-16 19:26:50 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>New Bugs</component>
          <version>Safari Technology Preview</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.12</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>187575</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Stefan Fochler">stefanf</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ashvayka</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jeremyj-wk</cc>
    
    <cc>jer.noble</cc>
    
    <cc>stefanf</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>youennf</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1316692</commentid>
    <comment_count>0</comment_count>
    <who name="Stefan Fochler">stefanf</who>
    <bug_when>2017-06-07 15:52:34 -0700</bug_when>
    <thetext>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&apos;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 &quot;devicechange&quot; event.

Build Date &amp; Hardware:
Safari TP 33 on macOS 10.12.5</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1317189</commentid>
    <comment_count>1</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2017-06-08 21:46:03 -0700</bug_when>
    <thetext>&lt;rdar://problem/32666694&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1740352</commentid>
    <comment_count>2</comment_count>
    <who name="Alexey Shvayka">ashvayka</who>
    <bug_when>2021-03-16 19:26:50 -0700</bug_when>
    <thetext>r233761 fixed `navigator.mediaDevices` to extend EventTarget.

*** This bug has been marked as a duplicate of bug 187575 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>