|
|
|
|
@ -366,10 +366,10 @@ public class Players implements Player.Listener, ParseCallback { |
|
|
|
|
public void start(Result result, boolean useParse, int timeout) { |
|
|
|
|
if (result.hasMsg()) { |
|
|
|
|
ErrorEvent.extract(result.getMsg()); |
|
|
|
|
} else if (result.getParse(1) == 1 || result.getJx() == 1) { |
|
|
|
|
startParse(result, useParse); |
|
|
|
|
} else if (isIllegal(result.getRealUrl())) { |
|
|
|
|
ErrorEvent.url(); |
|
|
|
|
} else if (result.getParse(1) == 1 || result.getJx() == 1) { |
|
|
|
|
startParse(result, useParse); |
|
|
|
|
} else if (result.getDrm() != null && !FrameworkMediaDrm.isCryptoSchemeSupported(result.getDrm().getUUID())) { |
|
|
|
|
ErrorEvent.drm(); |
|
|
|
|
} else { |
|
|
|
|
@ -458,6 +458,8 @@ public class Players implements Player.Listener, ParseCallback { |
|
|
|
|
String host = UrlUtil.host(uri); |
|
|
|
|
String scheme = UrlUtil.scheme(uri); |
|
|
|
|
if ("data".equals(scheme)) return false; |
|
|
|
|
if (url.startsWith("json:")) return false; |
|
|
|
|
if (url.startsWith("parse:")) return false; |
|
|
|
|
return scheme.isEmpty() || "file".equals(scheme) ? !Path.exists(url) : host.isEmpty(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|