redxtech / vue-plyr

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

How to pause all other videos while playing a single video in Nuxt? #269

Open kollol-dev opened 3 years ago

kollol-dev commented 3 years ago

I have one or two arrays of videos. An user can click and play any of them.

here is my code.

<div v-for="(item, vidIndex) in videos":key="vidIndex">
    <vue-plyr ref="plyr" style="width: 100%; height: 100%" :options="options">
        <video playsinline crossorigin :src="item.url" :type="`video/${item.extType}`"></video>
    </vue-plyr>
</div

Problem is, user can click multiple videos to play and all the videos are being played and creates a mess. Now all I want is, if any user click on a video to play, all the other videos had played before should be paused. Is there any idea how can I do this?

allenhark commented 3 years ago

Any solutions for this issue?

kollol-dev commented 3 years ago

No not yet

santana-everton commented 3 years ago

Any solutions after a few months with that problem?