Skip to content

Commit

Permalink
Use video tag for play videos
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-dharti-r committed Sep 4, 2024
1 parent 5f9fae9 commit 0fa3d30
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion nuxt-frontend/components/home-new/PortfolioSection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
class="flex items-center h-full"
:class="portfolio.video ? 'p-0' : 'py-8 sm:p-0 lg:pt-0 lg:pb-2'"
>
<video
<!-- <video
v-if="portfolio.video"
autoplay
loop
Expand All @@ -48,6 +48,18 @@
>
<source :data-src="portfolio.video[1]" type="video/webm" />
<source :data-src="portfolio.video[0]" type="video/mp4" />
</video> -->
<video
v-if="portfolio.video"
:src="portfolio.video[0]"
loop
autoPlay
muted
playsInline
webkit-playsinline="true"
class="lozad mx-auto sm:h-[400px] 2xl:h-[509px]"
>
Your browser does not support the video tag.
</video>
<img
v-else
Expand Down

0 comments on commit 0fa3d30

Please sign in to comment.