#StackBounty: #ios #swift #avfoundation #avplayer Streaming video from https with AVPlayer causes initial delay

Bounty: 100

I am using AVPlayer to play a video from an https url with a setup this:

player = AVPlayer(url: URL(string: urlString))
player?.automaticallyWaitsToMinimizeStalling = false

But since the video is a little long, there is a short blank screen delay before the video actually starts to play. I think this is because it is being loaded from https.

Is there anyway to remove that delay by making AVPlayer play the video right away without loading the whole thing?

I added .automaticallyWaitsToMinimizeStalling but that does not seem to make a difference.

If anyone has any other suggestions please let me know.

Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.