Browse Source

Replaces video component with YouTube embed

Replaces the direct video source with a YouTube embed for the corporate video.

This simplifies video management and leverages YouTube's streaming capabilities.
Olivier Massot 4 tháng trước cách đây
mục cha
commit
d27e1211a3
1 tập tin đã thay đổi với 15 bổ sung14 xóa
  1. 15 14
      components/Home/Promotion.vue

+ 15 - 14
components/Home/Promotion.vue

@@ -57,22 +57,17 @@
           />
         </v-img>
 
-        <video
+        <iframe
           v-else
-          controls
-          autoPlay
           class="screen"
+          :src="`https://www.youtube.com/embed/Gpl4gAWNc3s?autoplay=1&rel=0`"
+          title="Vidéo corporate Opentalent"
+          frameborder="0"
+          allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture"
+          allowfullscreen
           aria-label="Vidéo corporate Opentalent"
           aria-description="Vidéo corporate Opentalent : découvrez l’histoire de l’entreprise, son agenda et ses logiciels culturels"
-        >
-          <source
-            :src="
-              runtimeConfig.public.fileStorageBaseUrl +
-              '/Video_Corporate_Opentalent-Agenda_et_logiciels_culturels.mp4'
-            "
-            type="video/mp4"
-          />
-        </video>
+        ></iframe>
       </v-col>
     </v-row>
 
@@ -143,8 +138,6 @@
 </template>
 
 <script setup lang="ts">
-const runtimeConfig = useRuntimeConfig()
-
 const playVideo: Ref<boolean> = ref(false)
 </script>
 
@@ -243,6 +236,14 @@ const playVideo: Ref<boolean> = ref(false)
     transform: scale(1.1);
   }
 
+  iframe.screen {
+    object-fit: contain;
+    background: black;
+    transform: scale(1.1);
+    border: none;
+    aspect-ratio: 16/9;
+  }
+
   @media (max-width: 1280px) {
     .screen {
       margin-top: -12px;