I created a minimal sample project that reproduces a microphone issue with nearby SharePlay / Window Sharing on Apple Vision Pro.
Sample project: https://github.com/JerryNee/mic-demo
Screen recording: https://youtu.be/aMj_A_leJWU
Issue
I first implemented SharePlay through FaceTime and found that local microphone capture was unavailable. That seemed understandable because FaceTime itself uses the microphone. I then moved the app to a nearby SharePlay / Window Sharing session specifically to avoid a FaceTime call, but local microphone capture still fails.
Local microphone capture works before starting nearby SharePlay. After starting a nearby SharePlay / Window Sharing session with GroupActivities, the same app fails at:
try audioEngine.start()
This does not require a FaceTime call. It happens with an in-room nearby SharePlay / Window Sharing session.
The screen recording also goes silent when the Share Window UI appears. I checked the MP4 audio track with ffmpeg silencedetect; audio becomes silent at about 00:00:22.60, matching the moment nearby sharing starts:
silence_start: 22.600612
silence_end: 55.051927 | silence_duration: 32.451315
Environment
- Two nearby Apple Vision Pro devices
- Xcode device list: visionOS 27.0 and visionOS 26.5
- Xcode 27.0, build 27A5194q
- Frameworks:
GroupActivities,AVFoundation,Speech - Entitlement:
com.apple.developer.group-session - Microphone and speech recognition permissions granted
Steps
- Run the sample on Apple Vision Pro.
- Tap Start Listening and speak. Transcription works.
- Tap Stop Listening.
- Tap Start Nearby Session.
- Share with another nearby Apple Vision Pro.
- Tap Start Listening again while the nearby session is active.
audioEngine.start()fails. Ending the nearby session makes microphone capture work again.
Minimal microphone code
let recognizer = SFSpeechRecognizer()
let audioEngine = AVAudioEngine()
let request = SFSpeechAudioBufferRecognitionRequest()
request.shouldReportPartialResults = true
let session = AVAudioSession.sharedInstance()
try session.setCategory(.record, mode: .measurement, options: [.duckOthers])
try session.setActive(true)
let input = audioEngine.inputNode
let format = input.outputFormat(forBus: 0)
input.installTap(onBus: 0, bufferSize: 1024, format: format) { buffer, _ in
request.append(buffer)
}
audioEngine.prepare()
try audioEngine.start()
Minimal nearby SharePlay code
struct MicDemoActivity: Codable, GroupActivity, Transferable {
static let activityIdentifier = "com.example.mic-demo.nearby-mic-repro"
static var transferRepresentation: some TransferRepresentation {
CodableRepresentation(contentType: .micDemoActivity)
}
var metadata: GroupActivityMetadata {
var metadata = GroupActivityMetadata()
metadata.type = .generic
metadata.title = "Mic Demo Nearby Session"
return metadata
}
}
for await session in MicDemoActivity.sessions() {
session.join()
}
_ = try await MicDemoActivity().activate()
Questions
- Is local microphone capture expected to be unavailable during a nearby SharePlay / Window Sharing session?
- Is screen recording audio expected to become silent during nearby sharing?
- What is the recommended way to support nearby shared UI/state while still allowing local voice input?