mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
webm demo app: Fix crash on screen touch
Fix crash on screen touch before starting playback. mediaController cannot be used until after setMediaPlayer has been called on it.
This commit is contained in:
parent
ce26e601ed
commit
6ee6bc5c59
@ -274,7 +274,7 @@ public class VideoPlayer extends Activity implements OnClickListener,
|
||||
}
|
||||
|
||||
private void toggleControlsVisibility() {
|
||||
if (mediaController != null) {
|
||||
if (mediaController != null && player != null) {
|
||||
if (mediaController.isShowing()) {
|
||||
mediaController.hide();
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user