From aa3e5aa441b79a471f96080501c114fd9ad34ba5 Mon Sep 17 00:00:00 2001 From: James Taylor Date: Sun, 28 Jun 2020 17:52:24 -0700 Subject: Add dialog for copying urls to external player for livestreams Also for livestreams which are over whose other sources aren't present or aren't ready yet. --- youtube/templates/watch.html | 30 ++++++++++++++ youtube/watch.py | 19 ++++++++- youtube/yt_data_extract/__init__.py | 2 +- youtube/yt_data_extract/watch_extraction.py | 62 ++++++++++++++++++++++++----- 4 files changed, 101 insertions(+), 12 deletions(-) (limited to 'youtube') diff --git a/youtube/templates/watch.html b/youtube/templates/watch.html index c722115..04f963d 100644 --- a/youtube/templates/watch.html +++ b/youtube/templates/watch.html @@ -27,6 +27,27 @@ transform: translate(-50%, -50%); } + .live-url-choices{ + height: 360px; + width: 640px; + grid-column: 2; + background-color: var(--video-background-color); + padding: 25px 0px 0px 25px; + } + .live-url-choices ol{ + list-style: none; + padding:0px; + margin:0px; + margin-top: 15px; + } + .live-url-choices input{ + width: 400px; + } + .url-choice-label{ + display: inline-block; + width: 150px; + } + {% if theater_mode %} video{ grid-column: 1 / span 5; @@ -296,6 +317,15 @@ Reload without invidious (for usage of new identity button). {% endif %} + {% elif (video_sources.__len__() == 0 or live) and hls_formats.__len__() != 0 %} +
+ Copy a url into your video player: +
    + {% for fmt in hls_formats %} +
  1. {{ fmt['video_quality'] }}:
  2. + {% endfor %} +
+
{% else %}