diff --git a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt index a3f403e6..8ec9c29b 100644 --- a/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt +++ b/app/src/main/java/com/futo/platformplayer/fragment/mainactivity/main/VideoDetailView.kt @@ -1322,7 +1322,14 @@ class VideoDetailView : ConstraintLayout { this.video = video; cleanupPlaybackTracker(); - onVideoChanged.emit(video.video.videoSources[0].width, video.video.videoSources[0].height) + if (video.video.videoSources.isNotEmpty()) { + onVideoChanged.emit( + video.video.videoSources[0].width, + video.video.videoSources[0].height + ) + } else { + onVideoChanged.emit(0, 0) + } if (video is JSVideoDetails) { val me = this;