The share screen button is now displayed only when screen sharing makes sense.
Also, fixed the button not aligned bug
This commit is contained in:
parent
dd428bc1e1
commit
4c4f310b79
3 changed files with 30 additions and 3 deletions
|
@ -12,7 +12,11 @@ import {
|
|||
requestedCameraState,
|
||||
requestedMicrophoneState
|
||||
} from "../Stores/MediaStore";
|
||||
import {requestedScreenSharingState, screenSharingLocalStreamStore} from "../Stores/ScreenSharingStore";
|
||||
import {
|
||||
requestedScreenSharingState,
|
||||
screenSharingAvailableStore,
|
||||
screenSharingLocalStreamStore
|
||||
} from "../Stores/ScreenSharingStore";
|
||||
|
||||
declare const navigator:any; // eslint-disable-line @typescript-eslint/no-explicit-any
|
||||
|
||||
|
@ -211,6 +215,14 @@ export class MediaManager {
|
|||
}
|
||||
|
||||
});
|
||||
|
||||
screenSharingAvailableStore.subscribe((available) => {
|
||||
if (available) {
|
||||
document.querySelector('.btn-monitor')?.classList.remove('hide');
|
||||
} else {
|
||||
document.querySelector('.btn-monitor')?.classList.add('hide');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public updateScene(){
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue