I'm working on a carousel with html5 video and audio inside. All works fine but, when I click on options button (the three dots button), the player disappears. This happens for video and also for audio, only inside the carousel, the player is working fine outside.
I've used the react-slick
component, here's my simple code:
<Slider {...settings}>
{ (this.props.thePost || []).map((media, i) => {
if (media.media_type == 'image') {
return (
<div className={"imageWrapper"} key={"theMedia-"+p.id+i}>
<img src={ endpoint.mediaRoot +'/'+ this.props.thePost[i].media_url } />
</div>
);
}
else if (media.media_type == 'video') {
return (
<div className="playerWrapper video" key={"theMedia-"+p.id+i} style={{ width:"100%"}}>
<Player src={ endpoint.mediaRoot +'/'+ this.props.thePost[videoIndex].media_url } />
</div>
);
}
else if (media.media_type == 'audio') {
return (
<div className="playerWrapper audio" key={"theMedia-"+p.id+i} style={{ width:"100%;"}}>
<div className="audioPlayer">
<Player src={ endpoint.mediaRoot +'/'+ this.props.thePost[audioIndex].media_url } />
</div>
</div>
);
}
})}
</Slider>
I think that the problem is related to transform: translate3d(-500px, 0px, 0px)
(500px is just an example) that slick uses to scroll within slides. I've tried to add 3d transformation to a wrapper of a player (outside the carousel) and this broke the position of the overlay (the download / pip opened on three dots click). Is there a way to fix this?
Thank you in advance.