1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;
public class TestWeb extends Application {
public static void main(String[] args) { Application.launch(args); }
@Override public void start(Stage primaryStage) {
WebView root = new WebView();
root.getEngine().loadContent(
"<html>"+
"<head>" +
"<title> Test Video</title>" +
"</head>" +
"<body>" +
"<video width='320' height='240'controls='controls'>" +
"<source src='http://download.oracle.com/otndocs/products/javafx/oow2010-2.flv'/>" +
"</video>" +
"</body>"+
"</html>");
primaryStage.setScene(new Scene(root, 340, 260));
primaryStage.show();
}
} |
Partager