Mp4 downloading instead of playing in Safari

会有一股神秘感。 提交于 2019-12-02 14:39:23

问题


I am facing a wierd issue in iOS devices. I am using a flowplayer which has mp4 file working in desktops. When it comes to iphone and ipad, the video is not playing. The same file taken from (http://techslides.com/demos/sample-videos/small.mp4) is opening in browser but when uploaded to my server is not playing.

I tried to troublehsoot with Mac Safari. The file at internet location is playing in browser but the same file uploaded to my server is getting downloaded.

I doubt there is something wrong with headers in request or respose. Any help ?


回答1:


Okay, I got the answer. My server does nt have the MIME type for mp4 and it was serving the video as application/octet.. I changed to video/mp4 and it worked :)



来源:https://stackoverflow.com/questions/27296898/mp4-downloading-instead-of-playing-in-safari

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!