latest dev
This commit is contained in:
@@ -12,6 +12,7 @@ import { gameOverlayVisibilityStore } from "../Stores/GameOverlayStoreVisibility
|
||||
import { layoutManagerActionStore, layoutManagerVisibilityStore } from "../Stores/LayoutManagerStore";
|
||||
import { get } from "svelte/store";
|
||||
import { localUserStore } from "../Connexion/LocalUserStore";
|
||||
import { MediaStreamConstraintsError } from "../Stores/Errors/MediaStreamConstraintsError";
|
||||
|
||||
export class MediaManager {
|
||||
startScreenSharingCallBacks: Set<StartScreenSharingCallback> = new Set<StartScreenSharingCallback>();
|
||||
@@ -24,16 +25,17 @@ export class MediaManager {
|
||||
constructor() {
|
||||
localStreamStore.subscribe((result) => {
|
||||
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);
|
||||
},
|
||||
userInputManager: this.userInputManager,
|
||||
});
|
||||
if (result.error.name !== MediaStreamConstraintsError.NAME) {
|
||||
layoutManagerActionStore.addAction({
|
||||
uuid: "cameraAccessDenied",
|
||||
type: "warning",
|
||||
message: "Camera access denied. Click here and check your browser permissions.",
|
||||
callback: () => {
|
||||
helpCameraSettingsVisibleStore.set(true);
|
||||
},
|
||||
userInputManager: this.userInputManager,
|
||||
});
|
||||
}
|
||||
//remove it after 10 sec
|
||||
setTimeout(() => {
|
||||
layoutManagerActionStore.removeAction("cameraAccessDenied");
|
||||
|
||||
Reference in New Issue
Block a user