@extends('admin.layouts.master') @section('title', 'Create Video') @push('styles') @endpush @section('content') @include('admin.partials.page-header', [ 'title' => 'Create Memorial Video', 'crumbs' => [ ['label' => 'Memorials', 'url' => route('admin.funeral.index')], ['label' => 'Create Video'], ], ])
@php $labels = ['Setup', 'Video', 'Slides', 'Music', 'Finalize']; @endphp @if ($step == 1)
@csrf
Required — max 100 characters
Required — e.g. Birth Year – Year of Passing
@if ($hasMainImage) Memorial photo is already set. Choose a new file only if you want to update it. @else JPG/PNG/GIF — max 10MB @endif
@if ($mainImageUrl) Main image @else

Main image preview

Upload a main memorial image @endif
@elseif ($step == 2)
@csrf
Select Background Video

Preview any clip, click Select, then continue.

@if ($libraryVideos->isEmpty())

No videos uploaded yet

Add videos from the admin Videos page, then refresh this step.

Upload Video
@else
Showing {{ $libraryVideos->count() }} of {{ $libraryVideos->count() }} videos
@foreach ($libraryVideos as $libVideo) @php $playable = is_file($libVideo->videoPath()); $isSelected = (int) $selectedVmId === (int) $libVideo->vm_id; @endphp
@if ($playable) @else
File missing
@endif

{{ $libVideo->vm_name }}

@endforeach
No videos match your search.
Selected: @if ($selectedVmId) {{ optional($libraryVideos->firstWhere('vm_id', $selectedVmId))->vm_name ?: 'Video #'.$selectedVmId }} @else None — please select one video @endif
Click a card or Select
@endif
Back
@elseif ($step == 3) @php $maxSlideImages = \App\Services\MemorialVideoGenerator::MAX_GALLERY_SLIDES; $slideSeconds = (int) \App\Services\MemorialVideoGenerator::SLIDE_SECONDS; @endphp
@csrf
Slide Photos

Upload up to {{ $maxSlideImages }} images. Select up to {{ $maxSlideImages }} to use in the video ({{ $slideSeconds }} seconds each). Selected: {{ count($selectedSlides) }}/{{ $maxSlideImages }} / Uploaded: {{ $media->count() }}/{{ $maxSlideImages }} / Photo time: 0:00

@if ($media->count()) @endif
@csrf
@forelse ($media as $item) @php $imgUrl = '/uploads/funeral_multiple/'.$funeral->f_id.'/'.$item->fi_image; $isSelected = in_array((int) $item->fi_id, $selectedSlides, true); @endphp
Slide
@empty

No slide photos yet. Upload photos to continue.

@endforelse
Back
@elseif ($step == 4)
@csrf
Background Music
Back
@else
Preview Summary

Intro: {{ $videoIntro }}

Title: {{ $videoTitle }}

Subtitle: {{ $videoSubtitle }}

Selected slides: {{ count($selectedSlides) }}

Music: {{ ! empty($funeral->f_track_id) ? 'Selected' : 'Not selected' }}

@if ($mainImageUrl)

Main image

Main @endif
Selected theme video
@if ($backgroundVideoUrl)

This is the same theme background you chose in step 2. It will loop behind your photos and text.

@else

No theme video selected yet. Go back to step 2 and choose one.

@endif
@php $hasBgReady = (bool) $backgroundVideoUrl; $hasSlidesReady = count($selectedSlides) > 0 || $hasMainImage; $hasMusicReady = ! empty($funeral->f_track_id); $canGenerate = $hasBgReady && $hasSlidesReady; @endphp
Generate Memorial Video
@if (! empty($existingVideo))
A video already exists. Generate again will replace it with a new one using your current selections.
@endif

Builds an MP4 from your theme, main image + name text, selected gallery photos, and selected song.

  • Theme / background video
  • Main image & slides ({{ count($selectedSlides) }} selected)
  • Background music {{ $hasMusicReady ? '' : '(optional — generate without music if skipped)' }}
@csrf
Back
Creating your memorial video…
0% complete

Starting…

This can take one to two minutes. Please keep this page open.

Generation failed

Video ready

Your memorial video was created and saved.

@endif
@endsection @push('scripts') @endpush