简体   繁体   中英

Video not playing on iOS devices

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...

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.

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

尝试使用H.264编解码器将视频转换为mp4。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM