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 the count surpasses maxFrames.

    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. If set to 1 the recording will be shared as a still image instead of a gif or mp4.

    Default is 50 frames. What happens when a recording grows above the maxFrames limit is determined by the MCLOverflowStrategy.

    Declaration

    Objective-C

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

    Swift

    var maxFrames: Int32 { get set }
  • Set the capture frame rate. The default is 10.

    Declaration

    Objective-C

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

    Swift

    var frameRate: Int32 { get set }
  • Set the playback frame rate. Set this higher or lower than the capture frame rate to speed up or slow down the recording.

    The default is 20% more than the capture frame rate.

    Declaration

    Objective-C

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

    Swift

    var playbackFrameRate: Int32 { get set }
  • Set the location of the highest scoring moment (the peak) in a highlight recording. Must be between 0 and 1, the default is 0.7. Set the score throughout the game with -[Megacool registerScoreChange]. The recording must be using the highlight overflow strategy for this to have any effect.

    For example, in a recording with 10 frames, a peak location of 0.2 means that the highest scoring frame will occur near the beginning at frame 2, and a peak location of 0.8 means that the peak will occur near the end at frame 8.

    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 }