#3248 Enable volume reduction for video media

This commit is contained in:
Max Bechtold 2019-10-17 09:40:18 +02:00
parent cbee8c3043
commit f9cf013b16
1 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ import org.antennapod.audio.MediaPlayer;
import java.io.File;
import java.io.IOException;
import java.util.EnumSet;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
@ -670,7 +671,7 @@ public class LocalPSMP extends PlaybackServiceMediaPlayer {
*/
private void setVolumeSync(float volumeLeft, float volumeRight) {
playerLock.lock();
if (media != null && media.getMediaType() == MediaType.AUDIO) {
if (media != null && EnumSet.of(MediaType.AUDIO, MediaType.VIDEO).contains(media.getMediaType())) {
Playable playable = getPlayable();
if (playable instanceof FeedMedia) {
FeedMedia feedMedia = (FeedMedia) playable;