feat:下载管理页面,集成分享功能

This commit is contained in:
Developer
2026-03-19 20:11:05 +08:00
parent 0fbfdadf6a
commit c0b7b8e974
8 changed files with 363 additions and 9 deletions

View File

@@ -21,7 +21,6 @@ export function VideoPlayer({ playData, qualities, currentQn, onQualityChange, b
const [fullscreen, setFullscreen] = useState(false);
const { width, height } = useWindowDimensions();
const VIDEO_HEIGHT = width * 0.5625;
// In Expo Go ScreenOrientation is unavailable; simulate landscape via CSS transform
const needsRotation = !ScreenOrientation && fullscreen;
const lastTimeRef = useRef(0);
const portraitRef = useRef<NativeVideoPlayerRef>(null);
@@ -33,8 +32,9 @@ export function VideoPlayer({ playData, qualities, currentQn, onQualityChange, b
};
const handleExitFullscreen = async () => {
// Seek portrait player to current position before it becomes visible again
// 退出全屏:同步进度,竖屏一律暂停
portraitRef.current?.seek(lastTimeRef.current);
portraitRef.current?.setPaused(true);
setFullscreen(false);
if (Platform.OS !== 'web')
await ScreenOrientation?.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);