SCCameraKitLensMediaPickerAsset

Objective-C

@protocol SCCameraKitLensMediaPickerAsset <NSObject>

Swift

protocol LensMediaPickerProviderAsset : NSObjectProtocol

An asset provided by the picker. May be backed by a PHAsset, or an app’s own custom media type.

  • A unique identifier for the asset.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly) NSString *_Nonnull identifier;

    Swift

    var identifier: String { get }
  • Whether the asset is an image or video.

    Declaration

    Objective-C

    @property (nonatomic, readonly) SCCameraKitLensMediaPickerAssetType type;

    Swift

    var type: SCCameraKitLensMediaPickerAssetType { get }
  • If the asset is a video, the length of the video in seconds. Otherwise 0.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSTimeInterval duration;

    Swift

    var duration: TimeInterval { get }
  • A thumbnail for the image or video. For images, this will be cropped to show any detected faces.

    Declaration

    Objective-C

    @property (nonatomic, strong, readonly) UIImage *_Nonnull previewImage;

    Swift

    var previewImage: UIImage { get }