这是indexloc提供的服务,不要输入任何密码
Skip to content

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

@Ethan1983

Description

@Ethan1983

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions