Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix controllers disappearing #1197

Closed
wants to merge 1 commit into from

Conversation

felipeerias
Copy link
Collaborator

This fixes a bug with video websites like https://www.ixigua.com/

The following sequence of steps:

  • enter fullscreen mode
  • leave fullscreen mode
  • play the video

left the app in an unusable state because the controllers became hidden and the user was not able to get them to appear again.

The cause was that when the page first enters fullscreen mode, NavigationBarWidget.onFullScreen added a listener to the window which would wait for the current video to become available and would then update the UI for fullscreen mode.

That listener was not being removed when the page left fullscreen mode, so when the user played the video later on, the listener would get
activated and would try to transition the UI to fullscreen mode.
This was leaving the app in an inconsistent state so clicks on the
background were being ignored (onWorldClick).

The fix is to ensure that the window listener is removed when the page
leavs fullscreen mode.

Just in case, onWorldClick will make the controllers visible by default.

Fixes #1181

This fixes a bug with video websites like https://www.ixigua.com/

The following sequence of steps:

- enter fullscreen mode
- leave fullscreen mode
- play the video

left the app in an unusable state because the controllers became hidden
and the user was not able to get them to appear again.

The cause was that when the page first enters fullscreen mode,
`NavigationBarWidget.onFullScreen` added a listener to the window
which would wait for the current video to become available
and would then update the UI for fullscreen mode.

That listener was not being removed when the page left fullscreen mode,
so when the user played the video later on, the listener would get
 activated and would try to transition the UI to fullscreen mode.
 This was leaving the app in an inconsistent state so clicks on the
 background were being ignored (`onWorldClick`).

 The fix is to ensure that the window listener is removed when the page
 leavs fullscreen mode.

 Just in case, `onWorldClick` will make the controllers visible by default.

 Fixes #1181
@felipeerias felipeerias force-pushed the felipeerias/disappearingControllers branch from 353b1fd to 41d6bd5 Compare January 23, 2024 06:37
Copy link
Collaborator

@HollowMan6 HollowMan6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. However, I would suggest that we still merge #1192 as a root fix to have an additional layer of safety. onVideoAvailabilityChanged doesn't guarantee that we are in full-screen mode, so we should still check and make sure we are in full-screen before we call onEnterFullScreen, which can avoid further issues if later we want to reuse onFullscreenVideoWindowListener or have more branches (should be safe still even if we don't call removeWindowListener)

@svillar
Copy link
Member

svillar commented Jan 23, 2024

Looks great, but I am not sure if we should land this because I've been revamping the way fullscreen works (as it's very convoluted) and I don't think these fixes are needed. I'll upload it ASAP and we could decide later.

@svillar
Copy link
Member

svillar commented Jan 23, 2024

See #1198

@svillar
Copy link
Member

svillar commented Jan 24, 2024

Let's close this in favour of #1198

@svillar svillar closed this Jan 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Controllers disappear during video playback
3 participants