MetaMask / MetaMask/metamask-mobile
Support other keys for videos and IPFS resolution
- Dominant language
- TypeScript
- Stars
- 3k
- Forks
- 1.7k
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 669
Description
# Description and Context
It would be nice to support other keys for video NFTs.
A lot of our customers use `video` or `file` which they totally have the right for to do as there is no official standard for metadata.
Example 1:
```
{
"name": "Fancy Fatalities MetaMask/metamask-extension#1",
"description": "Fancy fatalities living the glamorous afterlife on the blockchain.",
"file_metadata":
{
"FileType": "MP4",
"FileTypeExtension": "mp4",
"MIMEType": "video/mp4",
"ImageSize": "1080x1296",
"Megapixels": 1.4,
"Duration": "6.00 s",
"BitDepth": 24,
"md5Checksum": "32f92c843ff378c70dbe50effff20db0",
},
"video": "ipfs://QmUPRefvs1Lzo9wkRB5h2EsmHMJJ6kYVBhzrTq6ESYnBxd/nft.mp4",
}
```
Example 2:
```
{
"name": "Fancy Fatalities MetaMask/metamask-extension#1",
"description": "Fancy fatalities living the glamorous afterlife on the blockchain.",
"file_metadata":
{
"FileType": "MP4",
"FileTypeExtension": "mp4",
"MIMEType": "video/mp4",
"ImageSize": "1080x1296",
"Megapixels": 1.4,
"Duration": "6.00 s",
"BitDepth": 24,
"md5Checksum": "32f92c843ff378c70dbe50effff20db0",
},
"file": "ipfs://QmUPRefvs1Lzo9wkRB5h2EsmHMJJ6kYVBhzrTq6ESYnBxd/nft.mp4",
}
```
## Proposal
- Show videos when there is a `file` or `video` key defined in the metadata
- Resolve videos correctly when there is an IPFS link (using https://cloudflare-ipfs.com or any other ipfs node)
- (optional) Fetch Thumbnails directly from the video using its first frame
- (optional) For file it could even be easier if you check based on the mime type whether it's a video or image
Contributor guide
Research direction
No files, tests, or entry points are named. Start by locating the NFT metadata video-rendering path and the existing IPFS URL handling, then compare the current supported metadata keys with the examples here. Done should cover video and file keys, IPFS resolution, and the optional thumbnail or MIME-type behavior only if those proposals are accepted.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react-native, typescript
- Domain
- mobile-dev, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 28/100