Switched default backend to GStreamer.

This commit is contained in:
neviyn 2016-04-01 20:37:16 +01:00
parent 05e0e446a7
commit bacb560f6c
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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));
}