From 1dadbc62af3d323afcfe28919439d91fda579760 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Tue, 24 Sep 2024 17:29:57 +0200 Subject: [PATCH] WaveSurfer player voor podcasts, voor live WIP --- resources/views/layouts/master.blade.php | 1 + resources/views/listen.blade.php | 12 +- resources/views/podcastitem.blade.php | 13 +- resources/views/widgets/audioplayer.blade.php | 213 ++++++++++++++++++ 4 files changed, 231 insertions(+), 8 deletions(-) create mode 100644 resources/views/widgets/audioplayer.blade.php diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index 3fb6e1cf..3ddb356d 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -186,6 +186,7 @@ + + @endpush - @include('widgets.mediaplayer') diff --git a/resources/views/podcastitem.blade.php b/resources/views/podcastitem.blade.php index 17f28226..722f774a 100644 --- a/resources/views/podcastitem.blade.php +++ b/resources/views/podcastitem.blade.php @@ -88,11 +88,11 @@ @section('content') @if ($podcast) - url . "?auth=" . $podcast->auth); $streamUrl = url($apiUrl . 'podcast/stream' . $podcast->url . "?auth=" . $podcast->auth); $popoutUrl = route('luister.podcast') . $podcast->url . '?auth=' . $podcast->auth; - ?> + ?>
@@ -112,9 +112,12 @@
- + @include("widgets.audioplayer", [ + 'source' => $streamUrl, + 'lengte' => $podcast->duration / 1000, + 'waveform' => $podcast->waveform + ]) +
Download fragment diff --git a/resources/views/widgets/audioplayer.blade.php b/resources/views/widgets/audioplayer.blade.php new file mode 100644 index 00000000..20eca206 --- /dev/null +++ b/resources/views/widgets/audioplayer.blade.php @@ -0,0 +1,213 @@ + +
+ {{-- + +
+ @if( $lengte > 60) + {{ floor($lengte / 60) }} minuten en {{ floor(($lengte % 60)) }} seconden + @else + {{ $lengte }} seconden + @endif +
+ --}} + +
+
0:00
+
0:00
+
+
+ +
+ + +
+ +
+ + + + + +
+
+ + + + \ No newline at end of file