MetadataViewsMedia

MetadataViewsMedia Interfaces

The MetadataViewsMedia interfaces in the Flooks library define structures for representing media files in metadata views, with specific extensions for HTTP and IPFS files.

MetadataViewsMedia Interface

export interface MetadataViewsMedia {
  file: MetadataViewsFile;
  mediaType: string;
}

Properties

  • file: MetadataViewsFile
    • A file representation, which can be either an HTTP file or an IPFS file.
  • mediaType: string
    • The type of media, typically indicating the file format or content type.

MetadataViewsHTTPMedia Interface

export interface MetadataViewsHTTPMedia extends MetadataViewsMedia {
  file: MetadataViewsHTTPFile;
}

Description

  • Extends MetadataViewsMedia with a specific focus on HTTP files.
  • Ensures that the file property is specifically a MetadataViewsHTTPFile.

MetadataViewsIPFSMedia Interface

export interface MetadataViewsIPFSMedia extends MetadataViewsMedia {
  file: MetadataViewsIPFSFile;
}

Description

  • Extends MetadataViewsMedia with a specific focus on IPFS files.
  • Ensures that the file property is specifically a MetadataViewsIPFSFile.

Usage

These interfaces are particularly useful in the context of NFTs and other digital assets on the blockchain that include media files. They provide a structured way to represent media, accommodating different storage solutions and media types, which is essential for applications that handle rich media content.