Change media embed links to use Laravel URL generation

This means that they should work in email digests now.
This commit is contained in:
Ben Goldsworthy 2022-12-03 13:09:11 -06:00
parent fb707a1d6e
commit b0908035a7
1 changed files with 4 additions and 4 deletions

View File

@ -9,13 +9,13 @@
@if(preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath))
@if(preg_match("/\.webm/", $filepath[1]))
<video class="popup__video" controls>
<source src="/videos/{{ $filepath[1] }}" type="video/webm">
<p>Your browser doesn't support HTML video. Here is a <a href="/{{ $filepath[1] }}">link to the video</a> instead.</p>
<source src="{{ url("/videos/$filepath[1]") }}" type="video/webm">
<p>Your browser doesn't support HTML video. Here is a <a href="{{ url("/videos/$filepath[1]") }}">link to the video</a> instead.</p>
</video>
@elseif(preg_match("/\.ogg/", $filepath[1]))
<audio class="popup__audio" controls>
<source src="/audio/{{ $filepath[1] }}" type="audio/ogg">
<p>Download <a href="/{{ $filepath[1] }}">OGG</a> audio.</p>
<source src="{{ url("/audio/$filepath[1]") }}" type="audio/ogg">
<p>Download <a href="{{ url("/audio/$filepath[1]") }}">OGG</a> audio.</p>
</audio>
@endif
@else