热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

视频不能在Safari和iOS上运行-VideodoesnotworkonSafariandiOS

ImfacingtheproblemthatmyHTML5samplevideodoesntloadinSafari11onOSX,butworksperfec

I'm facing the problem that my HTML5 sample video doesn't load in Safari 11 on OSX, but works perfectly fine with Chrome and Firefox. Also, the video does not work on iOS in general (neither Safari nor Chrome).

我面临的问题是,我的HTML5示例视频在OSX上的Safari 11中没有加载,但是在Chrome和Firefox上运行得很好。此外,该视频在iOS中并不适用(无论是Safari还是Chrome)。

Here is the HTML:

HTML:


Yet, I don't think that the html is the problem, as I cannot even access the video on Safari with a direct link to the file. In case you want to try by yourself, here is the link: Placeholder video

但是,我不认为html是问题,因为我甚至不能访问Safari上的视频,直接链接到文件。如果你想自己尝试一下,这里有一个链接:占位符视频。

The app is programmed in Python 3 and Django 2. The video can neither be loaded by using the pythonanywhere page nor by my local Django development server.

该应用程序是用Python 3和Django 2编写的。该视频既不能通过使用pythonanywhere页面加载,也不能通过我的本地Django开发服务器加载。

I already searched Stack Overflow, but cannot not find a solution (e.g. question HTML5 Video tag not working in Safari , iPhone and iPad focuses much on the HTML and the video format, which I think are fine here).

我已经搜索了Stack Overflow,但是找不到一个解决方案(例如,HTML5视频标签在Safari、iPhone和iPad上都不太好用),我认为在这里可以很好地使用HTML和视频格式。

1 个解决方案

#1


1  

I could finally solve the issue (in a quite inelegant way though). Instead of linking to the file on pythonanywhere, I use github as a host and it works:

我终于可以解决这个问题了(虽然方式不太优雅)。我没有链接到pythonanywhere上的文件,而是使用github作为主机,它可以工作:

Does not work:

不工作:


Works:

工作原理:


I use exactly the same file and even the same github repository which I pull to pythonanywhere. One possible answer to that could be that pythonanywhere does not support HTTP byte-range requests (?)... well anyway, it works now...

我使用的是完全相同的文件,甚至是相同的github存储库,我将它拉到python的任何地方。一个可能的答案是,pythonanywhere不支持HTTP字节范围请求(?)……不管怎样,它现在起作用了…


推荐阅读
author-avatar
郭建将_683
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有