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
|
@ -178,3 +178,15 @@ export const screenSharingLocalStreamStore = derived<Readable<MediaStreamConstra
|
|||
}
|
||||
})();
|
||||
});
|
||||
|
||||
/**
|
||||
* A store containing whether the screen sharing button should be displayed or hidden.
|
||||
*/
|
||||
export const screenSharingAvailableStore = derived(peerStore, ($peerStore, set) => {
|
||||
if (!navigator.getDisplayMedia && !navigator.mediaDevices.getDisplayMedia) {
|
||||
set(false);
|
||||
return;
|
||||
}
|
||||
|
||||
set($peerStore.size !== 0);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue