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
  • 788
  • 1
  • 8
  • 29

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
  • 532
  • 9
  • 21