You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
Better Player version
Smartphone (please complete the following information):
Additional context
Work Around: If the skip controls are not needed, setting
enableSkips
tofalse
inBetterPlayerControlsConfiguration
avoids the problem because then the middle row of controls contains only one widget.The text was updated successfully, but these errors were encountered: