I'm using AVPlayer to play a video. It is working as expected on iOS 15 but there's no audio on iOS 16. The video is playing without any interruption. It just the audio.
Used this code to make sure that phone isn't on silent mode.
do { try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: []) } catch { print("Setting category to AVAudioSessionCategoryPlayback failed.") }
Any help would be appreciated.