4 Replies Latest reply: Nov 13, 2011 8:46 PM by 880133 RSS

    install flash plugin for WebView

    880133
      WebView component could no load the flash of web page,need install flash plugin.
      how install flash plugin? use promptHandler to handle install dialog?
        • 1. Re: install flash plugin for WebView
          jsmith
          WebView does not have a plugin interface which allows installation of a flash plugin to play flash content inside of the WebView (as far as I know).
          PromptHandler is just for handling JavaScript prompts, not for installing flash (This link describes what a JavaScript prompt is: http://www.tizag.com/javascriptT/javascriptprompt.php).

          If you wanted to hack around in Java and try and get a flash swf file to play (say in a swing frame layered on top of the web view), you could use something like: http://www.jpackages.com/jflashplayer/, but that doesn't seem a worthwhile route.

          If you are just trying to play a flash video flv file, the JavaFX mediaplayer has native support for that, this tutorial tells you how to play it => http://download.oracle.com/javafx/2.0/media/simpleplayer.htm.

          If however, it is a flash swf file, you are best off having the Java code launch a browser page in a third party browser which references the swf file.
          The following code called from within a subclass of a JavaFX Application will run a youtube swf file in your system's default browser (not WebView).
          getHostServices().showDocument("http://www.youtube.com/v/glKR892dYrQ?version=3&feature=player_detailpage");
          • 2. Re: install flash plugin for WebView
            880133
            As Far As I Know WebView is embedded webkit.
            Thare are another project name "Chromium Embedded Framework" { https://code.google.com/p/chromiumembedded/}, which can handle plugin and even full function of Chromium.
            But Java implement is based on AWT,and just a demo,not ready for use. { http://code.google.com/p/javachromiumembedded/ }
            I think JavaFx can provide full function of embedded webkit,expose more API to handle.

            And also I try to port CEF to JavaFx,but JavaFx lack of some function like cavas.paint(Graphics).

            Edited by: noregister on Nov 12, 2011 8:24 PM
            • 3. Re: install flash plugin for WebView
              Richard Bair-Oracle
              noregister wrote:
              As Far As I Know WebView is embedded webkit.
              Thare are another project name "Chromium Embedded Framework" { https://code.google.com/p/chromiumembedded/}, which can handle plugin and even full function of Chromium.
              But Java implement is based on AWT,and just a demo,not ready for use. { http://code.google.com/p/javachromiumembedded/ }
              That is not accurate, we don't use AWT at all. It is based on JavaFX. As for plugins, we are not likely to ever support running plugins (except maybe applets), for security reasons. There are also additional issues. If the browser is to support arbitrary things that Chrome supports like native client etc, it adds to the footprint of the browser (and security risks). Already the WebView constitutes over half of the download size of JavaFX. I would need a pretty strong justification to make it larger if doing so also increases our risk to vulnerabilities.
              I think JavaFx can provide full function of embedded webkit,expose more API to handle.

              And also I try to port CEF to JavaFx,but JavaFx lack of some function like cavas.paint(Graphics).
              We'll continue to add such support, I believe the WebView team has a number of missing HTML 5 features targeted for the next three releases. This is very useful information -- do you have a concrete list of features you need supported? Likewise, what is the use case?

              Thanks
              Richard
              • 4. Re: install flash plugin for WebView
                880133
                I would like WebView act as CEF("Chromium Embedded Framework") of JavaFx,that is full function of webkit and API for programmer.Programmer can use API place WebView in application in customlise UI and feature.
                Now, WebView in JavaFX is based on webkit,but act as "Label" with HTML parser.JavaFx want be one competitor of Rich Clients market,It is good to have a component with full feature of webkit,have the capacity of internet application,but bad for no expose enough API for programmer.

                as you mention that "Already the WebView constitutes over half of the download size of JavaFX" , but WebView only offer a dozen api to handle,and also if enable plugin and customlization,program based on WebView could be more lightweight,let more plugin installed when user need.

                Again,webkit embedded component is one hightlight of JavaFx,but need expose API for programmer to handle,more customlization,JavaFx should make full use of webkit,not just pack it into HTML-styled "Label".

                Edited by: noregister on Nov 13, 2011 6:46 PM