From cb48f3574ddf611dc3bdbc706a2734f49eac12eb Mon Sep 17 00:00:00 2001 From: Filipe Medeiros Date: Thu, 7 Oct 2021 23:43:48 +0100 Subject: [PATCH] feat: adds the option to toggle listen mode when watching a video (#508) * feat: adds the option to toggle listen mode when watching a video * feat: improve a11y * Change some logic. Co-authored-by: FireMaskterK <20838718+FireMasterK@users.noreply.github.com> --- src/components/WatchVideo.vue | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/components/WatchVideo.vue b/src/components/WatchVideo.vue index 07e695a6..fabfd3c1 100644 --- a/src/components/WatchVideo.vue +++ b/src/components/WatchVideo.vue @@ -53,6 +53,14 @@ > {{ $t("player.watch_on") }} LBRY + + +
@@ -122,7 +130,11 @@
- + {{ showRecs ? $t("actions.minimize_recommendations") : $t("actions.show_recommendations") }}
-
+
@@ -306,6 +318,11 @@ export default { }, }, computed: { + toggleListenUrl(_this) { + const url = new URL(window.location.href); + url.searchParams.set("listen", _this.getPreferenceBoolean("listen", false) ? "0" : "1"); + return url.href; + }, isEmbed(_this) { return String(_this.$route.path).indexOf("/embed/") == 0; },