0

I want to play video media file from url in my application but its required to add authorization token in header. Is there any way handle that? I using SwiftUI and support iOS 14 and above.

Expiredmind
  • 758
  • 1
  • 8
  • 26

1 Answers1

0

Use the AVPlayerItem constructor instead of the url string constructor, and follow the steps to add headers to an AVPlayerItem laid out in this answer.

TheLivingForce
  • 449
  • 8
  • 19