Skip to content

Commit

Permalink
Merge pull request #846 from webmixedreality/enumerate-devices
Browse files Browse the repository at this point in the history
Add navigator.mediaDevices.enumerateDevices
  • Loading branch information
Avaer Kazmer authored Mar 11, 2019
2 parents aecb23f + b9ead27 commit 88d5da0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Window.js
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,18 @@ const _makeWindow = (options = {}, parent = null, top = null) => {
return Promise.reject(new Error('constraints not met'));
}
},
enumerateDevices() {
let deviceIds = 0;
let groupIds = 0;
return Promise.resolve([
{
deviceId: (++deviceIds) + '',
groupId: (++groupIds) + '',
kind: 'audioinput',
label: 'Microphone',
},
]);
},
},
getVRDisplaysSync() {
const result = [];
Expand Down

0 comments on commit 88d5da0

Please sign in to comment.