mirror of
https://onedev.site.tesses.net/tytd2025
synced 2026-02-08 17:45:45 +00:00
Fix downloader bug, use plink and add icon to plugin template
This commit is contained in:
2018
Tesses.YouTubeDownloader.Server/res/video-js.css
Normal file
2018
Tesses.YouTubeDownloader.Server/res/video-js.css
Normal file
File diff suppressed because one or more lines are too long
53
Tesses.YouTubeDownloader.Server/res/video.min.js
vendored
Normal file
53
Tesses.YouTubeDownloader.Server/res/video.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
43
Tesses.YouTubeDownloader.Server/src/pages/embed.tcross
Normal file
43
Tesses.YouTubeDownloader.Server/src/pages/embed.tcross
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
func Pages.VideoEmbed(id, name)
|
||||||
|
{
|
||||||
|
const css = "<style>
|
||||||
|
html,
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
</style>";
|
||||||
|
const html = <!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{name}</name>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="video-js.css">
|
||||||
|
<script src="video.min.js" defer></script>
|
||||||
|
/* thanks https://github.com/videojs/video.js/discussions/8156#discussioncomment-5098465 */
|
||||||
|
<raw(css)>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<video
|
||||||
|
id="my-video"
|
||||||
|
class="video-js"
|
||||||
|
controls
|
||||||
|
preload="auto"
|
||||||
|
poster={$"./api/v1/video-thumbnail?v={Net.Http.UrlEncode(id)}&res=default"}
|
||||||
|
data-setup='{"fill": true}'
|
||||||
|
>
|
||||||
|
<source src={$"./api/v1/download?v={Net.Http.UrlEncode(id)}&inline=true"} type="video/mp4" />
|
||||||
|
<p class="vjs-no-js">
|
||||||
|
To view this video please enable JavaScript, and consider upgrading to a
|
||||||
|
web browser that
|
||||||
|
<a href="https://videojs.com/html5-video-support/" target="_blank"
|
||||||
|
>supports HTML5 video</a
|
||||||
|
>
|
||||||
|
</p>
|
||||||
|
</video>
|
||||||
|
</body>
|
||||||
|
</html>;
|
||||||
|
return html;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user