【问题标题】:MP4 file stored with git lfs not playing in Github Pages使用 git lfs 存储的 MP4 文件无法在 Github Pages 中播放
【发布时间】:2020-11-27 01:03:29
【问题描述】:

我的存储库中有一个 mp4 文件,存储在 git lfs 中,我希望能够在我的网站上播放该文件。当我打开带有 github 页面的网站时,视频不可见。

有什么想法吗?

【问题讨论】:

  • 任何 HTML 代码?检查开发者控制台的 HTTP 响应。

标签: html css github-pages


【解决方案1】:

您可以看到git-lfs/git-lfs issue 1342 中提出的解决方法:“GitHub pages 提供参考文件而不是实际的二进制文件”

latest one(自 2019 年 2 月起):

https://media.githubusercontent.com/media/_Username_/_Project_/_Branch_/_Path_to_file_

您应该将所有 _UNDERSCORED_ 的东西替换为您的

本项目示例:labcesi-strasbourg/labcesi-strasbourg.github.io commit c53bd39

vrView.setContent({
    //image: 'V0050069.jpg',
    image: 'https://media.githubusercontent.com/media/labcesi-strasbourg/labcesi-strasbourg.github.io/master/V0050069.jpg',
    //preview:'/url/to/amazing-512.jpg',
    is_stereo: false
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-03-14
    • 2014-09-27
    • 2015-06-24
    • 2013-05-17
    • 1970-01-01
    • 1970-01-01
    • 2018-02-19
    相关资源
    最近更新 更多