Permit to change style when getCamera was ready and permission accorded

This commit is contained in:
Gregoire Parant 2021-01-07 10:30:28 +01:00
parent d4c7a20dfa
commit 8c89b5e0b1

View File

@ -209,9 +209,10 @@ export class MediaManager {
}
public enableCamera() {
this.enableCameraStyle();
this.constraintsMedia.video = videoConstraint;
this.getCamera().then((stream: MediaStream) => {
this.enableCameraStyle();
this.triggerUpdatedLocalStreamCallbacks(stream);
});
}
@ -228,10 +229,10 @@ export class MediaManager {
}
public enableMicrophone() {
this.enableMicrophoneStyle();
this.constraintsMedia.audio = true;
this.getCamera().then((stream) => {
this.enableMicrophoneStyle();
this.triggerUpdatedLocalStreamCallbacks(stream);
});
}