O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Embedding media in an application

JavaFX provides a component, javafx.scene.media.MediaView, for viewing videos and listening to audios. This component is backed by a media engine, javafx.scene.media.MediaPlayer, which loads and manages the playback of the media. 

In this recipe, we will look at playing a sample video and controlling its playback by using the methods on the media engine. 

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required