API Reference

Script Reference

ISN_RPStopResult

namespace SA.iOS.ReplayKit
...

public class ISN_RPStopResult : SA_Result
{
    /// <summary>
    /// An instance of the <see cref="ISN_RPPreviewViewController"/> class,  that is returned 
    /// if anything at all was recorded. The interface allows the user to preview and edit 
    /// the recording.
    /// </summary>
    public ISN_RPPreviewViewController PreviewController;

    /// <summary>
    /// Gets a value indicating whether result has a <see cref="PreviewController"/>.
    /// </summary>
    /// <value><c>true</c> if has preview controller; otherwise, <c>false</c>.</value>
    public bool HasPreviewController {get;}
}

ISN_RPScreenRecorder

namespace SA.iOS.ReplayKit
...

public static class ISN_RPScreenRecorder 
{
    /// <summary>
    /// Starts recording the app display.
    /// 
    /// When <see cref="StartRecording"/> is first called, an alert window appears asking 
    /// the user to confirm recording. 
    /// This alert window is also presented if it has been longer than 8 minutes 
    /// since the last time <see cref="StartRecording"/> was called.
    /// </summary>
    /// <param name="callback">A callback that is called when the request completes.</param>
    public static void StartRecording(Action<SA_Result> callback);

    /// <summary>
    /// Stops the current recording.
    /// 
    /// When recording stops and there is no error associated with the recording, 
    /// present the the resulting preview view controller 
    /// using <see cref="ISN_RPPreviewViewController"/>. 
    /// The user will see the built-in preview view controller, providing them with 
    /// the option to trim, cut, 
    /// and share the recording. On the iPad, you must present the preview view controller 
    /// as a popover.
    /// </summary>
    /// <param name="callback">A callback that is called when the request completes.</param>
    public static void StopRecording(Action<ISN_RPStopResult> callback);

    /// <summary>
    /// Discards the current recording.
    /// 
    /// Method can only be called after the <see cref="StopRecording"/> callback 
    /// has been called. 
    /// Use the handler block to do any required cleanup, including setting 
    /// any <see cref="ISN_RPPreviewViewController"/> references to null.
    /// </summary>
    /// <param name="callback">Callback.</param>
    public static void DiscardRecording(Action callback);

    /// <summary>
    /// A Boolean value that indicates whether the screen recorder is available for recording.
    /// </summary>
    public static bool IsAvailable {
        get {
            return ISN_RPNativeLib.API.IsReplayKitAvaliable();
        }
    }

    /// <summary>
    /// A Boolean value that indicates whether the app is currently recording.
    /// </summary>
    public static bool IsRecording {get;}

    /// <summary>
    /// A Boolean value that indicates whether the microphone is currently enabled.
    /// </summary>
    public static bool IsMicrophoneEnabled { get;}

    /// <summary>
    /// Gets the did stop recording.
    /// 
    /// This method is called when recording stops due to an error or a change 
    /// in recording availability. 
    /// If any part of the stopped recording is available, 
    /// an instance of <see cref="ISN_RPStopResult"/> is returned.
    /// </summary>
    public static SA_iEvent<ISN_RPStopResult> DidStopRecording {get;}

    /// <summary>
    /// Indicates that the recorder has changed states between disabled and enabled.
    /// 
    /// Screen recording can be unavailable due to unsupported hardware, 
    /// the user’s device displaying information over Airplay or through a TVOut session, 
    /// or another app using the shared recorder.
    /// </summary>
    public static SA_iEvent DidChangeAvailability {get;}
}

ISN_RPPreviewViewController

namespace SA.iOS.ReplayKit
...

/// <summary>
/// An object that displays a user interface where users preview and edit a screen 
/// recording created with ReplayKit.
/// </summary>
public class ISN_RPPreviewViewController
{
    /// <summary>
    /// Presents a view controller modally.
    /// </summary>
    /// <param name="callback">Indicates that the preview view controller is dismissed.</param>
    public void Present(Action<ISN_PRPreivewResult> callback);
}

ISN_PRPreivewResult

namespace SA.iOS.ReplayKit
...

public class ISN_PRPreivewResult : SA_Result
{
    /// <summary>
    /// A set of activity types as listed in UIActivity.
    /// </summary>
    /// <value>The activity types.</value>
    public List<string> ActivityTypes {get;}
}