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();
|
cleanupPlaybackTracker();
|
||||||
Logger.i(TAG, "Keep screen on unset onClose")
|
Logger.i(TAG, "Keep screen on unset onClose")
|
||||||
fragment.activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
fragment.activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);
|
||||||
|
clearChapters()
|
||||||
};
|
};
|
||||||
|
|
||||||
StatePlayer.instance.autoplayChanged.subscribe(this) {
|
StatePlayer.instance.autoplayChanged.subscribe(this) {
|
||||||
@@ -999,6 +1000,12 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
_cast.stopAllGestures();
|
_cast.stopAllGestures();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun clearChapters() {
|
||||||
|
_chapters = null
|
||||||
|
_player.setChapters(null)
|
||||||
|
_cast.setChapters(null)
|
||||||
|
}
|
||||||
|
|
||||||
fun showChaptersUI(){
|
fun showChaptersUI(){
|
||||||
video?.let {
|
video?.let {
|
||||||
try {
|
try {
|
||||||
@@ -1330,6 +1337,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
_lastVideoSource = null;
|
_lastVideoSource = null;
|
||||||
_lastAudioSource = null;
|
_lastAudioSource = null;
|
||||||
_lastSubtitleSource = null;
|
_lastSubtitleSource = null;
|
||||||
|
clearChapters()
|
||||||
}
|
}
|
||||||
fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) {
|
fun setVideo(url: String, resumeSeconds: Long = 0, playWhenReady: Boolean = true) {
|
||||||
Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady")
|
Logger.i(TAG, "setVideo url=$url resumeSeconds=$resumeSeconds playWhenReady=$playWhenReady")
|
||||||
@@ -1340,6 +1348,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
_searchVideo = null;
|
_searchVideo = null;
|
||||||
video = null;
|
video = null;
|
||||||
cleanupPlaybackTracker();
|
cleanupPlaybackTracker();
|
||||||
|
clearChapters()
|
||||||
_url = url;
|
_url = url;
|
||||||
_videoResumePositionMilliseconds = resumeSeconds * 1000;
|
_videoResumePositionMilliseconds = resumeSeconds * 1000;
|
||||||
_rating.visibility = View.GONE;
|
_rating.visibility = View.GONE;
|
||||||
@@ -1550,6 +1559,7 @@ class VideoDetailView : ConstraintLayout {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val me = this;
|
val me = this;
|
||||||
|
clearChapters()
|
||||||
if (video is JSVideoDetails) {
|
if (video is JSVideoDetails) {
|
||||||
fragment.lifecycleScope.launch(Dispatchers.IO) {
|
fragment.lifecycleScope.launch(Dispatchers.IO) {
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user