Fix audio/video continuing after window close and window close failures#80
Conversation
- Add synchronous setAudioMuted(true) to immediately stop audio - Add setLifecycleState(Frozen) to stop background activity - Keep async JavaScript cleanup for completeness - Update documentation in header and AGENTS.md Co-authored-by: paulpv <1393897+paulpv@users.noreply.github.com>
|
@copilot The previous code also had the problem that if the window closing failed then the window would still stay open (but seemed hidden/minimized) and show in the That seems like a different problem than what this PR fixes. |
The frozen lifecycle state was preventing proper page cleanup, causing windows to appear hidden but not destroyed (still showing in Window menu). Now only using synchronous audio muting + async JS cleanup. Co-authored-by: paulpv <1393897+paulpv@users.noreply.github.com>
Fixed in commit 8baab52. The issue was caused by |
Audio and video continue playing after closing windows with multiple frames. Additionally, windows fail to close properly, appearing hidden but remaining in the Window menu. The existing
stopMediaPlayback()only used asynchronous JavaScript, which doesn't execute before QWebEnginePages are destroyed.Changes
SplitFrameWidget::stopMediaPlayback()
setAudioMuted(true)to immediately stop audio outputsetLifecycleState(Frozen)- was preventing proper page cleanup and causing window close failuresThe two-layer approach ensures audio stops immediately while avoiding lifecycle freezing that interferes with Qt's window destruction. Critical for live streams and incognito mode.
Issues Fixed
Documentation
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.