From 7dcbb1affa7bb7e89b11a56836e34555b84214e2 Mon Sep 17 00:00:00 2001 From: Korbs Date: Mon, 2 Dec 2024 19:14:23 -0500 Subject: [PATCH] Add Playback Rate function --- src/Controls.astro | 2 ++ src/Player.astro | 18 +++++++++++++++--- src/Styles/Index.scss | 5 +++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/Controls.astro b/src/Controls.astro index 5078afa..3ebde7d 100644 --- a/src/Controls.astro +++ b/src/Controls.astro @@ -4,6 +4,7 @@ const { Title, Live, ShowBackAndForward, + ShowPlaybackRate, SeekColor = '#2185d0', PlayerName, Subtitles @@ -72,6 +73,7 @@ import './Styles/Iconoir.css' {Subtitles ? : null} + {ShowPlaybackRate ? : null} diff --git a/src/Player.astro b/src/Player.astro index 8af40aa..d3902a4 100644 --- a/src/Player.astro +++ b/src/Player.astro @@ -14,6 +14,7 @@ const { Subtitles, ShowBackAndForward, + ShowPlaybackRate, BigPlayButton = false, YouTube = false, @@ -82,7 +83,7 @@ import './Styles/Iconoir.css' null } {SettingsMenu ? - +
@@ -91,7 +92,16 @@ import './Styles/Iconoir.css' : - + + } + {ShowPlaybackRate ? +
+ + + +
+ : + null } @@ -116,4 +126,6 @@ import './Styles/Iconoir.css' : null -} \ No newline at end of file +} + + \ No newline at end of file diff --git a/src/Styles/Index.scss b/src/Styles/Index.scss index 92c169a..852858d 100644 --- a/src/Styles/Index.scss +++ b/src/Styles/Index.scss @@ -337,6 +337,11 @@ } } +#playback-rate { + flex-direction: row; + min-width: 100px; +} + button#has-switch svg { width: 24px; } \ No newline at end of file