@extends($layout) @section('styles') {{-- --}} @endsection @section('content')
{{ isset($currentFolderMain->name) ? $currentFolderMain->name : '' }}
@if (!str_contains(request()->path(), 'folders/search')) @if ($canUploadFiles)
@if (empty(session('selected_folders')) && empty(session('selected_files'))) @if (request()->path() !== 'folders') @endif @endif @if (request()->segment(2)) @if (empty(session('selected_folders')) && empty(session('selected_files')))   Upload file {{-- @if (!auth()->user()->hasRole('Standard User')) --}}    {{-- @endif --}} @endif @if (empty(session('selected_folders')) && empty(session('selected_files'))) @endif @if (empty(session('selected_folders')) && empty(session('selected_files'))) {{-- @if ($isOwner) --}} {{-- @endif --}} @endif @if (empty(session('selected_folders')) && empty(session('selected_files'))) {{-- @if ($isOwner) --}} {{-- @endif --}} @endif {{-- --}} {{-- @if (!empty(session('selected_folders')) || !empty(session('selected_folders')))   Cancel @endif --}} {{-- @if (empty(session('selected_folders')) && empty(session('selected_files'))) @endif --}}
@endif
@endif @endif
@csrf
@if (session('success')) @endif
{{--
@if (session('success')) @endif
@if (session('error')) @endif
--}} @if (optional($folders)->count() > 0 || optional($videos)->count() > 0)
@foreach ($folders as $folder)
@if ($auth_user_id == $folder->user_id || $isAdmin)
@endif Folder {{ $folder->name }} @if ($folder->is_public) @else
@endif
@endforeach @foreach ($videos as $video) @if ($video->file_type == 1) @php $date = \Carbon\Carbon::parse($video->capture_datetime); $timeAgoText = $date->format('F j, Y'); $baseFilename = str_replace('.mp4', '', $video->url); $thumbnailUrls = []; for ($i = 0; $i < $video->no_of_thumbnails; $i++) { $thumbnailPath = "{$baseFilename}" . ($video->no_of_thumbnails > 1 ? "-{$i}" : '') . '.jpg'; //if (Storage::disk('s3_thumbnails')->exists($thumbnailPath)) { $thumbnailUrls[] = Storage::disk('s3_thumbnails')->url($thumbnailPath); //} } $defaultThumbnailUrl = asset('assets/img/video-thumbnail-placeholder.png'); $thumbnailToShow = count($thumbnailUrls) > 0 ? $thumbnailUrls[0] : $defaultThumbnailUrl; $hasValidThumbnail = count($thumbnailUrls) > 0; @endphp
@if ($auth_user_id == $video->user_id || $isAdmin) @endif
Video Thumbnail Play Button
{{ $video->title }}

{{ $timeAgoText }}

@if ($video->is_public) @else
@endif
@endif @if ($video->file_type == 2) @php $date = \Carbon\Carbon::parse($video->capture_datetime); $timeAgoText = $date->format('F j, Y'); $thumbnailPath = $video->url; $thumbnailUrl = Storage::disk('s3_thumbnails')->url($thumbnailPath); $imageUrl = $video->signedUrl; $thumbnailPathJpg = pathinfo($thumbnailPath, PATHINFO_DIRNAME) . '/' . pathinfo($thumbnailPath, PATHINFO_FILENAME) . '.jpg'; $thumbnailUrlJpg = Storage::disk('s3_thumbnails')->url($thumbnailPathJpg); $isDocxFile = Str::endsWith($video->url, '.docx'); @endphp @if (!$isDocxFile)
@if ($auth_user_id == $video->user_id || $isAdmin) @endif
Document Thumbnail{{ $video->title }}

{{ $timeAgoText }}

@if ($video->is_public) @else
@endif

@elseif ($isDocxFile) @endif @endif @if ($video->file_type == 3) @php $date = \Carbon\Carbon::parse($video->capture_datetime); $timeAgoText = $date->format('F j, Y'); $thumbnailPath = $video->url; $thumbnailUrl = Storage::disk('s3_thumbnails')->url($thumbnailPath); $extensions = ['jpg', 'jpeg', 'png' /* , 'JPG', 'PNG', 'JPEG' */]; $thumbnailUrlJpg = null; $thumbnailExtension = pathinfo($thumbnailPath, PATHINFO_EXTENSION); $thumbnailPathWithExt = pathinfo($thumbnailPath, PATHINFO_DIRNAME) . '/' . pathinfo($thumbnailPath, PATHINFO_FILENAME) . '.' . $thumbnailExtension; $thumbnailUrlJpg = Storage::disk('s3_thumbnails')->url($thumbnailPathWithExt); $imageUrl = $video->signedUrl; @endphp
@if ($auth_user_id == $video->user_id || $isAdmin) @endif
Video Thumbnail {{-- Play Button --}}
{{ $video->title }}

{{ $timeAgoText }}

@if ($video->is_public) @else
@endif
@endif @if ($video->file_type == 4)
@if ($auth_user_id == $video->user_id || $isAdmin) @endif
Document Thumbnail{{ $video->title }}


@endif {{-- @if ($video->file_type == 3) @php $thumbnailPath = $video->url; $thumbnailUrl = Storage::disk('s3_thumbnails')->url($thumbnailPath); $imageUrl = $video->signedUrl; @endphp @endif --}} @endforeach
@if (!($folders->count() > 0 || $videos->count() > 0))

No sub folders or files found.

@endif @if (!($folders->count() > 0 || $videos->count() > 0))

No sub folders or files found.

@endif
@else

No sub folders or files found.

@endif
@php if (!isset($currentFolderMain)) { $currentFolderMain = null; } @endphp @endsection @section('script') {{-- --}} @endsection