-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error when updating reactive video id #311
Comments
Hey! |
Sure! Sorry, didnt look at this issue for a while 😅
|
Hum, weird indeed. Do you have some live example so I can reproduce it myself easily? |
any updates on this? |
Hey, sorry, Just had a look! Nice video btw 😂🙈 I think this might be a vuejs issue vuejs/core#5657 |
Ah, I see. Ok, Is there any other way to reactively update the video? Everything else I saw so far didn't really work... |
Maybe sampotts/plyr#448 ? |
Gonna try that, thanks |
Hi, I didn't use reactivity to change the video, but using source setter in plyr example https://github.com/sampotts/plyr?tab=readme-ov-file#the-source-setter. <script setup>
onMounted(() => {
plyr.value.player.on('ready', (e) => {
plyr.value.player.play()
})
})
const changeVideo = (videoId: string) => {
plyr.value.player.source = {
type: 'video',
sources: [
{
src: videoId,
provider: 'youtube',
},
],
}
}
</script>
<template>
<vue-plyr ref="plyr">
<div data-plyr-provider="youtube" data-plyr-embed-id="tPEE9ZwTmy0" />
</vue-plyr>
<button @click="changeVideo('dCxSsr5xuL8')" />
</template> |
Hi, ive already posted a comment on the "old" repo, but seeing that it had little to no activity over the last 2 years ill ask here again :)
Essentially, I have this simple template:
Now,
vid
changes, and the entire app pretty much breaks.I get this error in console:
I've isolated the issue to this component.
Any help is appreciated :)
The text was updated successfully, but these errors were encountered: