Fix LOE bugs. - #6176
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes appear consistent and scoped to the described LOE/Stream Shift bugs, with only minor maintainability nits noted.
Pull request overview
This PR adjusts the Go Live / streaming pipeline to fix Live Output Editing (LOE) and Stream Shift edge cases around Twitch enhanced broadcasting and dual-output display selection, ensuring the correct OBS context and persisted preferences are used.
Changes:
- Prevent Twitch enhanced broadcasting from being enabled during Stream Shift and LOE flows, and resolve enhanced broadcasting earlier in the Twitch go-live sequence.
- Fix enhanced broadcasting multistream canvas selection by using Twitch’s assigned display (instead of inferring from ingest server).
- Preserve user-typed shared title/description when Go Live settings are re-prepopulated after toggling platforms.
File summaries
| File | Description |
|---|---|
| app/services/streaming/streaming.ts | Adjusts enhanced broadcasting eligibility during Stream Shift; fixes enhanced broadcast multistream display selection logic. |
| app/services/streaming/streaming-view.ts | Simplifies/clarifies dual-output setup decisions and display defaults; adds notes about cleanup candidates. |
| app/services/platforms/twitch.ts | Resolves enhanced broadcasting earlier in go-live; forces enhanced broadcasting off for Stream Shift/LOE; resolves Stream Shift category ID to name without overwriting user preference. |
| app/services/platforms/index.ts | Extends platform service surface with setupLiveOutputStream hook. |
| app/components-react/windows/go-live/useGoLiveSettings.ts | Adds an option to preserve common fields across prepopulate calls; uses it when toggling platforms to avoid dropping typed title/description. |
Review details
- Files reviewed: 5/5 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| async setupLiveOutputStream(options?: IGoLiveSettings): Promise<void> { | ||
| // Live output editing not compatible with enhanced broadcasting, so disable it here | ||
| this.settingsService.setEnhancedBroadcasting(false); | ||
| } |
blackxored
left a comment
There was a problem hiding this comment.
I can only spot check, there's a lot of display logic here I don't have the context for.
| delete settings.platforms[platform]; | ||
| }, | ||
| ); | ||
| if (!view.isMidStreamMode) { |
There was a problem hiding this comment.
Isn't this covered by the conditional above it?
There was a problem hiding this comment.
🔵 Needs a closer look
The new “preserve common fields” logic uses || and will overwrite intentionally cleared (empty) title/description values during refresh, causing incorrect user-facing behavior.
Review details
Suppressed comments (1)
Previously missed (1) — in code that hasn't changed since the last review.
app/components-react/windows/go-live/useGoLiveSettings.ts:411
- When preserving common fields after
updateSettings, the||fallback treats an intentionally cleared title/description (empty string) as falsy and replaces it with the newly-prepopulated value. This makes it impossible for a user to clear these fields while a prepopulate refresh happens.
- Files reviewed: 5/5 changed files
- Comments generated: 0 new
- Review effort level: Lite
BundleMonFiles updated (1)
Unchanged files (3)
Total files change +330B 0% Final result: ✅ View report in BundleMon website ➡️ |
|
Post-merge review findings:
The change in
This conflicts with the stated rule that LOE cannot dual stream. Preserve the saved Relevant paths:
The restoration uses Relevant code:
Active-output safety: Moving I did not find tests covering LOE + a saved |
Fix Live Output Editing Regressions in Dual Stream Display, Enhanced Broadcasting, and Title Persistence
Summary
Two commits on
mw_fix_loe. The first (1027a1b34) fixes how theboth-display value used for Twitch dual streaming interacts with Live Output Editing (LOE) and stream shift. The second (8282ea831) fixesprepopulate()wiping an in-progress title/description edit every time the user toggles a platform in the Go Live window.Issues
getValidatedDisplaycoercedbothtohorizontalat the wrong layer.Enhanced broadcasting was decided after the stream key was already sent.
createEnhancedBroadcastMultistreaminferred the Twitch display from the wrong signal.Enhanced broadcasting stayed enabled during stream shift.
Stream shift's Twitch sync read back the OBS runtime flag it had just forced off.
Stream shift showed a numeric category ID instead of its name.
prepopulate()discarded unsaved title/description edits on every platform toggle.Fixes
getValidatedDisplayis removed.shouldSetupDualOutputnow defaults an unset display tohorizontalinline and separately treats any enabled platform withbothas sufficient to force dual output mode.getSavedPlatformSettingsnow passesboththrough unchanged (savedDestinations[platform]?.display ?? 'horizontal'), leaving LOE's incompatibility with dual streaming to be enforced at the point the display is actually used rather than at the point it's stored.TwitchService.beforeGoLivenow resolves the enhanced-broadcasting/dual-stream/LOE branch (via a newIPlatformService.setupLiveOutputStreamhook, implemented onTwitchServiceassetEnhancedBroadcasting(false)) before the stream-key write, so the decision applies to the stream that's actually starting.createEnhancedBroadcastMultistreamnow derives the display fromthis.views.getPlatformDisplayType('twitch')when dual output mode is active, falling back tohorizontalotherwise — reading the actual platform-to-display assignment instead of guessing from the ingest URL.streaming.ts's enhanced-broadcasting eligibility check adds!this.views.isStreamShiftModealongside the existing LOE check.The stream-shift Twitch sync now reads
this.state.settings.isEnhancedBroadcasting(the persisted user preference) instead of the OBS runtime flag, and resolvessettings.game_idto a name viathis.fetchGame()before assigning it togame/gameName, falling back to the existing channel info on fetch failure.GoLiveSettingsModule.prepopulatetakes an optional{ preserveCommonFields?: boolean }. When set, it snapshotscommonFieldsbefore the rebuild and restores the title/description afterward (editedCommonFields.title || this.state.commonFields.title, same for description).switchPlatformsis the only caller that passes it — every otherprepopulate()call site is a window open, where the freshly fetched values should win.Files changed:
app/components-react/windows/go-live/useGoLiveSettings.ts,app/services/platforms/index.ts,app/services/platforms/twitch.ts,app/services/streaming/streaming-view.ts,app/services/streaming/streaming.tsPerformance Implications
None materially. Most of this is reordering existing logic and replacing one indirection (
getValidatedDisplay) with an inline default — no new work on the hot path. The one addition is afetchGame()HTTP call during stream-shift settings sync, and only when the shifted stream reports agame_id; that sync already makes a Twitch API call in the samePromise.all, so this adds one more request to an already network-bound, infrequent (shift-triggered) path, not to Go Live or steady-state streaming.