Commit Graph
1 Commits
Author SHA1 Message Date
google-labs-jules[bot] 439265d9c0 Debug: forward embed logs to parent when embed_debug=1
This commit instruments the embed runtime to forward structured logs and lifecycle events
(Nostr, relay, pointer resolution, playback decision, WebTorrent) to the parent window
via `postMessage` when the `embed_debug=1` query parameter is present.

It also adds a defensive guard to `resetTorrentStats` in `js/app.js` to prevent TypeErrors.

Changes:
- Added `js/embedDiagnostics.js` module.
- Modified `js/embed.js` to initialize diagnostics and instrument startup.
- Modified `js/app.js` to instrument playback fallback and patch `resetTorrentStats`.
- Modified `js/webtorrent.js` to instrument peer probing and streaming.
2026-01-24 22:29:18 +00:00