-
Notifications
You must be signed in to change notification settings - Fork 6k
Closed
Labels
Description
With the introduction of the minimal mode the player controls become mostly unusable in many cases. When used in portrait mode on the OnePlus 7 with a 16:9 video the minimal mode is already activated. Consequently, none of the basic controls (e.g. VR or shuffle button) are reachable for users anymore.
A thorough investigation has revealed that the height of the player is considered too small to fit the default control views:
Lines 565 to 589 in 4364b91
| private boolean useMinimalMode() { | |
| int width = | |
| styledPlayerControlView.getWidth() | |
| - styledPlayerControlView.getPaddingLeft() | |
| - styledPlayerControlView.getPaddingRight(); | |
| int height = | |
| styledPlayerControlView.getHeight() | |
| - styledPlayerControlView.getPaddingBottom() | |
| - styledPlayerControlView.getPaddingTop(); | |
| int centerControlWidth = | |
| getWidthWithMargins(centerControls) | |
| - (centerControls != null | |
| ? (centerControls.getPaddingLeft() + centerControls.getPaddingRight()) | |
| : 0); | |
| int defaultModeMinimumWidth = | |
| Math.max( | |
| centerControlWidth, | |
| getWidthWithMargins(timeView) + getWidthWithMargins(overflowShowButton)); | |
| int defaultModeMinimumHeight = | |
| getHeightWithMargins(centerControls) + 2 * getHeightWithMargins(bottomBar); | |
| return width <= defaultModeMinimumWidth || height <= defaultModeMinimumHeight; | |
| } |
Two possible solutions are:
- Relax the constraints required to display the default user interface. As shown in our screenshots there is ample space to layout both the play/pause button and the bottom controls. This could be achieved by reducing padding or margins.
- Provide fallback for all controls in minimal mode. This could be achieved with a simple overflow button and a bottom sheet or dialog with the basic controls (as illustrated e.g. by YouTube).
| Minimal mode on OnePlus 7 | Default mode on OnePlus 7 |
|---|---|
![]() |
![]() |
- ExoPlayer version number: 2.13.2
- Android version: Android 10
- Android device: OnePlus 7
Reactions are currently unavailable

