fix: android tv video controls focus on start

This commit is contained in:
edde746
2026-01-28 23:42:24 +01:00
parent 7e2296b273
commit 4962fd3220
2 changed files with 8 additions and 2 deletions
+2 -2
View File
@@ -1891,8 +1891,8 @@ class VideoPlayerScreenState extends State<VideoPlayerScreen> with WidgetsBindin
builder: (context, hasFrame, child) {
if ((!isBuffering && hasFrame) || _isExiting.value) return const SizedBox.shrink();
// Show spinner only - controls overlay provides its own black background during loading
return IgnorePointer(
child: Positioned.fill(
return Positioned.fill(
child: IgnorePointer(
child: Center(
child: Container(
padding: const EdgeInsets.all(20),
@@ -426,6 +426,12 @@ class _PlexVideoControlsState extends State<PlexVideoControls> with WindowListen
_clickVideoTogglesPlayback = settingsService.getClickVideoTogglesPlayback();
});
// Focus play/pause if navigation is now enabled and controls are visible
// (handles case where initState focus attempt failed due to async settings load)
if (_videoPlayerNavigationEnabled && _showControls) {
_focusPlayPauseIfKeyboardMode();
}
// Apply rotation lock setting
if (_isRotationLocked) {
SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]);