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

Support subtitles and AES-128 encryption when playing HSL in MediaView

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8u45
    • javafx
    • x86_64
    • windows_7

      A DESCRIPTION OF THE REQUEST :
      Right now MediaView plays HLS but neither subtitles or AES-128 encryption is supported.

      JUSTIFICATION :
      MediaView should support captions/encryption since most videos use these features.


      ---------- BEGIN SOURCE ----------
      package application;

      import javafx.application.Application;
      import javafx.stage.Stage;
      import javafx.scene.Scene;
      import javafx.scene.layout.BorderPane;
      import javafx.scene.media.Media;
      import javafx.scene.media.MediaPlayer;
      import javafx.scene.media.MediaView;


      public class Main extends Application {
      private MediaView view;
      private MediaPlayer player;

      @Override
      public void start(Stage primaryStage) {
      String videoURL="http://playertest.longtailvideo.com/adaptive/captions/playlist.m3u8";
      String videoCaptionsURL="http://cdnbakmi.kaltura.com/p/243342/sp/24334200/playManifest/entryId/0_uka1msg4/flavorIds/1_vqhfu6uy,1_80sohj7p/format/applehttp/protocol/http/a.m3u8";
      String encryptedVideoURL="http://playertest.longtailvideo.com/adaptive/oceans_aes/oceans_aes.m3u8";
      try {
      // encrypted video does not play
      // captioned video plays but captions dont show
      Media media = new Media(encryptedVideoURL);
      // add media view
      player = new MediaPlayer(media);
      player.setAutoPlay(true);
      view = new MediaView(player);
      //
      BorderPane root = new BorderPane();
      root.setCenter(view);
      Scene scene = new Scene(root,400,400);
      //
      primaryStage.setScene(scene);
      primaryStage.show();
      } catch(Exception e) {
      e.printStackTrace();
      }
      }

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

      ---------- END SOURCE ----------

            almatvee Alexander Matveev
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: