aboutsummaryrefslogtreecommitdiffstats
path: root/youtube/templates/embed.html
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-12-19 22:13:37 -0500
committerJesús <heckyel@hyperbola.info>2020-12-19 22:13:37 -0500
commit1de9ae424573e3b0aed1bad68067430dd1baa357 (patch)
tree1ad2cd14d4e5bca2132a7e0d5f7eb795ee442fd6 /youtube/templates/embed.html
parentafb2aca4609d554858e4e669409f7c30afdc7e63 (diff)
downloadyt-local-1de9ae424573e3b0aed1bad68067430dd1baa357.tar.lz
yt-local-1de9ae424573e3b0aed1bad68067430dd1baa357.tar.xz
yt-local-1de9ae424573e3b0aed1bad68067430dd1baa357.zip
Patch-import-migrate: Add embed page for embeds on the web
Issue #36 From e51f0a78c778a2283887db7ffc22421a7c849296 Mon Sep 17 00:00:00 2001 From: James Taylor <user234683@users.noreply.github.com>
Diffstat (limited to 'youtube/templates/embed.html')
-rw-r--r--youtube/templates/embed.html35
1 files changed, 35 insertions, 0 deletions
diff --git a/youtube/templates/embed.html b/youtube/templates/embed.html
new file mode 100644
index 0000000..728791b
--- /dev/null
+++ b/youtube/templates/embed.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html lang="es">
+ <head>
+ <meta charset="UTF-8"/>
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
+ <meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-inline'; media-src 'self' https://*.googlevideo.com; {{ "img-src 'self' https://*.googleusercontent.com https://*.ggpht.com https://*.ytimg.com;" if not settings.proxy_images else "" }}"/>
+ <title>{{ title }}</title>
+ <link href="/youtube.com/static/favicon.ico" type="image/x-icon" rel="icon"/>
+ <style>
+ body {
+ margin: 0rem;
+ padding: 0rem;
+ }
+ video {
+ width: 100%;
+ height: auto;
+ }
+ </style>
+ </head>
+ <body>
+ <video controls autofocus onmouseleave="{{ title }}"
+ oncontextmenu="{{ title }}" onmouseenter="{{ title }}" title="{{ title }}">
+ {% for video_source in video_sources %}
+ <source src="{{ video_source['src'] }}" type="{{ video_source['type'] }}">
+ {% endfor %}
+ {% for source in subtitle_sources %}
+ {% if source['on'] %}
+ <track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}" default>
+ {% else %}
+ <track label="{{ source['label'] }}" src="{{ source['url'] }}" kind="subtitles" srclang="{{ source['srclang'] }}">
+ {% endif %}
+ {% endfor %}
+ </video>
+ </body>
+</html>