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

[BUG] #809

Closed
admarwick opened this issue Nov 12, 2021 · 1 comment
Closed

[BUG] #809

admarwick opened this issue Nov 12, 2021 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@admarwick
Copy link
Contributor

History check
I didn't find anything relevant in previous issues.

Describe the bug
A render error occurs on Android when using the default controls and a portrait-format video in a layout that renders better_player to be less than 240 pixels wide.

The cause is that the Row created in better_player_material_controls.dart, in the method _buildMiddleRow, consists of 3 widgets built from Container widgets with BoxConstraints whose max width is 80. When that row of controls is laid out, each of those widgets takes up their maximum size, i.e. 80 pixels. A render error therefore occurs if the video's width is less than 240 pixels.

The fix is to wrap each of those 3 widgets in an Expanded which causes them to reduce their size to the available space. Testing shows that this works.

Flutter doctor

[✓] Flutter (Channel stable, 2.5.3, on macOS 11.6 20G165 darwin-x64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
[✓] Xcode - develop for iOS and macOS
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] IntelliJ IDEA Community Edition (version 2021.1.2)
[✓] VS Code (version 1.58.2)
[✓] Connected device (3 available)

• No issues found!

Better Player version

  • Version: 0.0.79

Smartphone (please complete the following information):

  • Device: Samsung Galaxy SM-G960U1
  • OS: Android 10

Additional context
Work Around: If the skip controls are not needed, setting enableSkips to false in BetterPlayerControlsConfiguration avoids the problem because then the middle row of controls contains only one widget.

@admarwick admarwick added the new issue New issue which has not been checked yet label Nov 12, 2021
@jhomlala
Copy link
Owner

Fixed.

@jhomlala jhomlala added bug Something isn't working and removed new issue New issue which has not been checked yet labels Dec 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants