настройки демонстрации экрана

This commit is contained in:
2026-07-25 16:58:02 +06:00
parent fa1985c99c
commit 8c883d5481
8 changed files with 175 additions and 64 deletions

View File

@@ -9,12 +9,11 @@ export const useDevices = createGlobalState(() => {
audioOutputs,
} = useDevicesList()
async function getShareStream(fps = 30) {
async function getShareStream(fps = 30, resolution = 1080) {
return navigator.mediaDevices.getDisplayMedia({
audio: false,
video: {
width: { max: 1920 },
height: { max: 1080 },
height: { max: resolution },
displaySurface: 'monitor',
frameRate: { ideal: fps, max: fps },
},