plyr icon indicating copy to clipboard operation
plyr copied to clipboard

Problem with video and audio on the same page

Open MarcoGoeli opened this issue 1 year ago • 1 comments

When I publish a video and audio on the same page, the video overhangs the webpage. If I remove the audio, the video is responsive and is displayed properly on the website. With the audio, the poster image is not visible in the video either, without it it is visible. What's the problem here?

audio and video video-audio

video video

MarcoGoeli avatar Jul 21 '23 07:07 MarcoGoeli

Instead of single player:

const player = new Plyr('#player');

use the multi-players as the following:

const players = Array.from(document.querySelectorAll('.js-player')).map((p) => new Plyr(p));

According to docs https://github.com/sampotts/plyr#multiple-players

Mohammed-Taysser avatar Aug 04 '23 17:08 Mohammed-Taysser