mirror of
				https://github.com/yattee/yattee.git
				synced 2025-11-04 06:32:03 +00:00 
			
		
		
		
	Fix player size handling
This commit is contained in:
		@@ -49,14 +49,20 @@ struct VideoPlayerView: View {
 | 
			
		||||
            .onOpenURL { OpenURLHandler(accounts: accounts, player: player).handle($0) }
 | 
			
		||||
            .frame(minWidth: 950, minHeight: 700)
 | 
			
		||||
        #else
 | 
			
		||||
            GeometryReader { geometry in
 | 
			
		||||
                HStack(spacing: 0) {
 | 
			
		||||
                    content
 | 
			
		||||
                        .onAppear {
 | 
			
		||||
                            playerSize = geometry.size
 | 
			
		||||
 | 
			
		||||
                            #if os(iOS)
 | 
			
		||||
                                configureOrientationUpdatesBasedOnAccelerometer()
 | 
			
		||||
                            #endif
 | 
			
		||||
                        }
 | 
			
		||||
                }
 | 
			
		||||
                .onChange(of: geometry.size) { size in
 | 
			
		||||
                    self.playerSize = size
 | 
			
		||||
                }
 | 
			
		||||
                .onChange(of: fullScreenDetails) { value in
 | 
			
		||||
                    player.backend.setNeedsDrawing(!value)
 | 
			
		||||
                }
 | 
			
		||||
@@ -79,6 +85,7 @@ struct VideoPlayerView: View {
 | 
			
		||||
                    motionManager = nil
 | 
			
		||||
                }
 | 
			
		||||
                #endif
 | 
			
		||||
            }
 | 
			
		||||
        #endif
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user