Giter Site home page Giter Site logo

Comments (9)

pmcp avatar pmcp commented on July 19, 2024 1

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.

redxtech avatar redxtech commented on July 19, 2024

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.

Bugari avatar Bugari commented on July 19, 2024

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.

Bugari avatar Bugari commented on July 19, 2024

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.

ashleahhill avatar ashleahhill commented on July 19, 2024

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.

redxtech avatar redxtech commented on July 19, 2024

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.

lemieszek avatar lemieszek commented on July 19, 2024

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.

dietrichg avatar dietrichg commented on July 19, 2024

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.

Niehaus avatar Niehaus commented on July 19, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.