File tree Expand file tree Collapse file tree
client/src/features/stream Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -299,11 +299,21 @@ export function useLiveStream({
299299 return ;
300300 }
301301
302+ const display = simulator . privateDisplay ;
303+ const displayKey =
304+ simulator . platform === "android-emulator" && display
305+ ? [
306+ Math . round ( display . displayWidth ) ,
307+ Math . round ( display . displayHeight ) ,
308+ display . rotationQuarterTurns ?? 0 ,
309+ ] . join ( "x" )
310+ : "" ;
302311 const targetKey = [
303312 simulator . udid ,
304313 simulator . platform ?? "" ,
305314 remote ? "remote" : "local" ,
306315 streamTransport ,
316+ displayKey ,
307317 ] . join ( "|" ) ;
308318 if ( connectedStreamTargetKeyRef . current === targetKey ) {
309319 return ;
@@ -327,6 +337,9 @@ export function useLiveStream({
327337 canvasElement ,
328338 simulator ?. isBooted ,
329339 simulator ?. platform ,
340+ simulator ?. privateDisplay ?. displayHeight ,
341+ simulator ?. privateDisplay ?. displayWidth ,
342+ simulator ?. privateDisplay ?. rotationQuarterTurns ,
330343 simulator ?. udid ,
331344 paused ,
332345 remote ,
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ const ANDROID_GRPC_FRAME_MESSAGE_LIMIT: usize = 64 * 1024 * 1024;
2020const ANDROID_TOUCH_IDENTIFIER : i32 = 1 ;
2121const RUNNING_EMULATOR_CACHE_TTL : Duration = Duration :: from_secs ( 2 ) ;
2222const AVD_GRPC_PORT_CACHE_TTL : Duration = Duration :: from_secs ( 60 ) ;
23- const SCREEN_SIZE_CACHE_TTL : Duration = Duration :: from_secs ( 60 ) ;
23+ const SCREEN_SIZE_CACHE_TTL : Duration = Duration :: from_secs ( 1 ) ;
2424const MODIFIER_SHIFT : u32 = 1 << 0 ;
2525const MODIFIER_CONTROL : u32 = 1 << 1 ;
2626const MODIFIER_OPTION : u32 = 1 << 2 ;
You can’t perform that action at this time.
0 commit comments