html - 使用 git lfs 存储的 MP4 文件无法在 Github Pages 中播放
问题描述
我的存储库中有一个 mp4 文件,存储在 git lfs 中,我希望能够在我的网站上播放该文件。当我打开带有 github 页面的站点时,视频不可见。
任何想法发生了什么?
解决方案
您可以在git-lfs/git-lfs issue 1342中看到建议的解决方法:“GitHub pages serving the reference file instead of the actual binary”
最新的(从 2019 年 2 月开始):
https://media.githubusercontent.com/media/_Username_/_Project_/_Branch_/_Path_to_file_
你应该把所有的
_UNDERSCORED_
东西都换成你的
此项目中的示例:labcesi-strasbourg/labcesi-strasbourg.github.io
提交 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
});
推荐阅读
- php - 从 PHP stdClass 获取属性名称
- android - Android Studio:无法解析符号“RequestConfiguration”
- python - 文件夹组织程序的Python列表索引超出范围错误
- javascript - 从嵌套对象创建时设置外键
- javascript - 一个参数有闭包,另一个参数是从承诺返回的函数?
- jenkins - 将变量添加到 Jenkinsfile 中的 dockerfile{} 部分以启用 docker_buildkit
- node.js - 如何从 react.js 应用程序运行 nodemailer + gmail API 脚本?
- python-3.x - Selenium.NoSuchElementException
- math - 如何在数学中定义一个使用复杂递归关系的函数?
- python - 为什么非常简单的 PyTorch LSTM 模型不学习?