Skip to content

Commit 9106d5d

Browse files
authored
Merge pull request #7 from phistuck/patch-1
Switched to the promise based getUserMedia
2 parents 45ecfc5 + a87a15e commit 9106d5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/clapper.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class ClapperPlugin {
161161
this.freqData = new Uint8Array(this.analyser.frequencyBinCount);
162162
this.log.debug(this.l('Starting clap detection'));
163163
this._started = true;
164-
navigator.getUserMedia({ audio: true }, handleStream, (e) => {
164+
navigator.mediaDevices.getUserMedia({ audio: true }).then(handleStream, (e) => {
165165
this.log.error(this.l('Could not get audio stream'), e);
166166
});
167167
}

0 commit comments

Comments
 (0)