Assistance Needed: CoreMediaErrorDomain Error -12971

Hello Apple Developer Community,

I am trying to play an HLS stream using the React Native Video player (underneath it's using AvPlayer). I am able to play the stream smoothly, but in some cases the player can not play the stream properly.

Behaviour:

react-native-video: I am getting the below error.

Error details from react-native-video player:

  • Error Code: -12971

  • Domain: CoreMediaErrorDomain

  • Localised Description: The operation couldn’t be completed. (CoreMediaErrorDomain error -12971.)

  • Target: 2457

The error does not provide a specific failure reason or recovery suggestion, which makes troubleshooting challenging.

AvPlayer on native iOS project: Video playback stopped after playing a few seconds.

AVPlayer configuration:

player.currentItem?.preferredForwardBufferDuration = 1
player.automaticallyWaitsToMinimizeStalling = true

N.B.: The same buffer duration is working perfectly for others.

Stream properties:

video resolution: 1280 x 720

I have attached an overview report generated from MediaStreamValidator.

I would appreciate any insights or suggestions on how to address this error. Has anyone in the community experienced a similar issue or have any advice on potential solutions?

Thank you for your help!

Assistance Needed: CoreMediaErrorDomain Error -12971
 
 
Q