Skip to content

fix: present the broadcast picker in portrait on phones lying on their side (DRO-3369) - #41

Merged
Timo972 merged 1 commit into
masterfrom
timo/dro-3369-portrait-broadcast-picker
Oct 15, 2026
Merged

Timo972 merged 1 commit into
masterfrom
timo/dro-3369-portrait-broadcast-picker

Conversation

@Timo972

@Timo972 Timo972 commented Oct 15, 2026

Copy link
Copy Markdown

Follow-up to #40, which made a failed broadcast start hand the foreground back but did not fix the failure itself.

Problem

On phones lying on their side (the BYOD host .88.200), every broadcast start failed with 408 ("the broadcast was confirmed but the extension did not connect in time").

FBBroadcastPickerHost hosted the picker in a window whose root view controller allowed every orientation, so the runner followed the device into landscape. SpringBoard then presented the Control Center "Screen Broadcast" sheet in landscape to match. The confirmation tap landed outside the "Start Broadcast" button, which dismisses the sheet. Evidence from …14DA001C (iOS 26.6.1):

  • syslog: broadcast/start: confirmation tapped after 1658ms, then nothing from replayd (no session start, no extension launch) until extension connect timeout after 31752ms
  • WDA screenshots during the dance: the landscape sheet with "Start Broadcast", then a blank runner right after the tap

On an upright phone the sheet and the tap mapping agree, which is why only sideways phones were affected. (Tapping through SpringBoard instead of the runner did not help: both mappings are wrong for a landscape sheet.)

Fix

The picker host gets a portrait-only root view controller, requests a portrait scene geometry (iOS 16+; attemptRotationToDeviceOrientation before that), and waits up to 2 s for the scene to turn before firing the picker. The sheet then appears exactly as on an upright phone.

Verification

  • Scripts/ci/build-real.sh (scheme WebDriverAgentRunnerTunnel): build succeeded, no new warnings.
  • Hardware, …14DA001C lying on its side (runs master + this commit): syslog Broadcast picker host rotated to portrait → confirmation tapped after 1901ms → extension connected after 5212ms, twice in a row (setup check + portal start). Broadcast connected, ReplayKit orientation 1, ~16 fps of frames arriving, SpringBoard PORTRAIT in front.

Not yet tested: a start while a landscape app is in front (e.g. Safari rotated). Portrait is forced only for the dance, and #40 restores that app afterwards.

Linear: DRO-3369

🤖 Generated with Claude Code

…r side

The picker host window used a plain view controller, so the runner
followed the device: on a phone lying on its side it came up in
landscape, and SpringBoard presented the Control Center broadcast sheet
in landscape to match. The confirmation tap then landed outside the
sheet's "Start Broadcast" button, dismissing the sheet instead, so
replayd never started a session and every start timed out with 408
(DRO-3369).

Pin the picker host to portrait (portrait-only root view controller,
scene geometry request on iOS 16+) and wait for the scene to turn
before firing the picker, so the sheet appears as on an upright phone.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Timo972
Timo972 merged commit 4f5b9a7 into master Oct 15, 2026
14 of 50 checks passed
@Timo972
Timo972 deleted the timo/dro-3369-portrait-broadcast-picker branch October 15, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants