mirror of
https://gitlab.futo.org/videostreaming/grayjay.git
synced 2026-05-16 04:52:39 +02:00
Fix for #2614
This commit is contained in:
+10
@@ -905,6 +905,7 @@ class VideoDetailView : ConstraintLayout {
|
||||
cleanupPlaybackTracker();
|
||||
Logger.i(TAG, "Keep screen on unset onClose")
|
||||
fragment.activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||
clearChapters()
|
||||
};
|
||||
|
||||
StatePlayer.instance.autoplayChanged.subscribe(this) {
|
||||
@@ -999,6 +1000,12 @@ class VideoDetailView : ConstraintLayout {
|
||||
_cast.stopAllGestures();
|
||||
}
|
||||
|
||||
private fun clearChapters() {
|
||||
_chapters = null
|
||||
_player.setChapters(null)
|
||||
_cast.setChapters(null)
|
||||
}
|
||||
|
||||
fun showChaptersUI(){
|
||||
video?.let {
|
||||
try {
|
||||
@@ -1330,6 +1337,7 @@ class VideoDetailView : ConstraintLayout {
|
||||
_lastVideoSource = null;
|
||||
_lastAudioSource = null;
|
||||
_lastSubtitleSource = null;
|
||||
clearChapters()
|
||||
}
|
||||
fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) {
|
||||
Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady")
|
||||
@@ -1340,6 +1348,7 @@ class VideoDetailView : ConstraintLayout {
|
||||
_searchVideo = null;
|
||||
video = null;
|
||||
cleanupPlaybackTracker();
|
||||
clearChapters()
|
||||
_url = url;
|
||||
_videoResumePositionMilliseconds = resumeSeconds * 1000;
|
||||
_rating.visibility = View.GONE;
|
||||
@@ -1550,6 +1559,7 @@ class VideoDetailView : ConstraintLayout {
|
||||
}
|
||||
|
||||
val me = this;
|
||||
clearChapters()
|
||||
if (video is JSVideoDetails) {
|
||||
fragment.lifecycleScope.launch(Dispatchers.IO) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user