Skip to content

Fix/866 backlog audio cleanup#978

Open
CCreative-Od1L wants to merge 4 commits into
OpenWebGAL:devfrom
CCreative-Od1L:fix/866-backlog-audio-cleanup
Open

Fix/866 backlog audio cleanup#978
CCreative-Od1L wants to merge 4 commits into
OpenWebGAL:devfrom
CCreative-Od1L:fix/866-backlog-audio-cleanup

Conversation

@CCreative-Od1L

Copy link
Copy Markdown

修复内容

修复 Backlog 界面点击语音按钮时多条音频混合播放的问题。

修改

  1. Backlog.tsx:点击 backlog 语音按钮时,暂停其他正在播放的 backlog 音频和游戏内 currentVocal 语音
  2. autoPlay.ts:Backlog 打开时 auto 不推进剧情

涉及 Issue

Closes #866

测试场景

  • Backlog 内部不叠加
  • 点 backlog 语音时 currentVocal 停
  • auto 开启时点 backlog 语音,关闭 Backlog 后 auto 正常推进
  • auto 开启时不开 Backlog 不受影响
  • auto 关闭时不受影响

Commit

  • 0d6797c7 fix(backlog): stop other backlog audio and game vocal on click
  • 940c2cfa fix(autoplay): pause auto play while Backlog is open

MakinoharaShoko and others added 3 commits June 6, 2026 21:00
Backlog 界面点击语音按钮时只调用 play(),未暂停其他
正在播放的 backlog 音频元素,导致多条语音同时播放。
同时未暂停游戏内正在播放的 currentVocal 语音,
点击 backlog 语音时与游戏内语音混合。

通过 querySelectorAll 匹配所有 backlog audio 元素,
在播放新语音前暂停并重置其他元素;同时暂停并重置
currentVocal 元素以避免与 backlog 语音混合。

Closes OpenWebGAL#866
Backlog 打开时自动播放不应推进剧情,否则在历史界面
点选 backlog 语音暂停 currentVocal 后,auto 会立即推进
到下一句对话并触发新的 vocal 播放,导致 Backlog 中听到
两条声音。

- autoPlay 在 Backlog 打开时直接 return,避免推进
- Backlog 点击 backlog 语音时同时 unmount vocal-play
  perform,清理外部 pause 留下的状态不一致

属于 OpenWebGAL#866 修复的延伸场景。

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request prevents auto-play from advancing the story when the Backlog UI is open, and improves audio handling by pausing other backlog and game vocal audio when a backlog voice is played. The review feedback suggests clearing the existing autoTimeout when the Backlog is open to ensure auto-play is fully paused, and simplifying the audio pausing logic in Backlog.tsx by pausing all backlog audio elements unconditionally since the current audio is reset and played immediately after.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread packages/webgal/src/Core/controller/gamePlay/autoPlay.ts
Comment thread packages/webgal/src/UI/Backlog/Backlog.tsx
移除 'audio.id !== currentAudioId' 排除判断。后续逻辑会
重置并播放当前音频(currentTime = 0 + play()),故前置
pause 不需要排除当前。简化代码,无功能差异。

反馈来源:PR review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants