fix(playback): het retrigger 'play lai roi tat' khi stop - stop ngay clip source chua phat (playbackState=scheduled) truoc fade, source dang keu giu lai ramp 200ms; sync 5 ban JS + index.html ?v=202608181835

This commit is contained in:
2026-08-18 18:31:32 +07:00
parent eb5a1483ca
commit 4ddaf1f26a
3 changed files with 13 additions and 2 deletions
+8
View File
@@ -23353,6 +23353,14 @@ const App = () => {
activeSourcesRef.current = [];
activeTrackNodesRef.current = {};
const fadedGains = [];
// V16: stop NGAY clip source CHƯA phát (playbackState='scheduled') — nếu
// chờ tới doHardStop (sau FADE_MS) chúng đã bắt đầu phát trong lúc fade →
// nghe như "play lại rồi tắt". Source đang kêu ('playing') giữ lại cho ramp.
try {
capturedSources.forEach(src => {
try { if (src.playbackState === 'scheduled') src.stop(); } catch (e) {}
});
} catch (e) {}
let bridgeGainNode = null;
if (fade && ctx) {
try {