MCLRecordingConfig

@interface MCLRecordingConfig : NSObject <NSCopying>

Pass this to -[Megacool startRecording:withConfig:] to configure how recordings are made.

Note

This class does not have atomic properties for efficiency, thus it’s not thread-safe.
  • How to handle frames when they the total surpasses maxFrames.

    The default is kMCLOverflowStrategyLatest , which will only keep the most recent ones. The alternative is @"timelapse", which will contain frames from the entire recording but sped up so that the total is not surpassed. Note that when using @"timelapse" the total number of frames will be between 1.33* maxFrames and 0.67* maxFrames , such that the expected value will be maxFrames , but it might sometimes be more.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) MCLOverflowStrategy overflowStrategy;

    Swift

    var overflowStrategy: MCLOverflowStrategy { get set }
  • An identifier for this recording, useful when you might have multiple in-progress recordings.

    Can be used to retrieve the same recording later, for previews or shares, or to resume a paused recording.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, null_resettable) NSString *recordingId;

    Swift

    var recordingId: String! { get set }
  • Max number of frames in a recording.

    Default is 50 frames. What happens when a recording grows above the maxFrames limit is determined by the overflow strategy, see the documentation for captureFrame or startRecording for details.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int maxFrames;

    Swift

    var maxFrames: Int32 { get set }
  • Set numbers of frames per second to record.

    Default is 10 frames / second. The GIF will be recorded with this frame rate.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int frameRate;

    Swift

    var frameRate: Int32 { get set }
  • Set numbers of frames per second to play.

    Default is 20% more than the capture frame rate. The GIF will be exported with this frame rate.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int playbackFrameRate;

    Swift

    var playbackFrameRate: Int32 { get set }
  • Percentage of highlight that should occur before maximum number of points is scored

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) double peakLocation;

    Swift

    var peakLocation: Double { get set }
  • Set a delay (in milliseconds) on the last frame in the animation.

    Default is 1000 (1s). If set to 0 the last frame will have the same duration as the rest of the frames, ie. 1/playbackFrameRate.

    Declaration

    Objective-C

    @property (assign, readwrite, nonatomic) int lastFrameDelay;

    Swift

    var lastFrameDelay: Int32 { get set }
  • Set a default custom overlay for the last frame in the animation.

    This can also be set as a URL if you have the image on disk with lastFrameOverlayUrl.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) UIImage *lastFrameOverlay;

    Swift

    var lastFrameOverlay: UIImage? { get set }
  • Set a default custom overlay for the last frame in the animation, by URL.

    Same as lastFrameOverlay, but given as URL to a local filesystem path instead of UIImage.

    Declaration

    Objective-C

    @property (readwrite, strong, nonatomic, nullable) NSURL *lastFrameOverlayUrl;

    Swift

    var lastFrameOverlayUrl: URL? { get set }