Skip to content

Add audio ownership and paused loading - #1067

Merged
natew merged 3 commits into
mainfrom
tm/oss-audio-ownership-minor-2026-10-27
Oct 28, 2026
Merged

natew merged 3 commits into
mainfrom
tm/oss-audio-ownership-minor-2026-10-27

Conversation

@natew

@natew natew commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

Audio ownership and paused loading

Managed players can claim the single Now Playing session, allowing apps to crossfade players while remote controls follow the current owner. The global player can prepare at a position while paused, without playing the opening. This prepares the package family for One 2.12.0.

await Audio.play(uri, { positionMs: 83_500, paused: true })
await Audio.resume()

const player = Audio.createPlayer(uri)
await player.setNowPlayingInfo({ title: 'Song' })

Ownership transfers on a new claim; cleanup only releases the matching owner. Replacing a managed player's source retains its claim. Apps control crossfade timing. Preparing a global player rejects if replaced or stopped; remote commands target the current owner.

Addresses #1065 and #1066.

Validation and remaining work

  • Three existing audio test files passed (18 tests).
  • Focused Chromium and WebKit runtime probes passed for paused and positioned loads, cancellation, ownership transfer, remote actions and late artwork.
  • Package typecheck passed after providing the existing generated declaration for the built CLI worker module.
  • Android :one:compileDebugKotlin passed on the final commit.
  • An earlier iOS simulator run passed paused loading and resume but crashed during ownership transfer. The fix has not yet been rebuilt or rerun: the original host stalled in Xcode build preparation, and an alternate host timed out after CocoaPods setup without an executable.
  • Before release, verify ownership transfer and remote play, pause and seek on physical iOS and Android devices, plus independent review and owner approval.

natew added 2 commits October 27, 2026 14:39
Validation: inherited work; independent checks pending.
Team-Machine-Session: r146738
Validation: existing audio tests passed; Chromium and WebKit ownership and paused-load probes passed. Package typecheck blocked by missing prebuilt CLI module.
Team-Machine-Session: r146738
@natew

natew commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator Author

iOS validation at 0c96b4a (studio-64, Xcode 27.1, SDK 27.1, fresh clone, arm64 simulator build):

  • PASS: fixture xcodebuild, BUILD SUCCEEDED. Host-only generated-file fixes: 2 fixture symlink rewrites (per next-checks), 2 CLinkage modulemap /Applications/Xcode.app to Xcode-27.1.app rewrites, -jobs 8 (full parallelism hit transient EPERM on external-volume ModuleCache). No PR source touched.
  • PASS: audio-ownership suite on iPhone 17 Pro simulator. Verdict: Ownership: passed: load:12000 resume:12742 replace:E_AUDIO_STATE clamp:60000 owner:true errors:removed,E_AUDIO_METADATA,E_AUDIO_ARTWORK. The ownership-transfer crash repair is now rebuilt and tested.
  • PASS: audio-remote suite (Now Playing metadata set/clear via Nitro, playback continues).
  • PASS: audio-interruption suite (began/ended notifications pause playback).
  • Note: simulator runtime is iOS 27.0; this host's iOS 27.1 runtime supports iPhone Duo only, and the suite targets iPhone 17 Pro geometry. Build used the 27.1 SDK.
  • UNVERIFIED (physical-device-only): lock-screen card continuity, stale-owner removal on device, remote play/pause/seek routing. The simulator cannot deliver remote-command events.

Evidence on studio-64: /Volumes/Studio-2TB/one-ios-1067/evidence/ios-{ownership,remote,interruption}/ (outcome.json + screenshots), full xcodebuild.log, results mirror at ~/.team-machine/evidence/one-audio-1067-ios-studio64/results.md. No readiness claimed; review and publication stay with the owner.

The PR adds the audio-ownership conformance fixture, so nativeCoverage.test.ts regenerates four COVERAGE.md rows (One.FileSystem, One.Audio, useAudioPlayer, useAudioPlayerStatus) with audio-ownership after audio-remote. This applies exactly the rows CI received in runs 40610344922 and 40610344837.

Team-Machine-Session: m65071
@natew
natew marked this pull request as ready for review October 28, 2026 03:28
@natew
natew enabled auto-merge October 28, 2026 03:28
@natew
natew merged commit 3f61c97 into main Oct 28, 2026
11 checks passed
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.

1 participant