Skip to content

Commit b3de2ae

Browse files
committed
🔧 chore: 优化 MvPlayer 组件的关闭逻辑,简化音频暂停处理
1 parent 31ea3b7 commit b3de2ae

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/renderer/components/MvPlayer.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -359,9 +359,6 @@ const loadMvUrl = async (mv: IMvItem) => {
359359
360360
const handleClose = () => {
361361
emit('update:show', false);
362-
if (playerStore.playMusicUrl) {
363-
playerStore.setIsPlay(true);
364-
}
365362
};
366363
367364
const handleEnded = () => {

src/renderer/views/mv/index.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,7 @@ onMounted(async () => {
116116
117117
const handleShowMv = async (item: IMvItem, index: number) => {
118118
playerStore.setIsPlay(false);
119-
playerStore.setPlayMusic(false);
120-
audioService.getCurrentSound()?.pause();
119+
audioService.pause();
121120
showMv.value = true;
122121
currentIndex.value = index;
123122
playMvItem.value = item;

0 commit comments

Comments
 (0)