File tree Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Expand file tree Collapse file tree 3 files changed +27
-4
lines changed Original file line number Diff line number Diff line change 11window . appSettings = {
2- relayUrl : 'https://timetravel.moqtail.dev:4445 ' ,
2+ relayUrl : 'https://localhost:4433 ' ,
33 wsUrl : 'http://localhost:3001' ,
44 wsPath : '/ws' ,
55 posthog_host : 'https://eu.i.posthog.com' ,
@@ -53,4 +53,12 @@ window.appSettings = {
5353 targetLatencyMs : 100 ,
5454 maxLatencyMs : 1000 ,
5555 } ,
56+ canvasResolutionConfig : {
57+ screenshare : {
58+ defaultWidth : 1280 ,
59+ defaultHeight : 720 ,
60+ maxWidth : 2560 ,
61+ maxHeight : 1440 ,
62+ } ,
63+ } ,
5664}
Original file line number Diff line number Diff line change @@ -2134,12 +2134,19 @@ function SessionPage() {
21342134 const screenHeight = window . innerHeight
21352135 const dpr = window . devicePixelRatio || 1
21362136
2137- const maxWidth = Math . min ( screenWidth * dpr , 2560 )
2138- const maxHeight = Math . min ( screenHeight * dpr , 1440 )
2137+ const maxWidth = Math . min ( screenWidth * dpr , window . appSettings . canvasResolutionConfig . screenshare . maxWidth )
2138+ const maxHeight = Math . min (
2139+ screenHeight * dpr ,
2140+ window . appSettings . canvasResolutionConfig . screenshare . maxHeight ,
2141+ )
21392142
21402143 resizeCanvasWorker ( canvasRef . current , maxWidth , maxHeight )
21412144 } else {
2142- resizeCanvasWorker ( canvasRef . current , 1280 , 720 )
2145+ resizeCanvasWorker (
2146+ canvasRef . current ,
2147+ window . appSettings . canvasResolutionConfig . screenshare . defaultWidth ,
2148+ window . appSettings . canvasResolutionConfig . screenshare . defaultHeight ,
2149+ )
21432150 }
21442151 }
21452152 } )
Original file line number Diff line number Diff line change @@ -35,4 +35,12 @@ export interface AppSettings {
3535 targetLatencyMs : number
3636 maxLatencyMs : number
3737 }
38+ canvasResolutionConfig : {
39+ screenshare : {
40+ defaultWidth : number
41+ defaultHeight : number
42+ maxWidth : number
43+ maxHeight : number
44+ }
45+ }
3846}
You can’t perform that action at this time.
0 commit comments