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-->
12<html lang="en">
13
14<head>
15 <meta charset="utf-8">
16 <meta name="viewport" content="width=device-width, initial-scale=1">
17 <title>{{ .Title }} - FixYouTube</title>
18 <link rel="canonical" href="https://www.youtube.com/watch?v={{ .VideoID }}" />
19 <meta property="og:url" content="https://www.youtube.com/watch?v={{ .VideoID }}" />
20 <meta property="theme-color" content="0000FF" />
21 <meta property="twitter:card" content="player" />
22 <meta property="twitter:site" content="{{ .Author }}" />
23 <meta property="twitter:creator" content="{{ .Author }}" />
24 <meta property="twitter:title" content="{{ .Title }}" />
25 <meta property="og:title" content="{{ .Title }}" />
26 <meta property="og:description" content="{{ .Description }}" />
27 <meta property="og:site_name" content="FixYouTube ({{ .Author }})" />
28 {{ if gt (len .VideoThumbnails) 0 }}
29 <meta property="twitter:image" content="{{ (index .VideoThumbnails 0).URL }}" />
30 {{ end }}
31 <meta property="twitter:player:stream:content_type" content="video/mp4" />
32 <meta property="og:video" content="/proxy/{{ .VideoID }}" />
33 <meta property="og:video:secure_url" content="/proxy/{{ .VideoID }}" />
34 <meta property="og:video:duration" content="{{ .LengthSeconds }}">
35 <meta property="og:video:type" content="video/mp4" />
36 <link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text fill=%22white%22 y=%22.9em%22 font-size=%2290%22>🛠</text></svg>">
37 <link rel="stylesheet" href="https://unpkg.com/@picocss/pico@latest/css/pico.min.css">
38</head>
39
40<body>
41 <main class="container" style="max-width: 35rem">
42 {{ if gt (len .FormatStreams) 0 }}
43 <video style="width: 100%" autoplay controls>
44 <source src="{{ (index .FormatStreams 0).URL }}" type="video/mp4" />
45 </video>
46 {{ end }}
47 <h2>{{ .Title }}</h2>
48 <h3>> <a href="https://www.youtube.com/{{ .AuthorURL }}" target="_blank">{{ .Author }}</a></h3>
49 <pre style="white-space: pre-wrap">{{ .DescriptionHTML }}</pre>
50 <a href="https://www.youtube.com/watch?v={{ .VideoID }}">Watch on YouTube</a>
51 <br />
52 <a href="/">What is this?</a>
53 <hr>
54 <section>
55 <small>
56 <a href="https://github.com/birabittoh/fixyoutube-go" target="_blank">Source code</a>
57 </small>
58 <br />
59 <small>• YouTube is a trademark of Google LLC. This app is not affiliated with Google LLC.</small>
60 </section>
61 </main>
62</body>
63
64</html>