3

I have created a web service for listing all videos of a user, I used Django and Django Rest Framework to create the web service. The URL of video is like this:

http://example.com/media/2015/04/uploadedFile_e0pmVxB.mov.

Following is the response from web service:

{
    "status": 1,
    "message": "successful",
    "result": [
        {
            "user_id": 17,
            "receiver_id": 27,
            "video": "/media/2015/04/uploadedFile_e0pmVxB.mov",
            "thumbnail": "/media/thumbnails/844702.jpeg",
            "timestamp": "2015-04-23 09:02:27"
        }
    ]
}

This video URL is working in Android devices, browsers but not in iOS devices. I have tried using different players in iOS, used different video codecs, still it's not working. What is missing here and is there anything that i have to do in the web service?

Any help is appreciated...

aumo
  • 5,344
  • 22
  • 25
Vishnu
  • 324
  • 1
  • 3
  • 17

3 Answers3

1

Django cannot stream video files directly, which iOS requires in order to play them. You need to make sure that your proxy server (Nginx/Apache) is handling the media directory.

iOS will send a Range header, so only part of the file is requested. Because Django will ignore this, it will usually not allow the video to be played.

Kevin Brown-Silva
  • 40,873
  • 40
  • 203
  • 237
  • I didnt get what you try to explain,this video is working for andriod devices which is accessed from same media folder(So apache should be handling meida directory).So what should i do make it working.Please explain this. – Vishnu Apr 23 '15 at 10:46
  • 1
    This answer would apply if you weren't using Apache to serve the media folder. You didn't mention whether or not you were, but I guess this answer doesn't apply to you specifically. It does apply to others though, as it's a common issue. – Kevin Brown-Silva Apr 23 '15 at 18:32
1

The problem is media files is not served by apache server.Try by changing your configuration.

Refer :Exception happened during processing of request from IOS Device

Community
  • 1
  • 1
-3

Try to convert your video to mp4 with an H.264 codec.

Joe T. Boka
  • 6,554
  • 6
  • 29
  • 48