androidx / androidx/media

PlayerView#setControllerShowTimeoutMs doesn't work as expected with custom controller_layout_id

Open
#2,174 3 comments 1 reaction 1 assignee View on GitHub

@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
  1. 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"/>
  1. 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 bugreport to android-media-github@google.com after filing this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.