【发布时间】:2017-06-12 11:49:52
【问题描述】:
问题
我正在尝试从某个 URL 下载包含视频的整个 html 页面。然后我只是打印我下载的内容。在我的localhost 机器上一切正常。 但是当我尝试在托管服务器上运行我的代码时,我收到了这个错误:
VIDEOJS: ERROR: (CODE:4 MEDIA_ERR_SRC_NOT_SUPPORTED)
The media could not be loaded, either because the server or network
failed or because the format is not supported.
code: 4
问题
根据逻辑,如果它在 localhost 上工作,但在 Hosting 服务器上不 - 是 apache 配置问题还是什么?
任何帮助将不胜感激。
【问题讨论】:
-
检查您的 mime 类型,根据此答案:stackoverflow.com/questions/34800990/… 另外,请发布您的代码。
-
@MannfromReno,感谢您的回复。我只是使用此链接中的函数来获取数据 http://stackoverflow.com/questions/11363022/get-url-content-php 。我应该如何定义 mime 类型?
标签: javascript apache video html5-video