Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for GIFs in responsive video component #787

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sjoerdbeentjes
Copy link
Contributor

What changes were made

  • Adjusts props of responsive-video component
  • Add support for gif in template of responsive-video

How to test or check results

  • Check in build logs if build no longer fails for /en/blog/bundle-splitting-with-react-s-lazy-and-suspense/
  • Check how video looks on /en/blog/bundle-splitting-with-react-s-lazy-and-suspense/

Checks

@sjoerdbeentjes sjoerdbeentjes requested a review from Siilwyn as a code owner April 17, 2024 09:06
Comment on lines +24 to +37
<video
v-else-if="props.gif"
class="responsive-video"
autoplay
controls
:style="{
aspectRatio: `${props.gif.width} / ${props.gif.height}`,
}"
>
<source
:src="`${props.gif.url}?fm=mp4`"
type="video/mp4"
>
</video>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I don't know if this is the way to go, can't we use vue-dato-video for this?
Would like some more context, it's not really a gif right but a mp4 video that autoplays?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that, if possible, this should be formatted so you can use the vue-dato-video for both

</template>

<script setup lang="ts">
import "@voorhoede/vue-dato-video/style";
import { VueDatoVideo } from "@voorhoede/vue-dato-video";
import { VueDatoVideo, } from "@voorhoede/vue-dato-video";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import { VueDatoVideo, } from "@voorhoede/vue-dato-video";
import { VueDatoVideo } from "@voorhoede/vue-dato-video";

Comment on lines +24 to +37
<video
v-else-if="props.gif"
class="responsive-video"
autoplay
controls
:style="{
aspectRatio: `${props.gif.width} / ${props.gif.height}`,
}"
>
<source
:src="`${props.gif.url}?fm=mp4`"
type="video/mp4"
>
</video>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that, if possible, this should be formatted so you can use the vue-dato-video for both

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants