Serving mp4 video to iPad

一曲冷凌霜 提交于 2019-12-04 13:14:47

Check what the live server is sending out for a mime header v.s. what your local one is. The live server may be sending application/octet-stream (or some other default type) instead of video/mp4. Browsers go by the supplied mime-type in the response headers for the most part, not the served up file extension.

Solution is a wrong Conten-Length header from the live-server. After fixing this problem it worked.

Collegue fixed server settings, so I don't know excactly what he did. Just that the lenght is now the same as on my local machine

If you are using the HTML5 along with a mp4 file. There should be no problems playing the file on your iPad.. the only thing left is to make sure the link is not broken and add this part to make further testing :

<video width="320" height="240" controls="controls">
  <source src="movie.mp4" type="video/mp4" />
  Your browser does not support the video tag. //add this line
</video>
r a f t

The web server serving the media files should also support 'Accept-Ranges' header. This is mentioned in another stackoverflow question which has a link to apple documentation.

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