You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Non-Twitch destinations could open the Go Live window in unprotected mode.
A custom server of auto was not treated as Twitch.isTwitchStreamDestination() rejected an rtmp_custom destination whose server is auto, so it never counted as an unprotected Twitch stream.
Unprotected Twitch was keyed on the primary platform.
The Go Live window's feature cards showed in unprotected mode.
Fixes
StartStreamingButton.tsx: unprotected mode is decided first, before any other check.
stream-destination.ts: an rtmp_custom server equal to auto (trimmed, case-insensitive) counts as a Twitch destination.
streaming-view.tsisTwitchUnprotectedStream: checks isPlatformLinked('twitch') instead of isPrimaryPlatform('twitch'). The Twitch title/game flow only needs a linked Twitch account. In unprotected mode the Go Live window lists only Twitch (PlatformSettings.validEnabledPlatforms), and its primary-chat value falls back to the enabled platform, so nothing there depends on Twitch being primary.
streaming-view.tsshowFeatureToggleCards: now also checks for protectedModeEnabled.
Tests:
twitch-stream-destination.ts: the unresolved automatic selection case (rtmp_custom + auto) now expects twitch: true.
settings/streaming.ts ("Populates stream settings after go live"): switching a custom ingest to Streaming Services now expects the stream key to be cleared, matching OSN's saveStreamSettings().
twitch.ts ("Migrate the twitch account to the protected mode"): ends the stream with stopStream() and corrects the assertion for "Use recommended settings" is not shown after migration.
Negligible, and slightly net-positive. isPlatformLinked is a property lookup on the auth platforms map, the same cost as the isPrimaryPlatform comparison it replaces, and the auto check is one string comparison before the existing URL parse.
This direct service method call performs synchronous IPC from the React renderer and can block the UI while the worker responds. Because this predicate needs the result, make shouldShowGoLiveWindow asynchronous, await StreamSettingsService.actions.return.isSafeToModifyStreamKey(), and await the predicate in handleToggleStreaming.
This comment reverses the actual transition: the form starts in Custom Streaming Server mode, and the next line switches it to Streaming Services. Correcting the direction will keep the test narrative aligned with the behavior.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes for Unprotected Mode, mostly for Twitch
Issues
autowas not treated as Twitch.isTwitchStreamDestination()rejected anrtmp_customdestination whose server isauto, so it never counted as an unprotected Twitch stream.Fixes
StartStreamingButton.tsx: unprotected mode is decided first, before any other check.stream-destination.ts: anrtmp_customserver equal toauto(trimmed, case-insensitive) counts as a Twitch destination.streaming-view.tsisTwitchUnprotectedStream: checksisPlatformLinked('twitch')instead ofisPrimaryPlatform('twitch'). The Twitch title/game flow only needs a linked Twitch account. In unprotected mode the Go Live window lists only Twitch (PlatformSettings.validEnabledPlatforms), and its primary-chat value falls back to the enabled platform, so nothing there depends on Twitch being primary.streaming-view.tsshowFeatureToggleCards: now also checks forprotectedModeEnabled.Tests:
twitch-stream-destination.ts: theunresolved automatic selectioncase (rtmp_custom+auto) now expectstwitch: true.settings/streaming.ts("Populates stream settings after go live"): switching a custom ingest to Streaming Services now expects the stream key to be cleared, matching OSN'ssaveStreamSettings().twitch.ts("Migrate the twitch account to the protected mode"): ends the stream withstopStream()and corrects the assertion for "Use recommended settings" is not shown after migration.Files changed:
app/components-react/root/StartStreamingButton.tsx,app/services/streaming/stream-destination.ts,app/services/streaming/streaming-view.ts,test/regular/settings/streaming.ts,test/regular/streaming/twitch-stream-destination.ts,test/regular/streaming/twitch.tsPerformance Implications
Negligible, and slightly net-positive.
isPlatformLinkedis a property lookup on the auth platforms map, the same cost as theisPrimaryPlatformcomparison it replaces, and theautocheck is one string comparison before the existing URL parse.