added external player redirection

This commit is contained in:
Vologhat
2022-07-13 05:34:22 +03:00
parent e6a687264b
commit 5b38ea3b3f
4 changed files with 30 additions and 1 deletions
@@ -29,10 +29,12 @@ public class ExternalLinkHandler{
);
private static final Map<String, String> qualities = new HashMap<>();
public static boolean parseVideoFile(VideoFile file, Context context){
public static boolean parseVideoFile(VideoFile file){
var context = getContext();
if (checkYoutubeLink(file)) {
try {
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.setData(Uri.parse(file.G));
context.startActivity(intent);
return true;