redxtech / vue-plyr

A Vue component for the plyr (https://github.com/sampotts/plyr) video & audio player.
Other
768 stars 136 forks source link

Cannot read property 'appendChild' of null while reopening #332

Open Venipa opened 3 years ago

Venipa commented 3 years ago

https://i.mavis.moe/f/lJgFF9LpRy/2021-03-12-23-27-11mp4.mp4 it seems like vue-plyr is not able to get the parent the second time. according to the variable the node is not rendered yet in the dom, so video.parentNode is null

client.js?06a0:97 TypeError: Cannot read property 'appendChild' of null
    at eval (vue-plyr.ssr.js?301c:5972)
    at Array.forEach (<anonymous>)
    at wrap$1 (vue-plyr.ssr.js?301c:5968)
    at new e (vue-plyr.ssr.js?301c:9638)
benoitvogel commented 3 years ago
  <vue-plyr>
    <audio>
      <source :src="urlLecture" type="audio/mp3" />
    </audio>
  </vue-plyr>

Same problem here (vur-plyr 7.0.0 w/ vue 2.6.12) when changing src prop to a different URI multiple times in a row.

Works well with vue-plyr 6.0.4 though.

abregre commented 2 years ago
  <vue-plyr
        v-if="hasVideo()"
        ref="videoPlayer"
        :options="options"
    >
        <div
            v-if="_quiz.youtubeVideoId"
            data-plyr-provider="youtube"
            :data-plyr-embed-id="_quiz.youtubeVideoId"
        />
        <div
            v-else-if="_quiz.vimeoVideoId"
            data-plyr-provider="vimeo"
            :data-plyr-embed-id="_quiz.vimeoVideoId"
        />
        <video
            v-else
            class="video"
            allowfullscreen
            allowtransparency
            :options="options"
        >
            <source :src="_quiz.externalVideoUrl" type="video/mp4">
        </video>
    </vue-plyr>

Same problem here when i try to change the inner source from Youtube to Vimeo and External Url

joweste commented 2 years ago

I have the same problem. Is there some workaround to solve it?

joweste commented 2 years ago

Is this project alive?