Comments (9)
Unclear if this issue is resolved (because ages ago), but I had the same issue and resolved it by wrapping the plyr in two (!) extra divs, and putting the v-if on the outer div. One div still didn't work, two did. hacky, but works (for me).
so:
<div v-if="songUrl">
<div>
<vue-plyr ... />
</div>
</div>
from vue-plyr.
Sorry for the late response - I should be able to take a look at this soon.
I should maybe put some try/catch in the destroy method. I will see if that works.
from vue-plyr.
Experiencing exactly same issue. Seems like it's making library unusable at the moment...? @redxtech I'm really hoping you'll be able to look into this soon :)
from vue-plyr.
I'm not sure what should I do - I'm trying to develop app using vue-plyr, but this issue is making it pretty much unusable... Is there a hope it will be fixed, or should I just use plain plyr, and try to integrate it with vue/nuxt in-house?
from vue-plyr.
Plyr v3's destroy
method is no longer synchronous. Vue's beforeDestroy
hook is. Since destroy
is modifying the DOM after Vue has already gotten rid of you see errors.
https://github.com/sampotts/plyr/blob/master/src/js/plyr.js#L1014
I'm using Plyr v2 in a Vue app right now (not using vue-plyr
) and came here hoping @redxtech already had a fix for this. Sigh.
from vue-plyr.
I have updated to the latest version of plyr in the next upcoming build and this should be fixed once I iron out some build issues and publish the new version.
from vue-plyr.
Still throwing errors after destroying.
Uncaught TypeError: Cannot read property 'controls' of null (plyr.min.js?4fb8:1 )
at toggleControls (plyr.min.js?4fb8:1)
at eval (plyr.min.js?4fb8:1)
v.5.0.4
from vue-plyr.
Im doing a simple v-if on the player to toggle multiple players visibility and they don't obey it properly. (They're still visible after changing the state).
I'm having to use v-show to make sure i dont actually destroy them.. This is not ideal and I'd really like to use this wrapper.
from vue-plyr.
Unclear if this issue is resolved (because ages ago), but I had the same issue and resolved it by wrapping the plyr in two (!) extra divs, and putting the v-if on the outer div. One div still didn't work, two did. hacky, but works (for me).
so:
<div v-if="songUrl"> <div> <vue-plyr ... /> </div> </div>
I used wrapped and worked as well
<template v-if="someBool">
<div>
<vue-plyr ref="plyr">
<audio controls crossorigin playsinline>
<source :src="audioPath" type="audio/mp3" />
</audio>
</vue-plyr>
</div>
</template>
from vue-plyr.
Related Issues (20)
- Help me
- 'npm install vue-plyr' error? HOT 3
- sampotts/plyr.git develop Permission denied HOT 3
- Not working with HLS mp4s
- Add subtitles to a Youtube iframe
- default controls shown in the demo page its not coming
- Vue Plyr 7.0.0 causes npm ci in Docker fail with error 401 HOT 3
- Any maintenance status update for this (lovely) package? HOT 3
- Installation of dependency sampotts/plyr extremely slow
- Quality settings closes
- Cannot change vimeo source dynamically - error: Unknown player. Probably unloaded
- reload componentn when language changed
- `v-if` not working with plyr.
- Controls disappears in full screen HOT 1
- Fails to compile if importing css as in the example
- How can I use it Nuxt3 app HOT 3
- Customizing player
- Nuxt 3 SSR HOT 2
- Cannot load videos using Hls.js on Vite
- Vue3 update starting time
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vue-plyr.