Browse Source

minor player improvements

pull/24/head 151
Jannik 4 years ago
parent
commit
75ad137346
  1. 9
      src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java
  2. 10
      src/main/java/kellerkinder/HomeFlix/player/PlayerController.java

9
src/main/java/kellerkinder/HomeFlix/application/MainWindowController.java

@ -218,9 +218,9 @@ public class MainWindowController {
private static final Logger LOGGER = LogManager.getLogger(MainWindowController.class.getName());
private int hashA = -647380320;
private String version = "0.6.100";
private String buildNumber = "149";
private String versionName = "toothless dragon RC";
private final String version = "0.6.100";
private final String buildNumber = "151";
private final String versionName = "toothless dragon RC";
private String dialogBtnStyle;
private String color;
private String local;
@ -274,8 +274,9 @@ public class MainWindowController {
omdbAPIController = new OMDbAPIController(this, dbController, this.main);
}
// call all init methods
// call all initialize methods
void init() {
LOGGER.info("Initializing Project-HomeFlix build " + buildNumber);
loadSettings();
checkAutoUpdate();
initTabel();

10
src/main/java/kellerkinder/HomeFlix/player/PlayerController.java

@ -92,7 +92,7 @@ public class PlayerController {
private ImageView fullscreen_black = new ImageView(new Image("icons/ic_fullscreen_black_24dp_1x.png"));
private ImageView fullscreen_exit_black = new ImageView(new Image("icons/ic_fullscreen_exit_black_24dp_1x.png"));
/**
/** FIXME double set currentTime(
* initialize the new PlayerWindow
* @param entry the film object
* @param player the player object (needed for closing action)
@ -144,7 +144,7 @@ public class PlayerController {
currentTime = newValue.toMillis(); // set the current time
int episode = !film.getEpisode().isEmpty() ? Integer.parseInt(film.getEpisode()) : 0;
int season = !film.getSeason().isEmpty() ? Integer.parseInt(film.getSeason()) : 0;
// if we are end time -10 seconds, do autoplay, if activated
if ((duration - currentTime) < 10000 && episode != 0 && autoplay) {
autoplay = false;
@ -155,8 +155,10 @@ public class PlayerController {
init(mainWCon, player, nextFilm);
autoplay = true;
}
} else if ((duration - currentTime) < 100) {
} else if ((duration - currentTime) < 120) {
// if we are -20ms stop the media
mediaPlayer.stop();
mainWCon.getDbController().setCurrentTime(film.getStreamUrl(), 0); // reset old video start time
}
if (!mousePressed) {
@ -181,7 +183,7 @@ public class PlayerController {
// hide controls timer initialization
final Timer timer = new Timer();
TimerTask controlAnimationTask = null; // task to execute save operation
final long delayTime = 1000;
final long delayTime = 2000; // hide the controls after 2 seconds
@Override
public void handle(MouseEvent mouseEvent) {

Loading…
Cancel
Save

Du besuchst diese Seite mit einem veralteten IPv4-Internetzugang. Möglicherweise treten in Zukunft Probleme mit der Erreichbarkeit und Performance auf. Bitte frage deinen Internetanbieter oder Netzwerkadministrator nach IPv6-Unterstützung.
You are visiting this site with an outdated IPv4 internet access. You may experience problems with accessibility and performance in the future. Please ask your ISP or network administrator for IPv6 support.
Weitere Infos | More Information
Klicke zum schließen | Click to close