Skip to content

Implement refresh rate matching for native player#997

Open
TwoToneEddy wants to merge 3 commits into
DonutWare:developfrom
TwoToneEddy:match-fr
Open

Implement refresh rate matching for native player#997
TwoToneEddy wants to merge 3 commits into
DonutWare:developfrom
TwoToneEddy:match-fr

Conversation

@TwoToneEddy
Copy link
Copy Markdown

Pull Request Description

Ports refresh rate matching from the native Android TV client to Fladder's native player backend on Android. When a video begins playing, the display refresh rate is switched to match the video's frame rate using Surface.setFrameRate() / Window preferred display mode. Playback pauses during the mode switch and resumes automatically once the display has settled. A toggle to enable/disable the feature is added to player settings.

Also fixes a visual artifact on player exit where the video texture was released mid-frame during the pop animation, causing the top-left quadrant of the video to flash briefly in the bottom-right of the UI. closePlayer() now awaits endOfFrame before navigating so the widget tree can rebuild and cleanly detach the texture first.

Tested On

  • Android
  • Android TV
  • iOS
  • Linux
  • Windows
  • macOS
  • Web

Checklist

  • If a new package was added, did you ensure it works for all supported platforms? Is the package well maintained
  • Check that any changes are related to the issue at hand.

The video texture was being released while still visible during the
pop animation. closePlayer() now awaits endOfFrame before navigating
so the widget tree can rebuild first, and the video widget hides
itself when VideoPlayerState.disposed is set.
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.

1 participant