templates/video.html (view raw)
1<!DOCTYPE html>
2<!--
3███████ ██ ██ ██ ██ ██ ███ ██ ██ ██████ ██ ██ ██████ ███████
4██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
5█████ ██ ███ ████ ██ ██ ██ ██ ██ ██ ██ ██████ █████
6██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
7██ ██ ██ ██ ██ ███ ███ ██ ███ ██████ ███████
8██
9██ A better way to embed YouTube videos on Telegram (inspired by FixTweet).
10██ -->
11<html lang="en">
12
13<head>
14 <link rel="canonical" href="https://www.youtube.com/watch?v={{ .VideoID }}" />
15 {{ if not .Debug }}
16 <meta http-equiv="refresh" content="0;url=https://www.youtube.com/watch?v={{ .VideoID }}" />
17 {{ end }}
18 <meta charset="utf-8">
19 <meta name="viewport" content="width=device-width, initial-scale=1">
20 <meta property="og:url" content="https://www.youtube.com/watch?v={{ .VideoID }}" />
21 <meta property="theme-color" content="0000FF" />
22 <meta property="twitter:card" content="player" />
23 <meta property="twitter:site" content="{{ .Uploader }}" />
24 <meta property="twitter:creator" content="{{ .Uploader }}" />
25 <meta property="twitter:title" content="{{ .Title }}" />
26 <meta property="og:title" content="{{ .Title }}" />
27 <meta property="og:description" content="{{ .Description }}" />
28 <meta property="og:site_name" content="GoTube ({{ .Uploader }})" />
29 <meta property="twitter:image" content="{{ .Thumbnail }}" />
30 <meta property="twitter:player:stream:content_type" content="video/mp4" />
31 {{ if .VideoURL }}
32 <meta property="og:video" content="{{ .VideoURL }}" />
33 <meta property="og:video:secure_url" content="{{ .VideoURL }}" />
34 <meta property="og:video:duration" content="{{ .Duration }}">
35 <meta property="og:video:type" content="video/mp4" />
36 {{ end }}
37</head>
38
39<body style="background-color: black;">
40 {{ if .VideoURL }}
41 <video style="display: block; margin: auto; width: 100%; max-width: 960px;" autoplay controls>
42 <source src="{{ .VideoURL }}" type="video/mp4" />
43 </video>
44 {{ end }}
45</body>
46
47</html>