我有一个index.html 文件,其中包含 <video>
元素(存储在 Git LFS 中)设置为背景,但是 GitHub 页面最近停止加载它 - 它在几周前才工作。控制台中也没有问题。
在本地服务器上,它可以在任何浏览器中按预期工作,而且所有更改都已推送到 git。
有人遇到过类似的问题并且知道如何解决吗?
<!-- The video -->
<video id="background-video" autoplay muted loop playsinline >
<source src="assets/animation/star_burst.mp4" type="video/mp4">
<source src="assets/animation/star_burst.mov" type="video/mov">
<source src="assets/animation/star_burst.mp4" type="video/webm">
</video>
Link to the file如果有帮助的话。
谢谢
最佳答案
您的文件几周前还可以使用,但现在已移至 Git Large File Storage这意味着 assets/animation/star_burst.mp4
现在是一个指向存储位置的文本文件。
尝试指定直接访问链接。类似于 https://media.githubusercontent.com/media/AnnaxT/AnnaxT.github.io/main/assets/animation/star_burst.mp4 .
您可以通过点击 https://github.com/AnnaxT/AnnaxT.github.io/blob/main/assets/animation/star_burst.mp4 上的“查看原始数据”按钮来获取它。
或者只上传较小的较大文件。
关于html - Github Pages 不会从 Git LFS 加载视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70586128/