The previous recipe shows you how to play audio using the JavaFX Media API. This recipe builds on the versatility of the Media API and extends the previous recipe, Playing audio with MediaPlayer, and creates a video player with a few changes to the code.
This recipe uses classes from the Media API located in the javafx.scene.media
package. As mentioned in the introduction of this recipe, the example presented here extends the code from the previous recipe to transform the audio player to now play video. We are going to reuse the same icons and the same logic to control the playback of the video. To review how to configure and use the Media API for playback, review the previous recipe Playing audio with MediaPlayer.
To illustrate video playback, the application plays back the award-winning, open-sourced, short, animated movie Big Buck Bunny. By default, the recipe will play the 854 x 480 H.264 version found at the address http://mirror.bigbuckbunny...