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

Not working play event Vue 3.5 #375

Open
1 task
vitaliykoreev opened this issue Oct 19, 2024 · 0 comments
Open
1 task

Not working play event Vue 3.5 #375

vitaliykoreev opened this issue Oct 19, 2024 · 0 comments

Comments

@vitaliykoreev
Copy link

vitaliykoreev commented Oct 19, 2024

Overview

Something wrong with play/pause events in my app.

I've just inserted this part of code in my template:

<template>
<DotLottieVue style="height: 350px; width: 350px" autoplay src="/explosion.lottie" ref="playerRef" class="lottie-animation" />
</template>

<script setup>
const playerRef = ref();
</script>

And with "autoplay" and "loop" props it works properly but when I'm trying to run animation manually using play function I'm getting an error TypeError: Cannot read properties of undefined (reading 'play').

I was trying to change playerRef.value.play() into playerRef.value.getDotLottieInstance().play(); but still no.

If someone has the same error could you please help me to fix it.

Thanks to all who reply!

Consuming repo

What repo were you working in when this issue occurred?

...

Labels

  • Add the Type: Bug label to this issue.
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

No branches or pull requests

1 participant