How can I turn off the spatial audio effect when AVPlayer is playing in a window?

I use a AVplayer in a window view, I found that when I move the window to different positions, the default behavior is that the sound will change according to the window position. However, in some cases, I don't need this default behavior. I hope the sound doesn't change.

Answered by Vision Pro Engineer in 817284022

Hey @_rdy,

You can use AVAudioSessionSpatialExperience to define the types of spatial audio experiences that your application supports. You can set this using setIntendedSpatialExperience(_:).

Let me know if you have additional questions,
Michael

Accepted Answer

Hey @_rdy,

You can use AVAudioSessionSpatialExperience to define the types of spatial audio experiences that your application supports. You can set this using setIntendedSpatialExperience(_:).

Let me know if you have additional questions,
Michael

How can I turn off the spatial audio effect when AVPlayer is playing in a window?
 
 
Q