Perf: optimisation vidéos page expertise
All checks were successful
Deploy / Deploy to Production (push) Successful in 21s
All checks were successful
Deploy / Deploy to Production (push) Successful in 21s
- Vidéos recompressées (CRF 23, faststart) : 13MB → 3.4MB et 3.7MB - Champs Kirby dynamiques pour vidéo normale et inverse - Sources dynamiques via data.backgroundVideo / data.backgroundVideoReverse Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
84744cd4a3
commit
3a2b5a2f57
5 changed files with 40 additions and 4 deletions
BIN
assets/video/BACKGROUND_VIDEO_MISSION_REVERSE_opt.mp4
Normal file
BIN
assets/video/BACKGROUND_VIDEO_MISSION_REVERSE_opt.mp4
Normal file
Binary file not shown.
BIN
assets/video/BACKGROUND_VIDEO_MISSION_opt.mp4
Normal file
BIN
assets/video/BACKGROUND_VIDEO_MISSION_opt.mp4
Normal file
Binary file not shown.
|
|
@ -53,3 +53,37 @@ tabs:
|
||||||
- heading
|
- heading
|
||||||
headings:
|
headings:
|
||||||
- 3
|
- 3
|
||||||
|
|
||||||
|
media:
|
||||||
|
label: Médias
|
||||||
|
icon: image
|
||||||
|
columns:
|
||||||
|
- width: 1/2
|
||||||
|
sections:
|
||||||
|
mediaFields:
|
||||||
|
type: fields
|
||||||
|
fields:
|
||||||
|
backgroundVideo:
|
||||||
|
label: Vidéo d'arrière-plan (sens normal)
|
||||||
|
type: files
|
||||||
|
layout: cards
|
||||||
|
max: 1
|
||||||
|
accept: video/*
|
||||||
|
translate: false
|
||||||
|
image:
|
||||||
|
ratio: 16/9
|
||||||
|
cover: true
|
||||||
|
uploads:
|
||||||
|
template: video
|
||||||
|
backgroundVideoReverse:
|
||||||
|
label: Vidéo d'arrière-plan (sens inverse)
|
||||||
|
type: files
|
||||||
|
layout: cards
|
||||||
|
max: 1
|
||||||
|
accept: video/*
|
||||||
|
translate: false
|
||||||
|
image:
|
||||||
|
ratio: 16/9
|
||||||
|
cover: true
|
||||||
|
uploads:
|
||||||
|
template: video
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
$specificData = [
|
$specificData = [
|
||||||
'pageTitle' => $page->writer()->value(),
|
'pageTitle' => $page->writer()->value(),
|
||||||
|
'backgroundVideo' => $page->backgroundVideo()->toFile()?->url(),
|
||||||
|
'backgroundVideoReverse' => $page->backgroundVideoReverse()->toFile()?->url(),
|
||||||
'items' => $page->body()->toBlocks()->filter(fn($b) => $b->type() === 'text')->map(fn($block) => [
|
'items' => $page->body()->toBlocks()->filter(fn($b) => $b->type() === 'text')->map(fn($block) => [
|
||||||
'text' => $block->text()->value()
|
'text' => $block->text()->value()
|
||||||
])->values()
|
])->values()
|
||||||
|
|
|
||||||
|
|
@ -232,7 +232,7 @@
|
||||||
playsinline
|
playsinline
|
||||||
preload="auto"
|
preload="auto"
|
||||||
>
|
>
|
||||||
<source src="/assets/video/BACKGROUND_VIDEO_MISSION.mp4" type="video/mp4" />
|
<source src={data.backgroundVideo ?? '/assets/video/BACKGROUND_VIDEO_MISSION.mp4'} type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
<video
|
<video
|
||||||
bind:this={videoRev}
|
bind:this={videoRev}
|
||||||
|
|
@ -241,7 +241,7 @@
|
||||||
playsinline
|
playsinline
|
||||||
preload="auto"
|
preload="auto"
|
||||||
>
|
>
|
||||||
<source src="/assets/video/BACKGROUND_VIDEO_MISSION_REVERSE.mp4" type="video/mp4" />
|
<source src={data.backgroundVideoReverse ?? '/assets/video/BACKGROUND_VIDEO_MISSION_REVERSE.mp4'} type="video/mp4" />
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue