Skip to content
Discussion options

You must be logged in to vote

it's the default behaviour (not an alpine thing). if you want to change the source at runtime, you need to call the load() method on the video tag. Something like

<video autoplay loop muted class="absolute z-10 w-auto min-w-full min-h-full max-w-none"  x-init="$watch('data.video', () => $el.load())">
    <source :src="data.video" type="video/mp4"/>
</video>

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@SimoTod
Comment options

SimoTod Oct 6, 2021
Collaborator

@FrancoisDucobu
Comment options

@SimoTod
Comment options

SimoTod Oct 6, 2021
Collaborator

@SimoTod
Comment options

SimoTod Oct 6, 2021
Collaborator

@FrancoisDucobu
Comment options

Answer selected by FrancoisDucobu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants