TheWidlarzGroup / react-native-video

A <Video /> component for react-native
https://thewidlarzgroup.github.io/react-native-video/
MIT License
7.2k stars 2.9k forks source link

[windows] The fullscreen mode activates native player controls #3451

Closed Victor0814gui closed 2 weeks ago

Victor0814gui commented 10 months ago

Bug

The issue arises when using the fullscreen method on Windows, as the native controls overlay my video player, and this is definitely not ideal for the end user.

The native method is:

void ReactVideoView::Set_FullScreen(bool fullScreen) {
  m_fullScreen = fullScreen;
  IsFullWindow(m_fullScreen);

  if (m_fullScreen) {
    Set_Controls(true); // full window will always have transport control enabled
  }
}

Specifically, the excerpt:

if (m_fullScreen) {
  Set_Controls(true); // full window will always have transport control enabled
}

Is there any underlying rationale behind this behavior?

Platform

Which player are you experiencing the problem on:

KrzysztofMoch commented 10 months ago

Hey @Victor0814gui, but isn't showing controls in full screen the default behaviour ? (can't test it because I don't have windows)

Victor0814gui commented 10 months ago

I believe so, but only if customizing the controls isn't an option. There are some flows that I've considered, such as:

without custom controls: with custom controls:
The flow works normally as expected: When exiting fullscreen, the player reverts to native controls:
V https://github.com/react-native-video/react-native-video/assets/92493696/7742e07b-e5a2-4d1b-b573-39130ab79c3f

I ran some tests, and what resolved it was this. It seems that the ideal solution would be to use:

       ApplicationView view = ApplicationView::GetForCurrentView();
       view.IsFullScreenMode();

What would change the screen behavior to fullscreen and not the player, but I believe this would require a more elaborate planning.

For now, I'm using the 'react-native-custom-window' library that adds the 'fullscreen' property to the screen, and this way, I can display my customized controls. However, this doesn't seem very practical to me in terms of multiplatform usage

github-actions[bot] commented 1 month ago

This issue is stale because it has been open for 30 days with no activity. If there won't be any activity in the next 14 days, this issue will be closed automatically.

github-actions[bot] commented 2 weeks ago

This issue was closed because it has been inactive for 14 days since being marked as stale.