fix(embedded-mpv): stop re-setting support inside startSession (infinite reload loop)

Regression introduced in the bundle 3 refactor. After calling
prepareEmbeddedMpv, the controller wrote the response back into
this.support — but the component's session-creation effect tracks
this.support(), so updating it cleaned up the just-created session and
ran startSession again, which prepared again, set support again, and so
on. Net effect: endless "Loading stream…" spinner because every session
was disposed before MPV could finish loading the file.

The initial loadSupport() in the constructor already populates support
(including capabilities). Drop the redundant set in startSession; leave
a comment explaining why so it does not get re-added.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: f957cd9849e0
This commit is contained in:
4grayandClaude Opus 4.7 committed 2026-05-05 10:41:59 +02:00
1 parent b5dbc33e62
commit 6ab62cfd8d
1 file changed
+5 -3
@@ -142,9 +142,11 @@ export class EmbeddedMpvSessionController {
'Embedded MPV is not available in this environment.'
);
}
if (prepared) {
this.support.set(prepared);
}
// Do not call this.support.set(prepared) here: support is already
// populated by loadSupport() in the constructor, and writing it
// again would re-trigger the component's session-creation effect
// (which depends on this.support()), tearing down the session we
// just created and looping forever.
const created = await window.electron!.createEmbeddedMpvSession(
measureBounds(host),