add video poster and audio sample, alter deploment
This commit is contained in:
parent
f1d1d3f96d
commit
d598751598
8 changed files with 93 additions and 69 deletions
BIN
frontend/public/audio/ferien_erlebnisbericht.mp3
Normal file
BIN
frontend/public/audio/ferien_erlebnisbericht.mp3
Normal file
Binary file not shown.
Binary file not shown.
|
Before Width: | Height: | Size: 4 MiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 239 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 117 KiB |
|
|
@ -66,7 +66,6 @@
|
|||
|
||||
<!-- Entry Description -->
|
||||
<div v-if="entry.description" class="entry-description">
|
||||
<h3>Description</h3>
|
||||
<p class="description-text">{{ entry.description }}</p>
|
||||
</div>
|
||||
|
||||
|
|
@ -94,7 +93,7 @@
|
|||
<div class="video-thumbnail" @click="openVideoLightbox(video, index)">
|
||||
<video
|
||||
:src="video.url"
|
||||
:poster="video.poster"
|
||||
:poster="getVideoPoster(video)"
|
||||
class="video-preview"
|
||||
muted
|
||||
preload="metadata"
|
||||
|
|
@ -145,7 +144,6 @@
|
|||
|
||||
<!-- Audio Recordings -->
|
||||
<div v-if="entry.audioRecordings && entry.audioRecordings.length > 0" class="audio-section">
|
||||
<h3>Audio Recordings</h3>
|
||||
<div class="audio-list">
|
||||
<div
|
||||
v-for="(audio, index) in entry.audioRecordings"
|
||||
|
|
@ -249,7 +247,7 @@
|
|||
v-if="currentVideo"
|
||||
ref="lightboxVideo"
|
||||
:src="currentVideo.url"
|
||||
:poster="currentVideo.poster"
|
||||
:poster="getVideoPoster(currentVideo)"
|
||||
controls
|
||||
class="lightbox-video"
|
||||
@loadedmetadata="onVideoLoaded"
|
||||
|
|
@ -379,7 +377,7 @@ export default {
|
|||
// Mark specific images as favorites (indices 2, 5, and 9)
|
||||
const favoriteImageIndices = [2, 5, 9]
|
||||
|
||||
// Sample entry data (for testing)
|
||||
// Sample entry data (for testing) - Updated with poster paths
|
||||
const sampleEntry = {
|
||||
id: 1,
|
||||
title: "Beginn des neuen Abenteuers",
|
||||
|
|
@ -400,8 +398,16 @@ export default {
|
|||
{ name: "Gespräch mit Familie", url: "/audio/sample2.mp3" }
|
||||
],
|
||||
videoRecordings: [
|
||||
{ name: "UHD Nature Video", url: "/videos/3191901-uhd_3840_2160_25fps.mp4", poster: "/videos/3191901-uhd_3840_2160_25fps_thumb.png" },
|
||||
{ name: "HD Landscape Video", url: "/videos/3326928-hd_1920_1080_24fps.mp4", poster: "/videos/3326928-hd_1920_1080_24fps_thumb.png" }
|
||||
{
|
||||
name: "UHD Nature Video",
|
||||
url: "/videos/3191901-uhd_3840_2160_25fps.mp4",
|
||||
poster: "/videos/thumbs/3191901-uhd_3840_2160_25fps_thumb.jpg"
|
||||
},
|
||||
{
|
||||
name: "HD Landscape Video",
|
||||
url: "/videos/3326928-hd_1920_1080_24fps.mp4",
|
||||
poster: "/videos/thumbs/3326928-hd_1920_1080_24fps_thumb.jpg"
|
||||
}
|
||||
],
|
||||
relatedPersons: [
|
||||
{ id: 1, name: "Maria Schmidt", relation: "Freundin", avatar: null },
|
||||
|
|
@ -548,7 +554,24 @@ export default {
|
|||
console.log('Edit entry:', entry.value.id)
|
||||
// Example: router.push(`/edit/${entry.value.id}`)
|
||||
}
|
||||
|
||||
|
||||
// New method to get video poster/thumbnail
|
||||
const getVideoPoster = (video) => {
|
||||
// If video has a poster property, use it
|
||||
if (video.poster) {
|
||||
return video.poster
|
||||
}
|
||||
|
||||
// Otherwise, try to generate a thumbnail path based on video filename
|
||||
if (video.url) {
|
||||
const videoName = video.url.split('/').pop().split('.')[0]
|
||||
return `/videos/thumbs/${videoName}_thumb.jpg`
|
||||
}
|
||||
|
||||
// Fallback to a default poster image
|
||||
return '/images/video-placeholder.png'
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
// If accessing via route, you might want to load data based on route params
|
||||
const entryId = route.params.id
|
||||
|
|
@ -562,7 +585,7 @@ export default {
|
|||
entry,
|
||||
allImages,
|
||||
additionalImagesGallery,
|
||||
favoriteImageIndices, // Added this to fix the ESLint error
|
||||
favoriteImageIndices,
|
||||
currentSlide,
|
||||
currentVideoSlide,
|
||||
showVideoLightbox,
|
||||
|
|
@ -576,6 +599,7 @@ export default {
|
|||
getEmotionalLevelClass,
|
||||
getEmotionalLevelText,
|
||||
getInitials,
|
||||
getVideoPoster,
|
||||
openVideoLightbox,
|
||||
pauseCurrentVideo,
|
||||
previousVideo,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ export default defineComponent({
|
|||
{ url: "/images/see.png", caption: "Der schöne Ort" }
|
||||
],
|
||||
audioRecordings: [
|
||||
{ name: "Gedanken zum Tag", url: "/audio/sample.mp3" }
|
||||
{ name: "Gedanken zum Tag", url: "/audio/ferien_erlebnisbericht.mp3" }
|
||||
],
|
||||
videoRecordings: [
|
||||
{ name: "UHD Nature Video", url: "/videos/3191901-uhd_3840_2160_25fps.mp4" },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue