added support for "vnd.youtube.launch" URI-scheme

This commit is contained in:
Connectety-L 2019-01-24 10:53:03 +01:00
parent ae23059d66
commit 399b4f2eef
No known key found for this signature in database
GPG Key ID: 853F15C538FCE6DF
2 changed files with 2 additions and 2 deletions

View File

@ -60,7 +60,7 @@ public class YoutubeStreamLinkHandlerFactory extends LinkHandlerFactory {
URI uri = new URI(urlString);
String scheme = uri.getScheme();
if (scheme != null && scheme.equals("vnd.youtube")) {
if (scheme != null && (scheme.equals("vnd.youtube") || scheme.equals("vnd.youtube.launch"))) {
String schemeSpecificPart = uri.getSchemeSpecificPart();
if (schemeSpecificPart.startsWith("//")) {
urlString = "https:" + schemeSpecificPart;

View File

@ -99,7 +99,7 @@ public class YoutubeStreamLinkHandlerFactoryTest {
assertTrue(linkHandler.acceptUrl("vnd.youtube://www.youtube.com/watch?v=jZViOEv90dI"));
assertTrue(linkHandler.acceptUrl("vnd.youtube:jZViOEv90dI"));
assertTrue(linkHandler.acceptUrl("vnd.youtube:jZViOEv90dI"));
assertTrue(linkHandler.acceptUrl("vnd.youtube.launch:jZViOEv90dI"));
}
@Test