Fix stream shift disable enhanced broadcasting and clarity refactor. - #6198
michelinewu wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The unattended Stream Shift path may fail to reliably disable enhanced broadcasting.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Updates Twitch Stream Shift handling to disable enhanced broadcasting and clarify state versus backend setting updates.
Changes:
- Adds explicit Stream Shift enhanced-broadcasting handling.
- Separates persisted state updates from backend setting writes.
- Updates Go Live settings to use the state-specific method.
| File | Summary |
|---|---|
app/services/platforms/twitch.ts |
Adds Stream Shift handling and clearer enhanced-broadcasting APIs. |
app/components-react/windows/go-live/useGoLiveSettings.ts |
Uses the persisted-state setter for Go Live preferences. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| } else if (goLiveSettings.streamShift) { | ||
| // Stream shift is not compatible with enhanced broadcasting | ||
| this.setEnhancedBroadcastingSetting(false); |
BundleMonFiles updated (1)
Unchanged files (3)
Total files change +75B 0% Final result: ✅ View report in BundleMon website ➡️ |
| if (channelInfo) { | ||
| if (goLiveSettings?.liveOutputEditing) { |
There was a problem hiding this comment.
Nit: !!channelInfo implies !!goLiveSettings, but that's pretty tenuous IMO. Adding goLiveSettings to the first if would make it safer if the logic changes in the future here, since line 251 isn't checking nullish values.
| if (channelInfo) { | |
| if (goLiveSettings?.liveOutputEditing) { | |
| if (goLiveSettings && channelInfo) { | |
| if (goLiveSettings.liveOutputEditing) { |
| if (this.streamingService.views.shouldSwitchStreams) { | ||
| await this.setupStreamShiftStream(goLiveSettings); | ||
| } | ||
| return; |


Disable Enhanced Broadcasting for Stream Shift
Issues
Stream shift requires enhanced broadcasting to be disabled, which wasn't being set. The call sites were ambiguous so a small distinction between tracking the enhanced broadcasting user setting vs. the actual setting to go live could be confused.
Fixes
Adds an explicit
else if (goLiveSettings.streamShift)branch inbeforeGoLivethat forces enhanced broadcasting off, matching whatsetupStreamShiftStream()already does on the path that does short-circuit.Renames the state-only method to
setEnhancedBroadcastingStateand introducessetEnhancedBroadcastingSettingas the named wrapper around the OBS write.Files changed:
app/services/platforms/twitch.ts,app/components-react/windows/go-live/useGoLiveSettings.tsPerformance Implications
None.