modules/media/src/main/java/com/sun/media/jfxmedia/locator/HLSConnectionHolder.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -591,11 +591,11 @@
}
}
private URI getPlaylistURI() throws URISyntaxException, MalformedURLException {
String location = playlistsLocations.get(infoIndex);
- if (location.startsWith("http://")) {
+ if (location.startsWith("http://") || location.startsWith("https://")) {
return new URI(location);
} else {
return new URI(playlistURI.toURL().toString().substring(0, playlistURI.toURL().toString().lastIndexOf("/") + 1) + location);
}
}
@@ -897,11 +897,11 @@
liveSemaphore.release();
}
}
private void setBaseURI(String playlistURI, String URI) {
- if (!URI.startsWith("http://")) {
+ if (!URI.startsWith("http://") || !URI.startsWith("https://")) {
baseURI = playlistURI.substring(0, playlistURI.lastIndexOf("/") + 1);
}
needBaseURI = false;
}
}