https://developer.apple.com/documentation/visionos/capturing-video-from-your-visionos-device
Starting with iOS 17.2, AirPlay Receiver features and settings have been added, allowing you to stream Vision Pro content, as described in the description.
It is assumed that the user can display the screen mirroring menu from the control panel and start the process.
Post
Replies
Boosts
Views
Activity
This implementation is achieved by setting the view as an attachment of Entity.
The way it is written may have changed depending on the version of Xcode beta, but I believe the same approach can be used.
https://github.com/satoshi0212/visionOS_30Days/blob/main/Day28/Day28/View/ImmersiveView.swift