Skip to content

Commit bbc84a4

Browse files
authored
Merge pull request #453 from Itheum/d-robert-stop-donating
fix: video player of nft media on mobile opening to full screen
2 parents a99774b + f484069 commit bbc84a4

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
{
22
"name": "explorer-dapp",
33
"description": "Itheum Explorer is a DApp for the public to explore and visualize data within the Itheum protocol",
4-
"version": "1.15.6",
4+
5+
"version": "1.15.7",
6+
57
"author": "Itheum",
68
"license": "GPL-3.0-or-later",
79
"dependencies": {

src/components/ImageSlider.tsx

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ const ImageSlider: React.FC<ImageSliderProps> = (props) => {
5656
position: "absolute",
5757
}}>
5858
{media[imageIndex].type.includes("video") ? (
59-
<video autoPlay loop src={media[imageIndex].url} className="md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto"></video>
59+
<video autoPlay loop muted webkit-playsinline playsInline className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
60+
<source src={media[imageIndex]?.url} type="video/mp4" />
61+
</video>
6062
) : (
6163
<img className="md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto" src={media[imageIndex].url} onLoad={onLoad} />
6264
)}
@@ -77,7 +79,9 @@ const ImageSlider: React.FC<ImageSliderProps> = (props) => {
7779
setImageIndex(nextImageIndex);
7880
}}>
7981
{media[nextImageIndex].type.includes("video") ? (
80-
<video autoPlay loop src={media[imageIndex].url} className="md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto"></video>
82+
<video autoPlay loop muted webkit-playsinline playsInline className=" md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto">
83+
<source src={media[nextImageIndex]?.url} type="video/mp4" />
84+
</video>
8185
) : (
8286
<img className="md:w-auto base:w-[15rem] rounded-3xl base:h-[15rem] md:h-[18rem] mx-auto" src={media[nextImageIndex].url} onLoad={onLoad} />
8387
)}

src/components/NftMediaComponent.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ const NftMediaComponent: React.FC<NftMediaComponentProps> = (props) => {
1616
{nftMedia.length === 0 && <img src="https://media.elrond.com/nfts/thumbnail/default.png" />}
1717
{nftMedia.length === 1 ? (
1818
<div className={cn("flex justify-center rounded-3xl overflow-hidden", mediaStyle)}>
19-
{nftMedia[0].fileType === "video/mp4" ? (
20-
<video autoPlay loop src={nftMedia[0]?.url} className="scale-[1.8]" />
19+
{nftMedia[0]?.fileType === "video/mp4" ? (
20+
<video autoPlay loop muted webkit-playsinline playsInline className="scale-[1.8]">
21+
<source src={nftMedia[0]?.url} type="video/mp4" />
22+
</video>
2123
) : (
2224
<img className="rounded-3xl" src={!isLoading ? nftMedia[0]?.url : "https://media.elrond.com/nfts/thumbnail/default.png"} />
2325
)}

src/components/ThreeDCard.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ export function ThreeDCard(props: ThreeDCardProps) {
2323
<a href={`${MARKETPLACE_DETAILS_PAGE}${tokenIdentifier}${offerIndex ? "/offer-" + offerIndex : ""}`} target="_blank" className="cursor-pointer">
2424
{nftImgUrl.includes(".mp4") ? (
2525
<div className="flex relative h-48 w-48 rounded-3xl overflow-hidden justify-center items-center">
26-
<video autoPlay loop src={nftImgUrl} className="scale-[1.8] "></video>
26+
<video autoPlay loop muted webkit-playsinline playsInline className="scale-[1.8] ">
27+
<source src={nftImgUrl} type="video/mp4" />
28+
</video>
2729
</div>
2830
) : (
2931
<img src={nftImgUrl} className="h-48 w-48 object-cover rounded-3xl group-hover/card:shadow-xl" alt="thumbnail" />

src/pages/Account/MyListed/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export const MyListed = () => {
7676
<Card className="border-[0.5px] dark:border-slate-100/30 border-slate-300 bg-transparent rounded-[2.37rem] xl:w-[330px] w-[296px] pb-5">
7777
<CardContent className="flex flex-col p-6 ">
7878
<div className="mb-4">
79-
<NftMediaComponent nftMedia={dataNft.media as NftMedia[]} isLoading={isLoading} mediaStyle="mb-8 base:h-[15rem] md:h-[18rem]" />
79+
<NftMediaComponent nftMedia={dataNft.media as NftMedia[]} isLoading={isLoading} mediaStyle="mb-2 base:h-[15rem] md:h-[18rem]" />
8080
</div>
8181
<div className="xl:h-[300px] h-[315px]">
8282
<div className="mb-1">
@@ -102,7 +102,7 @@ export const MyListed = () => {
102102
</div>
103103

104104
<div className="mt-4 mb-1 text-start">
105-
<h5 className="text-center !text-xl !font-[Clash-Medium] pb-2">Data NFT Detail</h5>
105+
<h5 className="text-start !text-xl !font-[Clash-Medium] pb-2">Data NFT Detail</h5>
106106
</div>
107107
<div className="grid grid-cols-12 mb-1">
108108
<span className="col-span-4 opacity-6">Title:</span>

0 commit comments

Comments
 (0)