AVPlayer audio issue on iOS 16

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.

Adding more details.Codecs: A-Law 2:1, H.264 Format: .mp4

This is working fine on iOS 15 not on iOS 16.

I might be facing a similar issue. After starting the iOS 16 simulator, my app won't play any sound until I turn on the mute button and turn it off again.

Similar issue using Wyze cameras. The recoded video is no longer playing audio with iOS 16. My understanding is the codec in iOS 16 changed and will not play audio formats that it used to.

Any updates on this? I'm experiencing the exact same issue. The sound works on ios 15.x and below, no sound on ios16 and ios16.1. On top of that, the UI controls are not shown on ios16 and above. My app is using swiftUI.

Any update on this issue? Did you find any workaround?

AVPlayer audio issue on iOS 16
 
 
Q