From 742bd7a602e5de3b808c8a3af757cd044e118e7e Mon Sep 17 00:00:00 2001 From: Micheline Wu <69046953+michelinewu@users.noreply.github.com> Date: Thu, 4 Dec 2025 16:51:28 -0500 Subject: [PATCH 1/2] Fix updating enhanced broadcasting status with dual stream and multistream. --- .../platforms/TwitchEditStreamInfo.tsx | 43 ++++++++----------- app/services/platforms/twitch.ts | 7 +-- 2 files changed, 23 insertions(+), 27 deletions(-) diff --git a/app/components-react/windows/go-live/platforms/TwitchEditStreamInfo.tsx b/app/components-react/windows/go-live/platforms/TwitchEditStreamInfo.tsx index 67305ec6b977..e6ee5a48b7b2 100644 --- a/app/components-react/windows/go-live/platforms/TwitchEditStreamInfo.tsx +++ b/app/components-react/windows/go-live/platforms/TwitchEditStreamInfo.tsx @@ -17,38 +17,33 @@ import cx from 'classnames'; export function TwitchEditStreamInfo(p: IPlatformComponentParams<'twitch'>) { const twSettings = p.value; + // We always pass this into TwitchEditStreamInfo + const enabledPlatformsCount = p.enabledPlatformsCount!; function updateSettings(patch: Partial) { p.onChange({ ...twSettings, ...patch }); } + const enhancedBroadcastingEnabled = useMemo(() => { + if (twSettings?.display === 'both') { + return true; + } - const isDualStream = useMemo(() => { - return twSettings?.display === 'both' && p.isDualOutputMode; - }, [p.isDualOutputMode, twSettings?.display]); + if (enabledPlatformsCount > 1) { + return false; + } - const multiplePlatformEnabled = useMemo(() => { - if (!p.enabledPlatformsCount) return false; - return p.enabledPlatformsCount > 1; - }, [p.enabledPlatformsCount, isDualStream]); + return twSettings?.isEnhancedBroadcasting; + }, [twSettings, enabledPlatformsCount]); + const enhancedBroadcastingTooltipText = p.isDualOutputMode + ? $t( + 'Enhanced broadcasting in dual output mode is only available when streaming to both the horizontal and vertical displays in Twitch', + ) + : $t( + 'Enhanced broadcasting automatically optimizes your settings to encode and send multiple video qualities to Twitch. Selecting this option will send basic information about your computer and software setup.', + ); const bind = createBinding(twSettings, updatedSettings => updateSettings(updatedSettings)); - const enhancedBroadcastingTooltipText = useMemo(() => { - return p.isDualOutputMode - ? $t( - 'Enhanced broadcasting in dual output mode is only available when streaming to both the horizontal and vertical displays in Twitch', - ) - : $t( - 'Enhanced broadcasting automatically optimizes your settings to encode and send multiple video qualities to Twitch. Selecting this option will send basic information about your computer and software setup.', - ); - }, [p.isDualOutputMode]); - - const enhancedBroadcastingEnabled = useMemo(() => { - if (isDualStream) return true; - if (multiplePlatformEnabled) return false; - return twSettings?.isEnhancedBroadcasting; - }, [isDualStream, multiplePlatformEnabled, twSettings?.isEnhancedBroadcasting]); - const optionalFields = (
@@ -69,7 +64,7 @@ export function TwitchEditStreamInfo(p: IPlatformComponentParams<'twitch'>) { label={$t('Enhanced broadcasting')} tooltip={enhancedBroadcastingTooltipText} {...bind.isEnhancedBroadcasting} - disabled={isDualStream || multiplePlatformEnabled} + disabled={twSettings?.display === 'both' || enabledPlatformsCount > 1} value={enhancedBroadcastingEnabled} /> Date: Thu, 4 Dec 2025 17:23:09 -0500 Subject: [PATCH 2/2] Remove console logs. --- app/services/platforms/twitch.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/app/services/platforms/twitch.ts b/app/services/platforms/twitch.ts index 2540f63b495c..e24e5d99b580 100644 --- a/app/services/platforms/twitch.ts +++ b/app/services/platforms/twitch.ts @@ -232,9 +232,7 @@ export class TwitchService if (channelInfo) { if (channelInfo?.display === 'both') { - console.log('channelInfo.isEnhancedBroadcasting:', channelInfo.isEnhancedBroadcasting); try { - console.log('Has goLiveSettings, setting up dual stream for Twitch'); await this.setupDualStream(goLiveSettings); } catch (e: unknown) { console.error('Error setting up dual stream:', e); @@ -249,7 +247,6 @@ export class TwitchService } else if (this.streamingService.views.isTwitchDualStreaming) { // Failsafe to guarantee that enhanced broadcasting is enabled if dual streaming is active try { - console.log('Does not have goLiveSettings, setting up dual stream for Twitch'); await this.setupDualStream(goLiveSettings); } catch (e: unknown) { console.error('Error setting up dual stream:', e);