Вопрос

I have a simple javaFX application that loads a webpage in a WebView componant.

StackPane root = new StackPane();
Scene scene = new Scene(root, 80, 20);
browser = new WebView();
webEngine = browser.getEngine();

webEngine.load("test.html");
root.getChildren().add(browser);
jfxPanel.setScene(scene);

This works fine and test.html can be seen. The issue is with the HTML5 video on the page.

<video width="320" height="240" controls="controls">
    <source src="http://upload.wikimedia.org/wikipedia/commons/7/79/Big_Buck_Bunny_small.ogv" type="video/ogg" />
    Your browser does not support the video tag.
</video>

The page works in Chrome 16, but in the java application you can only see the controls and clicking play does nothing. I assume the WebEngine allows HTML5 as the controls appear and the text inside the <video></video> tags isn't output.

Can anyone shed some light on what I doing wrong?

Нет правильного решения

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top