templates/video.html (view raw)
1<!DOCTYPE html>
2 ███████ ██ ██ ██ ██ ██ ███ ██ ██ ██████ ██ ██ ██████ ███████
3 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
4 █████ ██ ███ ████ ██ ██ ██ ██ ██ ██ ██ ██████ █████
5 ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
6 ██ ██ ██ ██ ██ ███ ███ ██ ███ ██████ ███████
7 ██
8 ██ A better way to embed YouTube videos on Telegram (inspired by FixTweet).
9 ██
10<html lang="en"><head>
11 <link rel="canonical" href="https://www.youtube.com/watch?v={{ .VideoId }}" />
12 <meta http-equiv="refresh" content="0;url=https://www.youtube.com/watch?v={{ .VideoId }}" />
13 <meta property="og:url" content="https://www.youtube.com/watch?v={{ .VideoId }}" />
14 <meta property="theme-color" content="0000FF" />
15 <meta property="twitter:card" content="player" />
16 <meta property="twitter:site" content="{{ .Uploader }}" />
17 <meta property="twitter:creator" content="{{ .Uploader }}" />
18 <meta property="twitter:title" content="{{ .Title }}" />
19 <meta property="og:title" content="{{ .Title }}" />
20 <meta property="og:description" content="{{ .Description }}" />
21 <meta property="og:site_name" content="FixYouTube ({{ .Uploader }})" />
22 <meta property="twitter:image" content="0" />
23 <meta property="twitter:player:stream:content_type" content="video/mp4" />
24 {{ if .Url }}
25 <meta property="og:video" content="/proxy/{{ .VideoId }}" />
26 <meta property="og:video:secure_url" content="/proxy/{{ .VideoId }}" />
27 <meta property="og:video:duration" content="{{ .Duration }}">
28 <meta property="og:video:type" content="video/mp4" />
29 {{ end }}
30</head><body></body></html>