Skip to content

UI adjustments & video_player new features#604

Open
chwps wants to merge 8 commits into
Moonfin-Client:mainfrom
chwps:ui-adjustments
Open

UI adjustments & video_player new features#604
chwps wants to merge 8 commits into
Moonfin-Client:mainfrom
chwps:ui-adjustments

Conversation

@chwps

@chwps chwps commented Jun 21, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Summary

This PR introduces several quality-of-life improvements and fixes to the Video Player. Updates include a smarter "Next Up" logic that protects post-credits scenes, auto-hiding behavior for skip widgets, and UI adjustments to ensure transport controls remain perfectly centered across all states. It also addresses a controls overlay bug specific to the web platform.

Type of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • UI/UX update
  • Documentation update
  • Build/CI change
  • Other (describe):

Changes Made

UI Adjustments:

  • Centered Transport Controls: Introduced a hasAnyNavigation logic. The previous/next queue arrows are now always rendered in the layout (grayed out when unavailable). This prevents layout shifts and ensures the center transport controls (Play/Pause, Seek forward/backward) remain perfectly centered on screen.
  • Overlay Positioning: Refined the vertical alignment of the Skip and Next Up widgets. Previously too high on mobile and too low on desktop, now optimized per platform ratio (Desktop: 140.0, Mobile: 100.0, TV: 190.0). (Not tested on every devices)

New Features:

  • Auto-Hide Prompts: "Skip Intro/Outro" and "Next Up" widgets now automatically hide after 10 seconds of playback. They reappear if the user brings up the controls overlay.
  • Post-Credits Scene Protection: The "Replace Skip Outro with Next Up" feature now checks for remaining video duration. If content exists after the outro segment, it falls back to the standard "Skip Outro" button to prevent users from missing post-credits scenes.
  • New Setting: Added a dependent setting ("Next Up Ignore Remaining Content") to allow users to bypass the post-credits protection and force the Next Up overlay if preferred.

Bug Fixes:

  • Web Interface: Fixed an issue where clicking directly on the video player failed to dismiss the controls overlay.

Platform

  • Android
  • iOS
  • tvOS
  • Web
  • macOS
  • Windows
  • Linux
  • All / Shared code

Testing

Describe how this change was tested.

  • Tested on emulator / simulator
  • Tested on physical device
  • Manual testing completed
  • Not tested (explain why):

Test Steps

  1. Navigate through media with and without previous/next queue items to verify transport control centering.
  2. Trigger outro segments with and without post-credits content to test the new Next Up protection logic.
  3. Verify the new dependent setting toggles correctly in the settings panel.
  4. Let the Skip/Next Up overlays time out (10s) and verify they reappear with the controls overlay.
  5. (Web) Click on the video surface to ensure the controls overlay dismisses properly.

Checklist

  • Code builds successfully
  • Code follows project style and conventions
  • No unnecessary commented-out code
  • No new warnings introduced

chwps added 7 commits June 20, 2026 13:07
…anDown disabled due to interference with onTap on desktop
…e interacted with in the controls overlay after this. & Height adapted for mobile and tv interfaces
…content after outro, if there is, standard skip outro button will show. New setting for user to force next_up button in all cases
@mattsigal

Copy link
Copy Markdown
Contributor

"Auto-Hide Prompts: "Skip Intro/Outro" and "Next Up" widgets now automatically hide after 10 seconds of playback. They reappear if the user brings up the controls overlay." -- There is already a setting for Next Up: "Next Up Timeout" which should be respected beyond the 10 seconds.

@chwps

chwps commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Even if it's hidden from the player screen, the countdown will still continue, it's just to not have the widget always on screen if you want to see the media playing during this time. But you're absolutely right for Next Up setting, for Skip Intro/Outro however there were no such settings.

@mattsigal

Copy link
Copy Markdown
Contributor

Yes, that is what I was getting at - for the opening/closing credits, the hide/show behaviour is probably good (e.g., a 2-minute long opening credits sequence, might want to watch part of it then skip); but for the Next Up display which triggers after playback has ended, it shouldn't disappear since it is the only thing active on the screen.

@chwps

chwps commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

You are right I totally forgot about that. What do you think about this fix? It checks if it's at the end of the media with a margin of 2sec and if it is it doesn't launch the timer:

Old code:


  // Launch auto-hide timer (10s) for SkipSegment.
  void _startSkipSegmentAutoHide() {
    _skipSegmentHideTimer?.cancel();
    if (_skipSegment == null) return;
    _skipSegmentHideTimer = Timer(const Duration(seconds: 10), () {
      if (mounted) {
        setState(() => _skipSegmentAutoHidden = true);
      }
    });
  }

  // Launch auto-hide timer (10s) for NextUp.
  void _startNextUpAutoHide() {
    _nextUpHideTimer?.cancel();
    if (_showNextUp == false || _nextUpItem == null) return;
    _nextUpHideTimer = Timer(const Duration(seconds: 10), () {
      if (mounted) {
        setState(() => _nextUpAutoHidden = true);
      }
    });
  }

New code:


  // Launch auto-hide timer (10s) for NextUp.
  void _startNextUpAutoHide() {
    _nextUpHideTimer?.cancel();
    if (_showNextUp == false || _nextUpItem == null) return;

    final duration = _state.duration;
    final position = _state.position;

    if (duration > Duration.zero) {
      final remaining = duration - position;
      if (remaining <= const Duration(seconds: 2)) {
        return; 
      }
    }
    _nextUpHideTimer = Timer(const Duration(seconds: 10), () {
      if (mounted) {
        setState(() => _nextUpAutoHidden = true);
      }
    });
  }

Tried it and it works, I also corrected the comments that were in French sorry.

@mattsigal

Copy link
Copy Markdown
Contributor

I'm just providing some input but it is up to @RadicalMuffinMan to review the PR and see if he agrees.

I still don't think your new logic works perfectly though -- since many users use the "Replace Skip Outro with Next Up Display" toggle which will trigger outside of the interval you've indicated. The auto-hide should simply never apply to the Next Up display, regardless of when it triggers.

@chwps

chwps commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

Ok I see! My logic was just to hide the big widget that was in the middle of the screen (especially on mobile) just so you can watch the outro in the meantime (I know you can use the minimal one that's smaller).
Since it will always trigger the skip when the countdown finishes, even if it's hidden, and since it reappears with the controls overlay anyway.

But I totally understand your way of seeing it.
Thank you for your insight, I really appreciate it, let's see what @RadicalMuffinMan says!

@mattsigal

Copy link
Copy Markdown
Contributor

If you don't want to see the big widget, you should leave the "Replace Skip Outro with Next Up Display" setting off. Then during the outro, you would only get a small "Skip Outro?" popup. That's the whole point of that setting.

@chwps

chwps commented Jun 21, 2026

Copy link
Copy Markdown
Contributor Author

I think some users, like myself, still like to have the countdown of the next_up widget so you don't have to interact with the remote or the screen to first skip_outro and then next_up. But it's a minor inconvenience really, you can call that laziness :)
And the more I think of it, I realize my countdown was less than 10sec anyway, so it would not have the time to hide.

I started to develop it to hide the skip intro/outro button after 10sec and then added it to Next Up to have the same behavior for everything.

Let's see what RadicalMuffinMan says, but I will happily remove this behavior if you two prefer!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants