Safari上的HTML5视频问题 [英] HTML5 video problems on Safari

查看:269
本文介绍了Safari上的HTML5视频问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到的问题是,视频无法在Safari中运行,但可以与Chrome和Firefox完美配合.

I'm have the problem that video doesn't work in Safari, but works perfectly fine with Chrome and Firefox.

<video controls muted preload="none" playsinline src="/path/to/video" type="video/mp4"/>

获取fom VLC编解码器信息:

Get fom VLC codec informations:

视频h.264/mpeg-4 avc

video h.264/mpeg-4 avc

音频mpeg aac音频mp4a

audio mpeg aac audio mp4a

推荐答案

这确实是Safari中的错误*(至少12.0.2),该错误*不接受获取此

This is indeed a bug* in Safari (at least 12.0.2), which doesn't accept to fetch this 300MB video as a single Request from the MediaElement.
They try desperately to make a Range request, but your host doesn't allow such requests. You can see it by trying to seek in the video while not fully loaded in other browsers.

您可以通过

*尽管我发现为iOS托管媒体文件的HTTP服务器必须支持字节范围请求",因此,对于iOS,但是它们对台式机的约束可能相同.但是它们不支持非范围请求,无论如何都听起来像是一个错误,因为它违反了规范.

*Though I found this link which says that "HTTP servers hosting media files for iOS must support byte-range requests", so it is for iOS, but they probably have the same constraints for desktop. But that they do not support non-range requests sounds like a bug anyway as it goes against the specs.

这篇关于Safari上的HTML5视频问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆