Skip to content
This repository has been archived by the owner on Dec 28, 2021. It is now read-only.

Commit

Permalink
更新
Browse files Browse the repository at this point in the history
  • Loading branch information
grandiloquent committed Sep 13, 2021
1 parent 12d0bb9 commit ae7db18
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 4 deletions.
Binary file added app/src/main/1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 14 additions & 3 deletions app/src/main/java/euphoria/psycho/player/VideoActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import android.media.MediaPlayer.OnVideoSizeChangedListener;
import android.media.TimedMetaData;
import android.media.TimedText;
import android.net.Uri;
import android.os.Handler;
import android.view.GestureDetector;
import android.view.GestureDetector.OnContextClickListener;
Expand All @@ -22,11 +23,14 @@
import android.view.WindowManager;

import java.io.File;
import java.nio.charset.StandardCharsets;
import java.util.Formatter;

import euphoria.psycho.explorer.R;
import euphoria.psycho.share.DateTimeShare;
import euphoria.psycho.share.KeyShare;
import euphoria.psycho.share.Logger;
import euphoria.psycho.share.WebViewShare;

import static euphoria.psycho.player.PlayerHelper.getNavigationBarHeight;
import static euphoria.psycho.player.PlayerHelper.getNavigationBarSize;
Expand All @@ -39,6 +43,7 @@
import static euphoria.psycho.player.PlayerHelper.rotateScreen;
import static euphoria.psycho.player.PlayerHelper.showSystemUI;
import static euphoria.psycho.player.PlayerHelper.switchPlayState;
import static euphoria.psycho.videos.VideosHelper.USER_AGENT;

// https://github.com/google/ExoPlayer
public class VideoActivity extends BaseVideoActivity implements
Expand Down Expand Up @@ -195,9 +200,15 @@ private void setupView() {
});
});
mFileDownload.setOnClickListener(v -> {
Intent intent = new Intent(VideoActivity.this, euphoria.psycho.tasks.VideoActivity.class);
intent.setData(intent.getData());
VideoActivity.this.startActivity(intent);
Uri videoUri = getIntent().getData();
if (videoUri.toString().contains("m3u8")) {
Intent intent = new Intent(VideoActivity.this, euphoria.psycho.tasks.VideoActivity.class);
intent.setData(videoUri);
VideoActivity.this.startActivity(intent);
} else {
WebViewShare.downloadFile(v.getContext(), KeyShare.toHex(videoUri.toString().getBytes(StandardCharsets.UTF_8)), videoUri.toString(), USER_AGENT);
}

});
}

Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/euphoria/psycho/videos/VideosHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,8 @@ public static void launchDialog(MainActivity mainActivity, List<Pair<String, Str
}
new AlertDialog.Builder(mainActivity)
.setItems(names, (dialog, which) -> {
viewVideoBetter(mainActivity, videoList.get(which).second);
invokeVideoPlayer(mainActivity, Uri.parse(videoList.get(which).second));
//viewVideoBetter(mainActivity, videoList.get(which).second);
})
.show();
//
Expand Down
Binary file added app/src/main/play_store_512.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@mipmap/ic_launcher_adaptive_back"/>
<foreground android:drawable="@mipmap/ic_launcher_adaptive_fore"/>
</adaptive-icon>
Binary file modified app/src/main/res/mipmap-hdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-mdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ae7db18

Please sign in to comment.