Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8094657

Web View cannot play anything on youtube

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 8u45
    • Fix Version/s: None
    • Component/s: javafx
    • Labels:
    • Environment:

      I used 8u45 on both OSX 10.10 and Windows 8.1

      Description

      The code below opens a web view with youtube. None of the videos will play. It says "An error occurred, please try again later."

      This is the third most popular website on the planet so it's a bit bad.

      I know there have been problems with https and media. I tried to embed youtube on my own site with http in the iframe src. But in developer tools I see that the media is still fetched with the https scheme. I suspect that might be something new.

      import javafx.application.Application;
      import javafx.scene.Group;
      import javafx.scene.Scene;
      import javafx.scene.layout.VBox;
      import javafx.scene.web.WebEngine;
      import javafx.scene.web.WebView;
      import javafx.stage.Stage;

      public class WebViewer extends Application
      {
         @Override
         public void start(Stage stage)
         {
            stage.setTitle("Youtube");
            stage.setWidth(700);
            stage.setHeight(500);
            Scene scene = new Scene(new Group());
            VBox root = new VBox();
            final WebView browser = new WebView();
            final WebEngine webEngine = browser.getEngine();
            webEngine.load("http://youtube.com");
            root.getChildren().addAll(browser);
            scene.setRoot(root);
            stage.setScene(scene);
            stage.show();
         }

         public static void main(String[] args)
         {
            launch(args);
         }
      }

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                stayer Kirill Kirichenko (Inactive)
                Reporter:
                duke J. Duke (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported: