mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-04-14 14:42:19 +08:00
✨ feat: 点击下一首自动播放,优化 https问题
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
name="viewport"
|
||||
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
|
||||
/>
|
||||
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests" />
|
||||
|
||||
<!-- SEO 元数据 -->
|
||||
<title>网抑云音乐 | AlgerKong | AlgerMusicPlayer</title>
|
||||
|
||||
@@ -806,10 +806,6 @@ export const usePlayerStore = defineStore('player', () => {
|
||||
return;
|
||||
}
|
||||
|
||||
// 在切换前保存当前播放状态
|
||||
const shouldPlayNext = play.value;
|
||||
console.log('切换到下一首,当前播放状态:', shouldPlayNext ? '播放' : '暂停');
|
||||
|
||||
// 保存当前索引,用于错误恢复
|
||||
const currentIndex = playListIndex.value;
|
||||
let nowPlayListIndex: number;
|
||||
@@ -841,7 +837,7 @@ export const usePlayerStore = defineStore('player', () => {
|
||||
|
||||
// 尝试播放,最多尝试maxRetries次
|
||||
while (!success && retryCount < maxRetries) {
|
||||
success = await handlePlayMusic(nextSong, shouldPlayNext);
|
||||
success = await handlePlayMusic(nextSong, true);
|
||||
|
||||
if (!success) {
|
||||
retryCount++;
|
||||
|
||||
Reference in New Issue
Block a user