git 是否可以在 github 页面上嵌入视频?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/8284560/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 06:12:03  来源:igfitidea点击:

is it possible to embed videos on a github page?

gitgithub

提问by daydreamer

I am doing machine learning course offered this fall online by Stanford. I have been doing all exercises and downloading the content and videos.

我正在做斯坦福今年秋季在线提供的机器学习课程。我一直在做所有练习并下载内容和视频。

I uploaded the videos, content and material online so that I can access it from anywhere and others can view it too

我将视频、内容和材料上传到网上,以便我可以从任何地方访问,其他人也可以查看

They are available here

它们在这里可用

Question:

题:

When I upload videos, they are in mp4 format and compressed when uploaded. is it possible to watch video on github page without downloading them?

当我上传视频时,它们是 mp4 格式并在上传时被压缩。是否可以在不下载的情况下在 github 页面上观看视频?

采纳答案by Kissaki

After navigating the source view to a video file you can use the rawlink to get a direct link to the file itself. You can use this link to embed it into a webpage or player.

将源视图导航到视频文件后,您可以使用原始链接获取文件本身的直接链接。您可以使用此链接将其嵌入到网页或播放器中。

With githubs pages, which you can activate in the projects (repositories) settings, you can create webpages and thus also embed these videos.

使用可以在项目(存储库)设置中激活的 githubs 页面,您可以创建网页,从而也可以嵌入这些视频。

If by “on github page” you are referring to the repositories page on github, you have 2 option:

如果通过“在 github 页面”您指的是 github 上的存储库页面,您有 2 个选项:

Using a README file so it displays on the default source-view page. I don't think you can embed videos there, but you can check the allowed syntax at https://github.com/github/markup#readme

使用 README 文件,使其显示在默认的源代码视图页面上。我不认为你可以在那里嵌入视频,但你可以在https://github.com/github/markup#readme检查允许的语法

The second option is to create wiki pages, which are also integrated into the github pages. It also features the different markup styles. But neither do I think you can embed them there.

第二个选项是创建 wiki 页面,这些页面也集成到 github 页面中。它还具有不同的标记样式。但我也不认为你可以将它们嵌入那里。

So you best bet, IMO, is to activate github pages for your repository and add some HTML files/pages with the embedded videos. You could then link to them via your README which is displayed on your repositories default entry page, the bottom of the source-view.

因此,IMO 最好的办法是为您的存储库激活 github 页面,并添加一些带有嵌入视频的 HTML 文件/页面。然后,您可以通过您的自述文件链接到它们,该自述文件显示在您的存储库默认条目页面(源代码视图的底部)上。