From f8a500c0505aeeae5439e18f1e72d4dc00beb593 Mon Sep 17 00:00:00 2001 From: locphamtran Date: Tue, 25 Aug 2026 07:05:41 +0700 Subject: [PATCH] =?UTF-8?q?debug:=20diag=20PUSH=5FMIDI=20ok/fail=20cho=20p?= =?UTF-8?q?ush=5Fmidi=5Fevent=20(nghi=20midi=20queue=20full=20=E2=80=94=20?= =?UTF-8?q?bridge=20khong=20nhan=20note=20trong=20bounce)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/static/js/services/nativeBridgeService.js | 9 ++++++++- app/templates/index.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/static/js/services/nativeBridgeService.js b/app/static/js/services/nativeBridgeService.js index 4a83a80..2dd2ee7 100644 --- a/app/static/js/services/nativeBridgeService.js +++ b/app/static/js/services/nativeBridgeService.js @@ -142,7 +142,14 @@ data3: data3 === undefined ? 0 : data3, sampleOffset: sampleOffset || 0, live: !!live - }).catch(function (e) { console.warn('[BridgeService] push_midi_event:', e); }); + }).then(function () { + _pushOk = (_pushOk || 0) + 1; + if ((_pushOk + (_pushFail || 0)) % 100 === 0 && window.__sfDiag) window.__sfDiag('PUSH_MIDI ok=' + _pushOk + ' fail=' + (_pushFail || 0)); + }).catch(function (e) { + _pushFail = (_pushFail || 0) + 1; + if (_lastPushFail !== String(e)) { _lastPushFail = String(e); if (window.__sfDiag) window.__sfDiag('PUSH_MIDI_FAIL ' + e); } + console.warn('[BridgeService] push_midi_event:', e); + }); return true; }, diff --git a/app/templates/index.html b/app/templates/index.html index ec534a8..376b95f 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -39,7 +39,7 @@ - +