From 86b6938911b2ea23e649fdfbcd98e5effdc1dcc5 Mon Sep 17 00:00:00 2001
From: Kai <git@seaoflaurels.com>
Date: Sat, 7 Dec 2024 11:09:48 -0600
Subject: [PATCH] added video detail check

---
 .../fragment/mainactivity/main/VideoDetailView.kt            | 5 +++++
 1 file changed, 5 insertions(+)

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 8ec9c29b..b28cb308 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
@@ -2382,6 +2382,11 @@ class VideoDetailView : ConstraintLayout {
         var videoSourceWidth = _player.exoPlayer?.player?.videoSize?.width
         var videoSourceHeight = _player.exoPlayer?.player?.videoSize?.height
 
+        if (videoSourceWidth == null || videoSourceHeight == null || videoSourceWidth == 0 || videoSourceHeight == 0){
+            videoSourceWidth = this.video?.video?.videoSources?.get(0)?.width
+            videoSourceHeight = this.video?.video?.videoSources?.get(0)?.height
+        }
+
         return if (videoSourceWidth == null || videoSourceHeight == null || videoSourceWidth == 0 || videoSourceHeight == 0){
             null
         } else{
-- 
GitLab