all repos — fixyoutube-go @ ff7eee7343ccb174a5e966f88533d101e0a7e5dc

A better way to embed YouTube videos everywhere (inspired by FixTweet).

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 property="theme-color" content="0000FF" />
13    <meta property="twitter:card" content="player" />
14    <meta property="twitter:site" content="{{ .Uploader }}" />
15    <meta property="twitter:creator" content="{{ .Uploader }}" />
16    <meta property="twitter:title" content="{{ .Title }}" />
17    <meta http-equiv="refresh" content="0;url=https://www.youtube.com/watch?v={{ .VideoId }}" />
18    <meta property="og:url" content="https://www.youtube.com/watch?v={{ .VideoId }}" />
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    <meta property="twitter:player:height" content="{{ .Height }}" />
25    <meta property="twitter:player:width" content="{{ .Width }}" />
26    <meta property="og:video" content="/proxy/{{ .VideoId }}" />
27    <meta property="og:video:secure_url" content="/proxy/{{ .VideoId }}" />
28    <meta property="og:video:height" content="{{ .Height }}" />
29    <meta property="og:video:width" content="{{ .Width }}" />
30    <meta property="og:video:duration" content="{{ .Duration }}">
31    <meta property="og:video:type" content="video/mp4" />
32</head><body></body></html>