Skip to content

Commit 1f102f5

Browse files
committed
fix fake screenshare resolution
1 parent c9383eb commit 1f102f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/screenshare.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ webrtcperf.setupFakeScreenshare = ({
55
slides = 4,
66
delay = 15000,
77
animationDuration = 1000,
8-
width = window.innerWidth,
9-
height = window.innerHeight,
8+
width = 1920,
9+
height = 1080,
1010
} = {}) => {
1111
if (document.querySelector('#webrtcperf-fake-screenshare')) {
1212
return
@@ -39,7 +39,7 @@ webrtcperf.setupFakeScreenshare = ({
3939
wrapper.setAttribute('id', 'webrtcperf-fake-screenshare')
4040
wrapper.setAttribute(
4141
'style',
42-
'position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; z-index: -1; background-color: black; isolation: isolate; transform-style: flat;',
42+
`position: fixed; top: 0; left: 0; width: ${width}; height: ${height}; z-index: -1; background-color: black; isolation: isolate; transform-style: flat;`,
4343
)
4444
document.body.appendChild(wrapper)
4545
window.GET_DISPLAY_MEDIA_CROP = '#webrtcperf-fake-screenshare'

0 commit comments

Comments
 (0)