PlayerView#setControllerShowTimeoutMs doesn't work as expected with custom controller_layout_id
Open
@tonihei is already working on this.
Since Feb 21, 2025.
question
- Dominant language
- Java
- Stars
- 3k
- Forks
- 955
- Avg merge
- 12d 14h
- Merged PRs (30d)
- 2
Description
Version
Media3 main branch
More version details
main
Devices that reproduce the issue
Emulator
Devices that do not reproduce the issue
N/A
Reproducible in the demo app?
Yes
Reproduction steps
- Set a custom controller layout on PlayerView
<androidx.media3.ui.PlayerView android:id="@+id/player_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:controller_layout_id="@layout/custom_controller"
app:show_shuffle_button="true"
app:show_subtitle_button="true"/>
- Set controller timeout
playerView.setControllerShowTimeoutMs(4000);
Expected result
Controller should be dismissed after 4 seconds of idle timeout.
Actual result
Controller times out only after 8 seconds. Note: this is reproducible only with custom controller set via app:controller_layout_id and not with the default controller of PlayerView
Media
N/A
Bug Report
- You will email the zip file produced by
adb bugreportto android-media-github@google.com after filing this issue.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.