IOS 10 AVPlayer will not transfer video with URL without extension and with video / mp 4 as content type

We are currently using standard AVPlayerthrough AVPlayerViewControllerfor video playback. We are transferring video from a URL in the format https: // ourdomain / media / mediaid? Jwt = authTokenHere . The URL, as you can see, has no extension; however, the headers are set to the payload to indicate that the response is a video.

HTTP response headers

Despite the fact that links lead to good video playback on the Safari and Chrome desktop, it will not play through iOS AVPlayerin our application. Is there any specific format that awaits AVPlayer?

+4
source share
2 answers

Good - in the end, finding the answer to this is multifaceted. Here is what I need to do to get everything working.

  • Files really needed extensions.
  • The server was not configured correctly. It should provide a progressive loading response, responding with a range of headers.

Updating our server to provide this answer. And add the correct extension to the video files, we will now go to AVPlayer, as expected. Thanks to everyone who offered advice!

+2
source

AVURLAsset . , , iOS 5, , , iOS 10.

:

AVURLAsset

AVURLAsset

WorkAround/Hack:

MIME , .

:

+1

Source: https://habr.com/ru/post/1663285/


All Articles