Podcast player embedded obv links in tekst
This commit is contained in:
@@ -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']);
|
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)
|
public function podcast(Request $request, $id)
|
||||||
{
|
{
|
||||||
$apiResult = $this->API('podcast/details/' . (int)$id);
|
$apiResult = $this->API('podcast/details/' . (int)$id);
|
||||||
|
|||||||
6
public/css/style.css
vendored
6
public/css/style.css
vendored
@@ -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 */
|
/*# sourceMappingURL=style.css.map */
|
||||||
|
|||||||
8
public/js/main.js
vendored
8
public/js/main.js
vendored
@@ -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);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|||||||
@@ -186,8 +186,8 @@
|
|||||||
<script type="text/javascript" src="/js/jquery.hint.js"></script>
|
<script type="text/javascript" src="/js/jquery.hint.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.qtip.min.js"></script>
|
<script type="text/javascript" src="/js/jquery.qtip.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.blockUI.js"></script>
|
<script type="text/javascript" src="/js/jquery.blockUI.js"></script>
|
||||||
<script type="text/javascript" src="/js/main.js"></script>
|
|
||||||
<script type="text/javascript" src="/js/odometer.min.js"></script>-->
|
<script type="text/javascript" src="/js/odometer.min.js"></script>-->
|
||||||
|
<script type="text/javascript" src="/js/main.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery-3.7.1.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-3.7.1.min.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.prettyPhoto.js"></script>
|
<script type="text/javascript" src="/js/jquery.prettyPhoto.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery.carouFredSel-6.2.1.min.js"></script>
|
<script type="text/javascript" src="/js/jquery.carouFredSel-6.2.1.min.js"></script>
|
||||||
|
|||||||
@@ -14,6 +14,9 @@
|
|||||||
</div>
|
</div>
|
||||||
@elseif($block->type == "text")
|
@elseif($block->type == "text")
|
||||||
<div class="text">{!!$block->text!!}</div>
|
<div class="text">{!!$block->text!!}</div>
|
||||||
|
@if (preg_match('!/gemist/fragment/([0-9]*)/!', $block->text, $match))
|
||||||
|
<div class="podcast-player" data-id="{{ $match[1] }}" data-auth="{{ sha1($match[1] . ':' . date('Y-m-d')) }}"></div>
|
||||||
|
@endif
|
||||||
@elseif($block->type == "intro")
|
@elseif($block->type == "intro")
|
||||||
<h3 class="excerpt">{!!strip_tags($block->text)!!}</h3>
|
<h3 class="excerpt">{!!strip_tags($block->text)!!}</h3>
|
||||||
@elseif($block->type == "info")
|
@elseif($block->type == "info")
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ Route::get('/luister/fragment')->name('luister.podcast');
|
|||||||
Route::get('/luister/programma/{year}/{month}/{day}/{hour}/{duration}/{offset?}', 'StreamController@program')
|
Route::get('/luister/programma/{year}/{month}/{day}/{hour}/{duration}/{offset?}', 'StreamController@program')
|
||||||
->where(['id' => '\d+', 'year' => '20\d\d', 'month' => '\d\d?', 'day' => '\d\d?', 'hour' => '\d\d?', 'duration' => '\d\d?', 'offset' => '\d\d?']);
|
->where(['id' => '\d+', 'year' => '20\d\d', 'month' => '\d\d?', 'day' => '\d\d?', 'hour' => '\d\d?', 'duration' => '\d\d?', 'offset' => '\d\d?']);
|
||||||
Route::get('/luister/programma')->name('luister.programma');
|
Route::get('/luister/programma')->name('luister.programma');
|
||||||
|
Route::get('/luister/fragment/inline/{id}', 'StreamController@inline')->where(['id' => '\d+']);
|
||||||
|
|
||||||
Route::get('/gemist', 'RadioController@podcasts')->name('gemist');
|
Route::get('/gemist', 'RadioController@podcasts')->name('gemist');
|
||||||
Route::get('/gemist/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');
|
Route::get('/gemist/zoeken/{query}', 'RadioController@searchpodcast')->name('gemist.zoeken');
|
||||||
|
|||||||
Reference in New Issue
Block a user