JDK-8091132 : Support JavaFX MediaPlayer over HTTPS
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: media
  • Affected Version: 7u13
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-02-15
  • Updated: 2020-01-31
  • Resolved: 2015-10-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u72Fixed 9Fixed
Related Reports
Duplicate :  
Duplicate :  
Relates :  
Description
I tried to use MediaPlayer to play back a resource defined by an HTTPS url, and it says protocol not supported.

In the API reference it is stated that FILE/HTTP/JAR are supported protocols (HTTPS not mentioned).

Is it possible to somehow use HTTPS urls, or is there any workaround for this?

This seems quite a big drawback in my opinion, because protected content can not be played back currently because they must not be sent through the unsecure HTTP channel.
Comments
Andrey R, please analyze for test creation.
21-10-2015

Approved to backport to 8u-dev.
08-10-2015

OK, thanks for the explanation.
07-10-2015

They not really needed to read over HTTPS, but they needed for better error handling if something goes wrong when we establishing connection over HTTP or HTTPS. For example, when server has self-signed certificate and it is not exported to Java as trusted certificate we will send following error: MediaException: MEDIA_INACCESSIBLE : sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target And without code above we will send error message below: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player!
02-10-2015

My only question on this is that the following changes seem unrelated to adding HTTPS support. Is there something about reading media over an https server that makes these changes necessary? Media.java --------------- private void setError(MediaException value) { + if (getError() == null) { errorPropertyImpl().set(value); } + } MediaPlayer.java ----------------------- } catch (MediaException e) { + // Check media object for error. If it is connection related, then Media object will have better error message + if (media.getError() != null) { + handleError(media.getError()); + } else { handleError(e); + } } catch (Exception e) { handleError(new MediaException(MediaException.Type.UNKNOWN, e.getMessage())); }
02-10-2015

http://hg.openjdk.java.net/openjfx/9-dev/rt/rev/8607f6d3c627
02-10-2015

http://cr.openjdk.java.net/~almatvee/8091132/webrev.00/
01-10-2015

modules/media/src/main/java/com/sun/media/jfxmediaimpl/platform/Platform.java canPlayProtocol you could do protocols.contains(protocol.toLowerCase()) Approved.
21-09-2015

Raising to P3 given that youtube, for example, uses https exclusively to deliver media content.
06-05-2015

Mac will not support HTTP Live Streaming and limited support for MP4 over HTTPS.
02-10-2013

We have started working on this issue. We will have limited support for HTTPS protocol - it will only be supported on Windows and Linux. Mac won't support HTTPS protocol due to internal restrictions.
02-10-2013

I lowered the priority and the issue type. It's not a blocker, it's a request for a feature. The docs say exactly what we support.
15-02-2013

Dear Kirill, Just for the record, the lack of this feature is a blocking-factor in our just-starting project (and it's not a small one), without HTTPS support we need huge amount of hacks (downloading the sound manually from https url and create a local socket whose url we give to MediaPlayer and this local socket feeds the in-memory sound to the MediaPlayer). Or is there a simpler workaround?
15-02-2013