Integrating flash player in JavaFX web browser

柔情痞子 提交于 2019-12-08 04:23:36

问题


I created a web browser using WebView and WebEngine classes of JavaFX. It is working fine but not able to play videos. It is opening youtube.com but is not playing videos of youtube. It is asking to install Adobe flash player. Even after installing, the problem is same. Do I have to integrate some plug-in of Adobe Flash Player in my Java code. If yes, how? Or there is some other solution. Kindly help.


回答1:


WebView in JavaFX 2.2 does not support plugin based content such as Flash content.

As alternatives, for launching YouTube video content from JavaFX you can use:

  1. HostServices.showDocument go launch flash content in the default system web browser OR
  2. YouTube's iframe embedding API in WebView rather than it's flash interface.

The YouTube iframe embedding API embeds html5 video content, rather than flash video content and html5 video content works in WebView.

For more info, see http://www.youtube.com/html5



来源:https://stackoverflow.com/questions/18277265/integrating-flash-player-in-javafx-web-browser

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!