-
Notifications
You must be signed in to change notification settings - Fork 1
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
base: main
Are you sure you want to change the base?
Conversation
<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> |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
import { VueDatoVideo, } from "@voorhoede/vue-dato-video"; | |
import { VueDatoVideo } from "@voorhoede/vue-dato-video"; |
<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> |
There was a problem hiding this comment.
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
What changes were made
responsive-video
componentresponsive-video
How to test or check results
Checks