Refactoring layoutManagerActionStore. It now supports an uuid field.

layoutManagerVisibilityStore is now a derived field from layoutManagerActionStore.
This commit is contained in:
David Négrier 2021-08-05 11:19:28 +02:00
parent 92fee33b64
commit 87e4367455
4 changed files with 42 additions and 53 deletions

View file

@ -25,15 +25,18 @@ export class MediaManager {
if (result.type === "error") {
console.error(result.error);
layoutManagerActionStore.addAction({
uuid: "cameraAccessDenied",
type: "warning",
message: "Camera access denied. Click here and check your browser permissions.",
callback: () => {
helpCameraSettingsVisibleStore.set(true);
layoutManagerVisibilityStore.set(false);
},
userInputManager: this.userInputManager,
});
layoutManagerVisibilityStore.set(true);
//remove it after 10 sec
setTimeout(() => {
layoutManagerActionStore.removeAction("cameraAccessDenied");
}, 10000);
return;
}
});
@ -42,15 +45,18 @@ export class MediaManager {
if (result.type === "error") {
console.error(result.error);
layoutManagerActionStore.addAction({
uuid: "screenSharingAccessDenied",
type: "warning",
message: "Screen sharing denied. Click here and check your browser permissions.",
callback: () => {
helpCameraSettingsVisibleStore.set(true);
layoutManagerVisibilityStore.set(false);
},
userInputManager: this.userInputManager,
});
layoutManagerVisibilityStore.set(true);
//remove it after 10 sec
setTimeout(() => {
layoutManagerActionStore.removeAction("screenSharingAccessDenied");
}, 10000);
return;
}
});