API ondersteunt /stream en /download

This commit is contained in:
NH Gooi
2024-09-12 13:45:41 +02:00
parent cc1eba5959
commit 5ebf7f20be
6 changed files with 12 additions and 12 deletions

View File

@@ -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">

View File

@@ -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>

View File

@@ -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

View File

@@ -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>

View File

@@ -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">