From 5ebf7f20bea19b5d246cdc9551ca5ca2e0ff6755 Mon Sep 17 00:00:00 2001 From: NH Gooi Date: Thu, 12 Sep 2024 13:45:41 +0200 Subject: [PATCH] API ondersteunt /stream en /download --- app/Http/Controllers/StreamController.php | 10 +++++----- resources/views/calendarevent.blade.php | 2 +- resources/views/kerkdienst.blade.php | 2 +- resources/views/listen.blade.php | 5 ++--- resources/views/partial/blogitems.blade.php | 2 +- resources/views/podcastitem.blade.php | 3 ++- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/app/Http/Controllers/StreamController.php b/app/Http/Controllers/StreamController.php index 4ecb75d5..841cf341 100644 --- a/app/Http/Controllers/StreamController.php +++ b/app/Http/Controllers/StreamController.php @@ -50,11 +50,11 @@ class StreamController extends Controller } return view('listen', [ - 'source' => $this->API_URL . 'podcast/download/' . $apiResult->url, + 'source' => $this->API_URL . 'podcast/stream/' . $apiResult->url, 'title' => $podcast->title, 'content' => $podcast->title, 'isStream' => false, - 'canDownload' => true ]); + 'canDownload' => $this->API_URL . 'podcast/download/' . $apiResult->url ]); } public function program(Request $request, $year, $month, $day, $hour, $duration, $offset = 0) { @@ -69,7 +69,7 @@ class StreamController extends Controller } return view('listen', [ - 'source' => $this->API_URL . 'programma/download/' . $current->format('Y/m/d/H') . '/1', + 'source' => $this->API_URL . 'programma/stream/' . $current->format('Y/m/d/H') . '/1', 'tabs' => $hours, 'title' => 'Uitzending terugluisteren', 'content' => 'de uitzending van ' . $current->format('d-m-Y, H') . ':00 uur', @@ -88,10 +88,10 @@ class StreamController extends Controller public function kerkdienst(Request $request) { return view('listen', [ - 'source' => $this->API_URL . 'kerkdienst/download', + 'source' => $this->API_URL . 'kerkdienst/stream', 'title' => 'Kerkdienst gemist', 'content' => 'de kerkdienst van afgelopen zondag', 'isStream' => false, - 'canDownload' => true ]); + 'canDownload' => $this->API_URL . 'kerkdienst/download' ]); } } diff --git a/resources/views/calendarevent.blade.php b/resources/views/calendarevent.blade.php index 9daa8e2c..9e7911f4 100644 --- a/resources/views/calendarevent.blade.php +++ b/resources/views/calendarevent.blade.php @@ -41,7 +41,7 @@
@endsection diff --git a/resources/views/partial/blogitems.blade.php b/resources/views/partial/blogitems.blade.php index a04e7499..75f066ee 100644 --- a/resources/views/partial/blogitems.blade.php +++ b/resources/views/partial/blogitems.blade.php @@ -78,7 +78,7 @@
diff --git a/resources/views/podcastitem.blade.php b/resources/views/podcastitem.blade.php index d9cd1d4b..17f28226 100644 --- a/resources/views/podcastitem.blade.php +++ b/resources/views/podcastitem.blade.php @@ -90,6 +90,7 @@ @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,7 +113,7 @@