summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/mediacapture-streams/message-enumerateddevices-nogum.js
blob: 3a503e0ce5fedf0a6f85b2b09e6e921e85f92ed5 (plain)
1
2
3
4
5
6
onmessage = async e => {
  const devices = await navigator.mediaDevices.enumerateDevices();
  e.source.postMessage({
    devices: devices.map(d => d.toJSON())
  }, '*');
}