fix: android tv video controls focus on start
This commit is contained in:
@@ -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]);
|
||||
|
||||
Reference in New Issue
Block a user