API ondersteunt /stream en /download
This commit is contained in:
@@ -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' ]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="announcement">
|
||||
<div>
|
||||
<audio controls>
|
||||
<source src="{{ $url = url( $apiUrl . 'podcast/download/' . $event->podcast->url . "?auth=" . $event->podcast->auth )}}" type="audio/mpeg" />
|
||||
<source src="{{ $url = url( $apiUrl . 'podcast/stream/' . $event->podcast->url . "?auth=" . $event->podcast->auth )}}" type="audio/mpeg" />
|
||||
</audio>
|
||||
</div>
|
||||
<ul class="post_details clearfix">
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</p>
|
||||
<p>
|
||||
<audio controls>
|
||||
<source src="{{ url( $apiUrl . 'kerkdienst/download' ) }}" type="audio/mpeg" />
|
||||
<source src="{{ url( $apiUrl . 'kerkdienst/stream' ) }}" type="audio/mpeg" />
|
||||
</audio>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
@@ -42,8 +42,8 @@
|
||||
</p>
|
||||
|
||||
<p>
|
||||
@if(!$isStream && $canDownload)
|
||||
<a href="{{$source}}" class="action_button">
|
||||
@if(!$isStream && $canDownload !== false)
|
||||
<a href="{{$canDownload}}" class="action_button">
|
||||
<span class="fa fa-download"></span><span>Download .mp3-bestand</span>
|
||||
</a>
|
||||
@endif
|
||||
@@ -52,7 +52,6 @@
|
||||
<span class="fa fa-music"></span><span>Schakel naar live-uitzending</span>
|
||||
</a>
|
||||
@endif
|
||||
</p>
|
||||
@endif
|
||||
</div>
|
||||
@endsection
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
<div class="announcement">
|
||||
<div>
|
||||
<audio controls>
|
||||
<source src="{{ $url = url( $apiUrl . "podcast/download" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
|
||||
<source src="{{ $url = url( $apiUrl . "podcast/stream" . $item->podcast->url . "?auth=" . $item->podcast->auth )}}" type="audio/mpeg" />
|
||||
</audio>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -90,6 +90,7 @@
|
||||
@if ($podcast)
|
||||
<?php
|
||||
$audioUrl = url($apiUrl . 'podcast/download' . $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 @@
|
||||
|
||||
<div class="announcement">
|
||||
<audio controls>
|
||||
<source src="{{$audioUrl}}" type="audio/mpeg"/>
|
||||
<source src="{{$streamUrl}}" type="audio/mpeg"/>
|
||||
</audio>
|
||||
<div class="clearfix">
|
||||
<a class="action_button btn" href="{{$audioUrl}}" title="Download dit fragment als MP3">
|
||||
|
||||
Reference in New Issue
Block a user