diff --git a/src/main/java/musicplayer/SwingUIModule.java b/src/main/java/musicplayer/SwingUIModule.java index 570461d..d258d43 100644 --- a/src/main/java/musicplayer/SwingUIModule.java +++ b/src/main/java/musicplayer/SwingUIModule.java @@ -18,7 +18,7 @@ class SwingUIModule extends AbstractModule { @Override protected void configure() { - bind(IPlayer.class).to(VLCPlayer.class).in(Singleton.class); + bind(IPlayer.class).to(GStreamerPlayer.class).in(Singleton.class); bind(IDatabase.class).to(HibernateDatabase.class).in(Singleton.class); bind(IPlaylist.class).to(JTablePlaylist.class).in(Singleton.class); bind(ILibrary.class).to(JTreeLibrary.class).in(Singleton.class); diff --git a/src/main/java/musicplayer/player/VLCPlayer.java b/src/main/java/musicplayer/player/VLCPlayer.java index eac5e0a..a678774 100644 --- a/src/main/java/musicplayer/player/VLCPlayer.java +++ b/src/main/java/musicplayer/player/VLCPlayer.java @@ -93,7 +93,6 @@ public class VLCPlayer implements IPlayer { return; } boolean startedPlaying = mediaPlayer.startMedia(inputSong.getSongFile().getAbsolutePath()); - mediaPlayer.setVolume(currentVolume); if(!startedPlaying) throw new StartPlayingException(inputSong); } @@ -190,6 +189,7 @@ public class VLCPlayer implements IPlayer { @Override public void playing(MediaPlayer mediaPlayer) { + mediaPlayer.setVolume(currentVolume); if(callbackInterface != null) callbackInterface.setSeekBarDuration((int) (mediaPlayer.getLength() / 1000)); }