vue-plyr icon indicating copy to clipboard operation
vue-plyr copied to clipboard

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

Open kollol-dev opened this issue 4 years ago • 3 comments

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?

kollol-dev avatar Nov 21 '20 11:11 kollol-dev

Any solutions for this issue?

allenhark avatar Apr 06 '21 15:04 allenhark

No not yet

kollol-dev avatar Apr 06 '21 16:04 kollol-dev

Any solutions after a few months with that problem?

santana-everton avatar Jun 21 '21 02:06 santana-everton