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

Combined Fixes from PR #644, #640, and #618 #647

Merged
merged 28 commits into from
May 30, 2024

Conversation

abdelaziz-mahdy
Copy link
Member

@abdelaziz-mahdy abdelaziz-mahdy commented Dec 17, 2023

This pull request combines changes from several individual pull requests to avoid merge conflicts. The included pull requests are as follows:

feel free to merge this incase all is good

summary

Overview:
This pull request introduces a series of enhancements and bug fixes to the video player controls, improving the overall user experience and responsiveness. Key areas of focus include widget width handling, gesture detection, and the double-tap seek UI, along with a new feature for mouse visibility control.

Fixes and Enhancements:

  1. Widget Width Handling Issue:

    • Problem: Inaccurate control scaling due to using MediaQuery for deriving control widths, causing issues in non-full-screen modes.
    • Fix: Implemented LayoutBuilder for dynamic width acquisition, ensuring correct sizing and positioning of controls in various player sizes.
  2. Gesture Detection Delay:

    • Problem: Delay in gesture detection impacting immediate control responsiveness.
    • Fix: Segmented logic and immediate touch event listener akin to YouTube's approach for faster control display on touch.
  3. Double Tap Seek UI Adjustment:

    • Problem: Overlapping of double-tap-to-seek function with normal interaction areas.
    • Fix: Segmented layout (2,1,2 ratio) with double-tap-to-seek on sides and regular taps in the center, mirroring YouTube's UI for clear differentiation and intuitive use. can be edited by developers
  4. Seek Button Visibility Issue:

    • Problem: Seek buttons hidden yet clickable due to conflicting _hideSeekForwardButton and _mountSeekForwardButton states.
    • Fix: implemented animated opacity with timers for consistent behavior.

New Feature:

  • Hide Mouse on Controls Removal:
    • Addition: New hideMouseOnControlsRemoval property in MaterialDesktopVideoControlsThemeData.
    • Functionality: Hides mouse cursor when video controls are removed, offering a cleaner full-screen video experience.
    • Default Behavior: Set to false to maintain backward compatibility.
    • Windows: auto hide mouse #618 (comment)
      Usage Example:
MaterialDesktopVideoControlsThemeData(
  // ... other properties ...
  hideMouseOnControlsRemoval: true,
)

This pull request collectively addresses various aspects of video player control usability, enhancing both the aesthetic and functional experience for end-users.

@user1121114685
Copy link

Great update, it happens to be related to double-clicking. Can I take the liberty of asking a question? I want to customize the double-click function and use double-click to pause playback. Can I only modify the source code?

@abdelaziz-mahdy
Copy link
Member Author

Great update, it happens to be related to double-clicking. Can I take the liberty of asking a question? I want to customize the double-click function and use double-click to pause playback. Can I only modify the source code?

sadly for this you will need to implement your own controls

@user1121114685
Copy link

Great update, it happens to be related to double-clicking. Can I take the liberty of asking a question? I want to customize the double-click function and use double-click to pause playback. Can I only modify the source code?

sadly for this you will need to implement your own controls

thank you for your reply,this is a good idea

@abdelaziz-mahdy
Copy link
Member Author

since i am using this branch on my own app i added the tap to pause and play using the #742 which is showing in the commits

and the padding under bottom: 16.0 + subtitleVerticalShiftOffset, to be able to use the slider since it was overlayed

Copy link
Contributor

@moffatman moffatman left a comment

Choose a reason for hiding this comment

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

LGTM

@abdelaziz-mahdy abdelaziz-mahdy merged commit 3554c60 into media-kit:main May 30, 2024
19 checks passed
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.

None yet

4 participants