import java.util.*; import java.util.zip.*; import java.util.List; import java.util.regex.*; import java.util.concurrent.*; import java.util.concurrent.atomic.*; import javax.swing.*; import javax.swing.event.*; import javax.swing.text.*; import javax.swing.table.*; import java.io.*; import java.net.*; import java.lang.reflect.*; import java.lang.ref.*; import java.lang.management.*; import java.security.*; import java.security.spec.*; import java.awt.*; import java.awt.event.*; import java.awt.image.*; import javax.imageio.*; import java.math.*; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.media.Media; import javafx.scene.media.MediaPlayer; import javafx.scene.media.MediaView; import javafx.stage.Stage; import javafx.scene.layout.*; import javafx.geometry.Insets; import javafx.scene.control.Button; public class main extends Application { public static void main(String[] args) throws Exception { System.setProperty("prism.forceGPU", "true"); System.setProperty("prism.verbose", "true"); fixContextClassLoader(); launch(); } public void start(Stage stage) { // Create and set the Scene. // Numbers are window size (content is not scaled) double w = 540, h = 209; Scene scene = new Scene(new Group(), w, h); stage.setScene(scene); // Name and display the Stage. stage.setTitle("Hello Media"); stage.show(); // Create the media source. //String source = getParameters().getRaw().get(0); String source = "/media/CE009E97009E865D__/Downloads/Oblivion (2013)/Oblivion.2013.mp4"; Media media = null; try { media = new Media(new File(source).toURI().toURL().toString()); } catch (MalformedURLException e) { throw new RuntimeException(e); } // Create the player and set to play automatically. MediaPlayer mediaPlayer = new MediaPlayer(media); mediaPlayer.setAutoPlay(true); // Create the media view. MediaView mediaView = new MediaView(mediaPlayer); // Make BorderPane and add to scene. BorderPane border = new BorderPane(); HBox hbox = makeButtons(); border.setBottom(hbox); border.setCenter(mediaView); ((Group) scene.getRoot()).getChildren().add(border); } HBox makeButtons() { HBox hbox = new HBox(); hbox.setPadding(new Insets(15, 12, 15, 12)); hbox.setSpacing(10); hbox.setStyle("-fx-background-color: #336699;"); Button buttonCurrent = new Button("Current"); buttonCurrent.setPrefSize(100, 20); Button buttonProjected = new Button("Projected"); buttonProjected.setPrefSize(100, 20); hbox.getChildren().addAll(buttonCurrent, buttonProjected); return hbox; } static void fixContextClassLoader() { Thread.currentThread().setContextClassLoader(myClassLoader()); } static ClassLoader myClassLoader() { return mc().getClassLoader(); } static Class mc() { return getMainClass(); } static Class getMainClass() { try { return Class.forName("main"); } catch (Throwable __e) { throw __e instanceof RuntimeException ? (RuntimeException) __e : new RuntimeException(__e); }} static Class getMainClass(Object o) { try { return (o instanceof Class ? (Class) o : o.getClass()).getClassLoader().loadClass("main"); } catch (Throwable __e) { throw __e instanceof RuntimeException ? (RuntimeException) __e : new RuntimeException(__e); }} }