Fix iOS WebRTC SDP processing, dual-path token refresh, and polish queue UI#273
Merged
Kief5555 merged 1 commit intokief5555/iosfrom Apr 12, 2026
Merged
Fix iOS WebRTC SDP processing, dual-path token refresh, and polish queue UI#273Kief5555 merged 1 commit intokief5555/iosfrom
Kief5555 merged 1 commit intokief5555/iosfrom
Conversation
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR ports full desktop WebRTC SDP manipulation (
fixServerIp,preferCodec,mungeAnswerSdp,buildNvstSdp) into the iOS streaming WebView to fix "internal error" handshakes, implements dual-path token refresh (client_token preferred, OAuth fallback) to keep sessions alive, skips the PrintedWaste zone picker for Alliance/BPC providers, and polishes the queue/streaming UI with Liquid Glass aesthetics.OpenNOWStore.swift:
mediaIpandmediaPorttoActiveSessionand extracted them fromusage == 1inconnectionInforefreshSessionto tryclient_tokengrant first (preferred), thenrefresh_tokenOAuth, renewing client tokens after each refreshGFNSignalingClientclass,connectSignalingIfNeeded,disconnectSignaling, and all signaling client state propertiesauthProviderCodefor BPC bypass checksStreamerView.swift:
settings: AppSettingsparameter and resolved stream profile (width/height/bitrate) from native screen bounds and FPSserverIp,mediaIp,mediaPort,preferredCodec,fps,maxBitrateKbps,width,heightfixServerIpto replace0.0.0.0in offer SDP with actual server IP (extracts dash-encoded hostnames)preferCodecto filter/reorderm=videopayload types for H265/H264/AV1 preference with "Auto" logicmungeAnswerSdpto injectb=ASfor video/audio andstereo=1on Opus fmtpbuildNvstSdpto construct the proprietarynvstSdppayload from answer credentials and stream paramsinjectManualIceto add the media endpoint as a host candidate usingmediaIp/mediaPortafter answer sendwaitForIceGatheringand extracted ICE credentials for nvstSdp constructionPrintedWasteQueueView.swift:
provider.code == "BPC"by callingscheduleLaunch(game, zoneUrl: nil)directly and dismissing the sheet.animation(.spring(response: 0.35), value: isLoading)for smooth spinner-to-content transition.interactiveDismissDisabled(isLoading)to prevent accidental dismissal during fetch"Launch Anyway"button in empty zones view to allow forcing launch.plainwithColor(.secondarySystemGroupedBackground).opacity(0.7)row backgrounds.presentationCornerRadius(32)and.presentationBackground(.regularMaterial)for premium modal feelContentView.swift:
store.settingstoStreamerView(session:settings:)for appSettings access.transaction { $0.animation = $0.animation?.delay(0.15) }toqueueOverlayVisiblefull screen cover to wait for launch sheet dismiss.shadow(color: brandAccent.opacity(0.12), radius: 8, y: 2)toQueueStatusPillfor subtle glass glowStreamLoadingView.swift:
Color(.systemBackground).ignoresSafeArea()for system-adaptive appearance.activestep circles inglassEffect(in: Circle())on iOS 26+ withbrandAccentstrokeglassEffect(in: Circle())on iOS 26+connectorGradientusingLinearGradientfrom completed/pending colors.primary/.secondaryfor adaptive coloringSettingsView.swift:
["Auto", "H264", "HEVC", "AV1"]to["Auto", "H264", "H265", "AV1"].scrollContentBackground(.hidden)and.background(appBackground)to NavigationStack.listRowBackground(Color(.secondarySystemGroupedBackground).opacity(0.75))to settings picker rows