modules/media/src/main/java/com/sun/media/jfxmedia/MediaManager.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
@@ -55,15 +55,29 @@
* played.
*
* @throws IllegalArgumentException if <code>contentType</code> is
* <code>null</code>.
*/
- public static boolean canPlayContentType (String contentType) {
+ public static boolean canPlayContentType(String contentType) {
if (contentType == null) {
throw new IllegalArgumentException("contentType == null!");
}
- return NativeMediaManager.getDefaultInstance().canPlayContentType (contentType);
+ return NativeMediaManager.getDefaultInstance().canPlayContentType(contentType);
+ }
+
+ /**
+ * Whether a media source having the indicated protocol may be
+ * played.
+ *
+ * @throws IllegalArgumentException if <code>contentType</code> is
+ * <code>null</code>.
+ */
+ public static boolean canPlayProtocol(String protocol) {
+ if (protocol == null) {
+ throw new IllegalArgumentException("protocol == null!");
+ }
+ return NativeMediaManager.getDefaultInstance().canPlayProtocol(protocol);
}
// XXX javadoc
public static MetadataParser getMetadataParser(Locator locator) {