Jelajahi Sumber

add video to the home page

Olivier Massot 1 tahun lalu
induk
melakukan
fe57fcebae
1 mengubah file dengan 22 tambahan dan 2 penghapusan
  1. 22 2
      components/Home/Promotion.vue

+ 22 - 2
components/Home/Promotion.vue

@@ -45,12 +45,30 @@
     <v-row class="demo">
       <v-col>
         <v-img
+          v-if="playVideo"
           src="/images/pages/home/promotion/Ordinateur_portable_avec_ecran_logiciel_Opentalent.jpg"
           alt="Vidéo corporate de l’entreprise Opentalent"
           class="screen"
         >
-          <v-icon v-show="false" icon="fas fa-play" class="play-icon" />
+          <v-icon
+            icon="fas fa-play"
+            class="play-icon"
+            @click="playVideo = true"
+          />
         </v-img>
+
+        <video v-else controls muted autoPlay>
+          <source
+            src="/storage/Video_Corporate_Opentalent-Agenda_et_logiciels_culturels.mp4"
+            type="video/mp4"
+            class="screen"
+          />
+          <meta itemprop="name" content="Vidéo corporate Opentalent" />
+          <meta
+            itemprop="description"
+            content="Vidéo corporate Opentalent, découvrez l’histoire de l’entreprise, son agenda et ses logiciels culturels"
+          />
+        </video>
       </v-col>
     </v-row>
 
@@ -120,7 +138,9 @@
   </LayoutContainer>
 </template>
 
-<script setup lang="ts"></script>
+<script setup lang="ts">
+const playVideo: Ref<boolean> = ref(false)
+</script>
 
 <style scoped lang="scss">
 .highlight {