JavaFx Webview с движением - PullRequest
0 голосов
/ 16 ноября 2018

Возможно ли просмотреть видео, какие потоки движения с JavaFx Webview и WebEngine?У меня есть код, который показывает мне, как каждый веб-сайт, который я хочу, но когда я пытаюсь открыть поток из движения, ничего не происходит

Код приложения:

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.*;
import javafx.stage.Stage;

public class Main extends Application {
    public static void main(String[] args) {
        launch();
    }

    @Override
    public void start(Stage primaryStage) throws Exception {
        Parent root = FXMLLoader.load(getClass().getResource("WebView.fxml"));
        Scene scene = new Scene(root, 600, 400);
        primaryStage.setScene(scene);
        primaryStage.show();
    }
}

<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.image.*?>
<?import javafx.scene.web.*?>
<?import java.lang.*?>
<?import javafx.scene.layout.*?>

<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="WebViewController">
   <children>
      <WebView fx:id="webView" layoutX="100.0" layoutY="176.0" prefHeight="400.0" prefWidth="600.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0" />
      <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="161.0" layoutY="27.0" pickOnBounds="true" preserveRatio="true">
         <image>
            <Image url="@../../../Schreibtisch/test.png" />
         </image>
      </ImageView>
   </children>
</AnchorPane>
...