diff --git a/VERSION.txt b/VERSION.txt index 90e583a..9544124 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -20250730101917 \ No newline at end of file +20250730215517 \ No newline at end of file diff --git a/src/app/play/page.tsx b/src/app/play/page.tsx index 83df039..0dd4d6c 100644 --- a/src/app/play/page.tsx +++ b/src/app/play/page.tsx @@ -147,6 +147,8 @@ function PlayPageClient() { const resumeTimeRef = useRef(null); // 上次使用的音量,默认 0.7 const lastVolumeRef = useRef(0.7); + // 上次使用的播放速率,默认 1.0 + const lastPlaybackRateRef = useRef(1.0); // 换源相关状态 const [availableSources, setAvailableSources] = useState([]); @@ -1354,6 +1356,9 @@ function PlayPageClient() { artPlayerRef.current.on('video:volumechange', () => { lastVolumeRef.current = artPlayerRef.current.volume; }); + artPlayerRef.current.on('video:ratechange', () => { + lastPlaybackRateRef.current = artPlayerRef.current.playbackRate; + }); // 监听视频可播放事件,这时恢复播放进度更可靠 artPlayerRef.current.on('video:canplay', () => { @@ -1379,6 +1384,14 @@ function PlayPageClient() { ) { artPlayerRef.current.volume = lastVolumeRef.current; } + if ( + Math.abs( + artPlayerRef.current.playbackRate - lastPlaybackRateRef.current + ) > 0.01 && + isWebkit + ) { + artPlayerRef.current.playbackRate = lastPlaybackRateRef.current; + } artPlayerRef.current.notice.show = ''; }, 0); diff --git a/src/lib/version.ts b/src/lib/version.ts index 7443053..f8b7a48 100644 --- a/src/lib/version.ts +++ b/src/lib/version.ts @@ -2,7 +2,7 @@ 'use client'; -const CURRENT_VERSION = '20250730101917'; +const CURRENT_VERSION = '20250730215517'; // 版本检查结果枚举 export enum UpdateStatus {