Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions packages/webgal/src/Core/controller/gamePlay/autoPlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,10 @@ const autoPlay = () => {
const data = webgalStore.getState().userData.optionData.autoSpeed;
// 范围为 [250, 1750]
const autoPlayDelay = 250 + (100 - data) * 15;
// Backlog 打开时不推进,避免在历史界面里自动播放导致剧情继续
if (webgalStore.getState().GUI.showBacklog) {
return;
}
Comment thread
CCreative-Od1L marked this conversation as resolved.
let isBlockingAuto = false;
WebGAL.gameplay.performController.performList.forEach((e) => {
if (e.blockingAuto())
Expand Down
15 changes: 15 additions & 0 deletions packages/webgal/src/UI/Backlog/Backlog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,21 @@ export const Backlog = () => {
<div
onClick={() => {
playSeClick();
// 暂停所有 backlog 语音(包括当前;后续会重置并播放当前)
document
.querySelectorAll('[id^="backlog_audio_play_element_"]')
.forEach((audio: any) => {
audio.pause();
audio.currentTime = 0;
});
Comment thread
CCreative-Od1L marked this conversation as resolved.
// 暂停游戏内正在播放的语音,避免与 backlog 语音混合
const currentVocal = document.getElementById('currentVocal') as HTMLAudioElement | null;
if (currentVocal) {
currentVocal.pause();
currentVocal.currentTime = 0;
}
// 卸载 vocal-play perform,避免其 blockingAuto 阻塞自动播放
WebGAL.gameplay.performController.unmountPerform('vocal-play', true);
// 获取到播放 backlog 语音的元素
const backlog_audio_element: any = document.getElementById(
'backlog_audio_play_element_' + indexOfBacklog,
Expand Down