diff --git a/app/Http/Controllers/StreamController.php b/app/Http/Controllers/StreamController.php index 78362399..dfa1a6bc 100644 --- a/app/Http/Controllers/StreamController.php +++ b/app/Http/Controllers/StreamController.php @@ -30,6 +30,17 @@ class StreamController extends Controller return view('watch', ['title' => 'Kijk NH Gooi Tv Studio', 'stream' => 'https://studiocam.nhgooi.nl/studiocam/live/index.m3u8']); } + public function inline(Request $request, $id) + { + $apiResult = $this->API('podcast/details/' . (int)$id); + $podcast = new \Model\Podcast($apiResult); + if(sha1($id . ':' . date('Y-m-d')) != $request->get('auth')) { + // return view('widgets/podcastplayer', ['podcast' => null]); + } + + return view('widgets/podcastplayer', ['podcast' => $podcast]); + } + public function podcast(Request $request, $id) { $apiResult = $this->API('podcast/details/' . (int)$id); diff --git a/public/css/style.css b/public/css/style.css index 73c9b2a1..30cbfa26 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1649,4 +1649,10 @@ a, a:hover, a:active { } } +.podcast-player .content { + border: solid 1px #333; + border-radius: 5px; + padding: 0.4rem; +} + /*# sourceMappingURL=style.css.map */ diff --git a/public/js/main.js b/public/js/main.js index 8b137891..6ea6ddb3 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -1 +1,7 @@ - +$(function() { + $('.podcast-player').each(function() { + var id = $(this).data('id'); + var auth = $(this).data('auth'); + $(this).load('/luister/fragment/inline/' + id + '?auth=' + auth); + }); +}); diff --git a/resources/views/layouts/master.blade.php b/resources/views/layouts/master.blade.php index 95c22049..d6f4f9d1 100644 --- a/resources/views/layouts/master.blade.php +++ b/resources/views/layouts/master.blade.php @@ -186,8 +186,8 @@ - --> + diff --git a/resources/views/partial/nh_story.blade.php b/resources/views/partial/nh_story.blade.php index 99e8d39c..d325b421 100644 --- a/resources/views/partial/nh_story.blade.php +++ b/resources/views/partial/nh_story.blade.php @@ -14,6 +14,9 @@ @elseif($block->type == "text")