From 6d405d78b6386bf160178a17211b0e4f594f7088 Mon Sep 17 00:00:00 2001 From: Korbs Date: Sat, 17 Aug 2024 04:29:34 -0400 Subject: [PATCH] Add HLS support to make live streams function (Tested with SafeTwitch API) --- src/Controls.astro | 65 +++++++++++++++++++++++++++++++++++++--------- src/Player.astro | 7 ++--- 2 files changed, 57 insertions(+), 15 deletions(-) diff --git a/src/Controls.astro b/src/Controls.astro index 5744dc9..4a2668f 100644 --- a/src/Controls.astro +++ b/src/Controls.astro @@ -2,6 +2,7 @@ // Properties const { Title, + Live, SeekColor = '#ff274d' } = Astro.props @@ -21,23 +22,63 @@ import {
- - + {Live ? + null + : + + + }
-
- - -
-

- 00:00 - 00:00 - 00:00 -

+ {Live ? + null + : +
+ + +
+

+ 00:00 + 00:00 + 00:00 +

+ }
+ {Live ? + Live + : + null + }
- \ No newline at end of file + + +{Live ? + + : + null +} \ No newline at end of file diff --git a/src/Player.astro b/src/Player.astro index 30b98de..1aca23b 100644 --- a/src/Player.astro +++ b/src/Player.astro @@ -7,7 +7,8 @@ const { VideoAttributes, AudioAttributes, Milieu, - SettingsMenu + SettingsMenu, + Live } = Astro.props // Components @@ -28,12 +29,12 @@ import { Settings } from '@iconoir/vue' {Milieu ? : null } {Audio ? : null } {SettingsMenu ? - + : - + }