恢复了原有的视频解密逻辑
This commit is contained in:
1 parent
ec0eb64ffd
commit
5e96cdb1d6
5 files changed
+381
-692
No files matched your search
@@ -3540,13 +3540,12 @@ function MessageBubble({
|
||||
const requestVideoInfo = useCallback(async () => {
|
||||
if (!videoMd5 || videoLoadingRef.current) return
|
||||
|
||||
videoLoadingRef.current = true
|
||||
setVideoLoading(true)
|
||||
try {
|
||||
const result = await window.electronAPI.video.getVideoInfo(videoMd5, session.username)
|
||||
if (result && result.success && result.exists) {
|
||||
setVideoInfo({
|
||||
exists: result.exists,
|
||||
videoLoadingRef.current = true
|
||||
setVideoLoading(true)
|
||||
try {
|
||||
const result = await window.electronAPI.video.getVideoInfo(videoMd5)
|
||||
if (result && result.success && result.exists) {
|
||||
setVideoInfo({ exists: result.exists,
|
||||
videoUrl: result.videoUrl,
|
||||
coverUrl: result.coverUrl,
|
||||
thumbUrl: result.thumbUrl
|
||||
@@ -3560,7 +3559,7 @@ function MessageBubble({
|
||||
videoLoadingRef.current = false
|
||||
setVideoLoading(false)
|
||||
}
|
||||
}, [videoMd5, session.username])
|
||||
}, [videoMd5])
|
||||
|
||||
// 视频进入视野时自动加载
|
||||
useEffect(() => {
|
||||
|
||||
Reference in new issue
Block a user