From ee75909c80d399d03d548127ecc2454740ae5b51 Mon Sep 17 00:00:00 2001 From: karol Date: Sun, 1 Mar 2020 13:02:20 +0100 Subject: [PATCH] set mute button in main player from other player --- .../java/org/schabi/newpipe/player/MainVideoPlayer.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java index d7b518771..cad165ab6 100644 --- a/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java +++ b/app/src/main/java/org/schabi/newpipe/player/MainVideoPlayer.java @@ -695,7 +695,7 @@ public final class MainVideoPlayer extends AppCompatActivity @Override public void onMuteUnmuteButtonClicled() { super.onMuteUnmuteButtonClicled(); - updatePlaybackButtons(); + setMuteButton(muteButton, playerImpl.isMuted()); } @@ -785,6 +785,7 @@ public final class MainVideoPlayer extends AppCompatActivity animateView(secondaryControls, SLIDE_AND_ALPHA, !isMoreControlsVisible, DEFAULT_CONTROLS_DURATION); showControls(DEFAULT_CONTROLS_DURATION); + setMuteButton(muteButton, playerImpl.isMuted()); } private void onShareClicked() { @@ -984,7 +985,6 @@ public final class MainVideoPlayer extends AppCompatActivity setRepeatModeButton(repeatButton, getRepeatMode()); setShuffleButton(shuffleButton, playQueue.isShuffled()); - setMuteButton(muteButton, playerImpl.isMuted()); } private void buildQueue() { @@ -1090,6 +1090,10 @@ public final class MainVideoPlayer extends AppCompatActivity return repeatButton; } + public ImageButton getMuteButton() { + return muteButton; + } + public ImageButton getPlayPauseButton() { return playPauseButton; }