From 34c8961f8d0ac8d7ba13ef0ec31d5f6f39c97ed0 Mon Sep 17 00:00:00 2001 From: Kearwood Date: Thu, 19 Dec 2019 12:44:17 -0800 Subject: [PATCH] Revert "Fix invalid play/pause button state when entering immersive videos (#2488)" This reverts commit 379b8f1f2e7844abddcd88f35d5d40e974732585. --- .../mozilla/vrbrowser/ui/widgets/MediaControlsWidget.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/MediaControlsWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/MediaControlsWidget.java index 42a881d1e3..bd9a8a5d84 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/MediaControlsWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/MediaControlsWidget.java @@ -278,7 +278,10 @@ public void setMedia(Media aMedia) { onTimeChange(mMedia.getMediaElement(), mMedia.getCurrentTime()); onVolumeChange(mMedia.getMediaElement(), mMedia.getVolume(), mMedia.isMuted()); onReadyStateChange(mMedia.getMediaElement(), mMedia.getReadyState()); - onPlaybackStateChange(mMedia.getMediaElement(), mMedia.isPlaying() ? MediaElement.MEDIA_STATE_PLAY : MediaElement.MEDIA_STATE_PAUSE); + if (mMedia.isPlaying()) { + onPlaybackStateChange(mMedia.getMediaElement(), MediaElement.MEDIA_STATE_PLAY); + } + mMedia.addMediaListener(this); }