Java Code Examples for javafx.scene.media.MediaPlayer.Status#HALTED

The following examples show how to use javafx.scene.media.MediaPlayer.Status#HALTED . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AdvancedMedia.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN
        || status == Status.HALTED)
    {
        //System.out.println("Player is in a bad or unknown state, can't play.");
        return;
    }
    
    if (status == Status.PAUSED
     || status == Status.STOPPED
     || status == Status.READY)
    {
        mediaPlayer.play();
    }
}
 
Example 2
Source File: AdvancedMedia.java    From marathonv5 with Apache License 2.0 6 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN
        || status == Status.HALTED)
    {
        //System.out.println("Player is in a bad or unknown state, can't play.");
        return;
    }
    
    if (status == Status.PAUSED
     || status == Status.STOPPED
     || status == Status.READY)
    {
        mediaPlayer.play();
    }
}
 
Example 3
Source File: AdvancedMedia.java    From netbeans with Apache License 2.0 6 votes vote down vote up
public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN
        || status == Status.HALTED)
    {
        //System.out.println("Player is in a bad or unknown state, can't play.");
        return;
    }
    
    if (status == Status.PAUSED
     || status == Status.STOPPED
     || status == Status.READY)
    {
        mediaPlayer.play();
    }
}
 
Example 4
Source File: StreamingMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        mediaPlayer.play();
    }
}
 
Example 5
Source File: OverlayMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        mediaPlayer.play();
    }
}
 
Example 6
Source File: AlphaMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = fierPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        fierPlayer.play();
        arthPlayer.play();
    }
}
 
Example 7
Source File: StreamingMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        mediaPlayer.play();
    }
}
 
Example 8
Source File: OverlayMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = mediaPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        mediaPlayer.play();
    }
}
 
Example 9
Source File: AlphaMediaPlayer.java    From marathonv5 with Apache License 2.0 5 votes vote down vote up
@Override public void play() {
    Status status = fierPlayer.getStatus();
    if (status == Status.UNKNOWN || status == Status.HALTED) {
        return;
    }
    if (status == Status.PAUSED || status == Status.STOPPED || status == Status.READY) {
        fierPlayer.play();
        arthPlayer.play();
    }
}