Skip to content

feat: metamorph and video previews#4100

Merged
mihakrajnc merged 9 commits into
devfrom
feat/support_video_nft_previews
Jun 9, 2025
Merged

feat: metamorph and video previews#4100
mihakrajnc merged 9 commits into
devfrom
feat/support_video_nft_previews

Conversation

@mihakrajnc

@mihakrajnc mihakrajnc commented May 8, 2025

Copy link
Copy Markdown
Contributor

Pull Request Description

This switches the project over to using the MetaMorph (KTX2) converter API for all remote textures. It also adds support for displaying video previews for nft shapes. For example, if the nft's preview / thumbnail is an animation (gif / webp) it will be converted via our media converter and displayed in explorer as a video.

What does this PR change?

  • Switches to metamorph-api.decentraland.org
  • Manually adds PBVideoPlayer to the nft entity if it detects the preview is a video.
  • The lifecycle of the video player is handled by the existing systems. Changing the URN of the NFT at runtime via scene code is also supported.

Test Instructions

Walk around and look at all nft's and remote images in scenes. They should be displayed correctly.

Find some NFT's in the world that have video previews and make sure they show up. Also ensure that changing the URN at runtime works.
I setup a test world at squeazer.dcl.eth which has one NFT shape and 4 buttons that switch between different nft's (2 image 2 video).

Prerequisites

  • List any required setup steps
  • Include environment/configuration requirements

Test Steps

  1. Launch explorer
  2. Go to squeazer.dcl.eth
  3. Press the buttons to switch the nft urn.
  4. Bonus points if you can find and check other nft's in genesis / elsewhere that have video previews.

Quality Checklist

  • Changes have been tested locally
  • Documentation has been updated (if required)
  • Performance impact has been considered
  • For SDK features: Test scene is included

Code Review Reference

Please review our Code Review Standards before submitting.

@github-actions

github-actions Bot commented May 8, 2025

Copy link
Copy Markdown
Contributor

@mihakrajnc
mihakrajnc marked this pull request as ready for review May 9, 2025 14:30
@mihakrajnc
mihakrajnc requested review from a team as code owners May 9, 2025 14:30
@mihakrajnc mihakrajnc added the clean-build Used to trigger clean build on PR label May 9, 2025
@mihakrajnc mihakrajnc changed the title feat: add support for video nft previews feat: metamorph and video previews May 30, 2025

@pravusjif pravusjif left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, the disposing of the textures should already be handled by the CacheCleaner or the CleanUpMaterialsSystem

@Ludmilafantaniella Ludmilafantaniella left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Tested on both Windows and Mac.
Scene used for testing:

  • Genesis Plaza (-3,-2)
  • Rapture Gallery (-88,-64), which contains both animated and static NFTs.
  • World scene provided in the PR squeazer.dcl.eth
  • All video previews and image thumbnails loaded correctly.
  • Didn’t notice glitches or display issues on either OS.

Looks good to me — approving! 🙌

4100-evid.mp4
4100-evidencia.mp4

@mihakrajnc
mihakrajnc enabled auto-merge (squash) June 9, 2025 17:19
@mihakrajnc
mihakrajnc merged commit d5d7900 into dev Jun 9, 2025
6 checks passed
@mihakrajnc
mihakrajnc deleted the feat/support_video_nft_previews branch June 9, 2025 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clean-build Used to trigger clean build on PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants