diff --git a/resources/views/tracker.blade.php b/resources/views/tracker.blade.php index 8c9bdd1..c6c2e6c 100644 --- a/resources/views/tracker.blade.php +++ b/resources/views/tracker.blade.php @@ -88,8 +88,25 @@ icon: markerIcon }).addTo(map); + $popupContent = null; + @if(preg_match("/\[\[([^\]]+)\]\]/", $checkin->note, $filepath)) + @if(preg_match("/\.webm/", $filepath[1])) + @php $popupContent = ``; @endphp + @elseif(preg_match("/\.ogg/", $filepath[1])) + @php $popupContent = ``; @endphp + @endif + @else + @php $popupContent = ``; @endphp + @endif + popupMarkup = ``; - popupMarkup += ``; + popupMarkup += $popupContent; popupMarkup += ''; marker.bindPopup(popupMarkup).openPopup();