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() {
|
private void toggleControlsVisibility() {
|
||||||
if (mediaController != null) {
|
if (mediaController != null && player != null) {
|
||||||
if (mediaController.isShowing()) {
|
if (mediaController.isShowing()) {
|
||||||
mediaController.hide();
|
mediaController.hide();
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user