Skip to content

Commit

Permalink
fix: remove controls out of the video
Browse files Browse the repository at this point in the history
  • Loading branch information
911-Benedek-RobertGeorge committed May 16, 2024
1 parent 4abaced commit 9b51aac
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 18 deletions.
18 changes: 2 additions & 16 deletions src/components/ImageSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,7 @@ const ImageSlider: React.FC<ImageSliderProps> = (props) => {
position: "absolute",
}}>
{media[imageIndex].type.includes("video") ? (
<video
autoPlay
loop
muted
controls
webkit-playsinline
playsInline
className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
<video autoPlay loop muted webkit-playsinline playsInline className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
<source src={media[imageIndex]?.url} type="video/mp4" />
</video>
) : (
Expand All @@ -86,14 +79,7 @@ const ImageSlider: React.FC<ImageSliderProps> = (props) => {
setImageIndex(nextImageIndex);
}}>
{media[nextImageIndex].type.includes("video") ? (
<video
autoPlay
loop
muted
controls
webkit-playsinline
playsInline
className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
<video autoPlay loop muted webkit-playsinline playsInline className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
<source src={media[nextImageIndex]?.url} type="video/mp4" />
</video>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/NftMediaComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const NftMediaComponent: React.FC<NftMediaComponentProps> = (props) => {
{nftMedia.length === 1 ? (
<div className={cn("flex justify-center rounded-3xl overflow-hidden", mediaStyle)}>
{nftMedia[0]?.fileType === "video/mp4" ? (
<video autoPlay loop muted controls webkit-playsinline playsInline className="scale-[1.8]">
<video autoPlay loop muted webkit-playsinline playsInline className="scale-[1.8]">
<source src={nftMedia[0]?.url} type="video/mp4" />
</video>
) : (
Expand Down
2 changes: 1 addition & 1 deletion src/components/ThreeDCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function ThreeDCard(props: ThreeDCardProps) {
<a href={`${MARKETPLACE_DETAILS_PAGE}${tokenIdentifier}${offerIndex ? "/offer-" + offerIndex : ""}`} target="_blank" className="cursor-pointer">
{nftImgUrl.includes(".mp4") ? (
<div className="flex relative h-48 w-48 rounded-3xl overflow-hidden justify-center items-center">
<video autoPlay loop muted controls webkit-playsinline playsInline className="scale-[1.8] ">
<video autoPlay loop muted webkit-playsinline playsInline className="scale-[1.8] ">
<source src={nftImgUrl} type="video/mp4" />
</video>
</div>
Expand Down

0 comments on commit 9b51aac

Please sign in to comment.