MediaItem

@objcMembers
@objc(GSMediaItem)
public class MediaItem : NSObject

Media item in a media store.

  • Types of media.

    See more

    Declaration

    Swift

    @objc(GSMediaItemType)
    public enum MediaType : Int, CustomStringConvertible
  • Media format.

    See more

    Declaration

    Swift

    @objc(GSMediaItemFormat)
    public enum Format : Int, CustomStringConvertible
  • Photo mode.

    See more

    Declaration

    Swift

    @objc(GSMediaItemPhotoMode)
    public enum PhotoMode : Int, CustomStringConvertible
  • Panorama type.

    See more

    Declaration

    Swift

    @objc(GSMediaItemPanoramaType)
    public enum PanoramaType : Int, CustomStringConvertible
  • Available metadata types.

    See more

    Declaration

    Swift

    @objc(GSMetadataType)
    public enum MetadataType : Int, CustomStringConvertible
  • Track of a media.

    See more

    Declaration

    Swift

    @objc(GSMediaItemTrack)
    public enum Track : Int, CustomStringConvertible
  • A resource of a media.

    See more

    Declaration

    Swift

    @objc(GSMediaItemResource)
    @objcMembers
    public class Resource : NSObject
  • uid

    Media unique identifier.

    Declaration

    Swift

    public let uid: String
  • Media name.

    Declaration

    Swift

    public let name: String
  • Media type.

    Declaration

    Swift

    public let type: MediaType
  • Unique identifier of the run for this media.

    Declaration

    Swift

    public let runUid: String
  • Media creation date.

    Declaration

    Swift

    public let creationDate: Date
  • Expected number of resources in the media.

    Declaration

    Swift

    public let expectedCount: UInt64?
  • Photo mode of the media (if available and media is a photo else nil).

    Declaration

    Swift

    public let photoMode: MediaItem.PhotoMode?
  • Panorama type, if media is a panorama photo, otherwise nil.

    Declaration

    Swift

    public let panoramaType: PanoramaType?
  • Media available resources.

    Declaration

    Swift

    public let resources: [Resource]
  • Available metaData types in this Media.

    Declaration

    Swift

    public let metadataTypes: Set<MetadataType>
  • Custom user data. Client can use this property to store custom data for this item, like it selection state. This property be kept between updates of a media list reference.

    Declaration

    Swift

    public var userData: Any?
  • Photo mode, if available.

    Note

    • Value is meaningless if hasPhotoModeis NO.
    • Only use in Objective-C.

    Declaration

    Swift

    @objc(photoMode)
    var gsPhotoMode: PhotoMode { get }
  • Whether photo mode is available.

    Note

    Only use in Objective-C.

    Declaration

    Swift

    var hasPhotoMode: Bool { get }
  • Panorama type, if available.

    Note

    Declaration

    Swift

    @objc(panoramaType)
    var gsPanoramaType: PanoramaType { get }
  • Whether panorama is available.

    Note

    Only use in Objective-C.

    Declaration

    Swift

    var hasPanoramaType: Bool { get }
  • Expected count, if available.

    Note

    Declaration

    Swift

    @objc(expectedCount)
    var gsExpectedCount: UInt64 { get }
  • Whether expected count is available.

    Note

    Declaration

    Swift

    var hasExpectedCount: Bool { get }
  • Tells if a metadataType is present.

    Note

    Only use in Objective-C.

    Declaration

    Swift

    @objc(hasMetadataType:)
    func hasMetadataType(_ metadataType: MetadataType) -> Bool

    Parameters

    metadataType

    MetadataType to check

    Return Value

    true if the metadataType type is present, false otherwise