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

PlayerControlView enables (app disabled) play/pause button when controller layout is revealed on tap #2175

@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. Setup PlayerView to always disable play/pause button
playerView.findViewById(R.id.exo_play_pause).setEnabled(false);
playerView.findViewById(R.id.exo_play_pause).setAlpha(0.5f);
  1. Run the app and tap on the player view to reveal default controller

Expected result

Play/Pause button stays disabled as explicitly requested by the app

Actual result

Play/Pause button gets enabled automatically because of this code in PlayerControlView.

private void updatePlayPauseButton() {
      ...
      ...

      boolean enablePlayPause = Util.shouldEnablePlayPauseButton(player);
      updateButton(enablePlayPause, playPauseButton);
    }
  }

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