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

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

Open
1 task
Ethan1983 opened this issue Feb 21, 2025 · 1 comment
Assignees

Comments

@Ethan1983
Copy link

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 [email protected] after filing this issue.
@tonihei
Copy link
Collaborator

tonihei commented Feb 21, 2025

I can't reproduce this when trying it out in the demo app. Is there anything special in your custom layout? For example, what happens if you specify a custom layout that just links to the default one ("@layout/exo_player_control_view")?

@tonihei tonihei self-assigned this Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants