我在javafx项目上工作。我有这个代码。
public class MoviePlayer extends Application{
public static void main(String[] args)
{
launch(args);
}
@Override
public void start(Stage stage) throws Exception
{
WebView root = new WebView();
root.getEngine().loadContent(
"<video width='320' height='240'controls='controls' >" +
"<source src='file:///C:/Users/lenovo-pc/workspace/EnhanceVideoJava/Movie_0001_512kb.mp4'/>" +
"Your browser does not support the video tag." +
"</video> ");
stage.setScene(new Scene(root, 500, 400));
stage.show();
}}
现在,我想在点击视频时创建一个动作。有可能??
罐