The AV PlayerFX can run on both Swing and JavaFX platforms depending on the parameter values of the org.avfx.core.AVPlayerFX.launch(org.avfx.core.AVPlayerFX.JavaPlatform platform, Object container)
initializer method:
org.avfx.core.AVPlayerFX.JavaPlatform.SWING and a valid Swing container component instance (like a javax.swing.JPanel object or the javax.swing.JFrame's layered pane):
JFrame frame = new JFrame();
org.avfx.core.AVPlayerFX.launch(org.avfx.core.AVPlayerFX.JavaPlatform.SWING, frame.getLayeredPane());
org.avfx.core.AVPlayerFX.close(org.avfx.core.AVPlayerFX.JavaPlatform.SWING); when you finish, to release all the used resources. You can safely omit this step if the AV PlayerFX runs on the JavaFX Event Thread.
@Override
public void start(Stage primaryStage) {
org.avfx.core.AVPlayerFX.launch(org.avfx.core.AVPlayerFX.JavaPlatform.JAVAFX, primaryStage);
}
It's that easy!! Enjoy!!