Reputation: 156
I have a web server written in Play Framework that servers video files through http request, and I am building a small IOS app that plays the video downloaded from the server.
let fileURL: NSURL? = NSURL(string: "video url")
player = AVPlayer(URL: fileURL!)
With above code, AVPlayer is able to play mp4 video from http://www.kolor.com/360-videos-files/noa-neal-graffiti-360-music-video-full-hd.mp4, however it does not play the same video that is returned from my own server. I do not see any error so far. (I downloaded the video from kolor.com and put it into my own server)
I did compare the http response headers of kolor.com and my own server when requesting the video, and I did make sure my server can deal with Ranged request so that my server is able to return specific range of the video. Currently chrome's own video player is able to play the video downloaded from my server(by typing in the video url directly in chrome's address bar), however I just can not make IOS AVPlayer working ...
Do I need any specific setup in my own server? Or I am missing something in the http header?
Following is a series of http request and response when the IOS app is requesting video from my server(ETag is a random string i choose, i add it because the http response from kolor.com also has this header):
Upvotes: 1
Views: 1475
Reputation: 156
Problem solved... I didnt return correct byte buffer length in video server for each subsequence byte range request from IOS
Upvotes: 0