June 2017
Beginner
1296 pages
69h 23m
English
Media, MediaPlayer and MediaViewerMany of today’s most popular apps are multimedia intensive. JavaFX provides audio and video multimedia capabilities via the classes of package javafx.scene.media:
For simple audio playback you can use class AudioClip.
For audio playback with more playback controls and for video playback you can use classes Media, MediaPlayer and MediaView.
In this section, you’ll build a basic video player. We’ll explain classes Media, MediaPlayer and MediaView as we encounter them in the project’s controller class (Section 22.6.2). The video used in this example is from NASA’s multimedia library3 and was downloaded from