RSDStandardAsyncActionConfiguration
public struct RSDStandardAsyncActionConfiguration : RSDRecorderConfiguration, Codable
RSDStandardAsyncActionConfiguration
is a concrete implementation of RSDRecorderConfiguration
that can be used to
decode an async configuration for a recorder.
-
A short string that uniquely identifies the asynchronous action within the task. If started asynchronously, then the identifier maps to a result stored in
RSDTaskResult.asyncResults
.Declaration
Swift
public let identifier: String
-
The async action type associated with this configuration.
Declaration
Swift
public let type: RSDAsyncActionType
-
An identifier marking the step to start the action. If
nil
, then the action will be started when the task is started.Declaration
Swift
public let startStepIdentifier: String?
-
An identifier marking the step at which to stop the action. If
nil
, then the action will be stopped when the task is stopped.Declaration
Swift
public var stopStepIdentifier: String?
-
List of the permissions required for this action.
Declaration
Swift
public var permissionTypes: [RSDPermissionType] { get }
-
Whether or not the recorder requires background audio. Default =
false
.If
true
then background audio can be used to keep the recorder running if the screen is locked because of the idle timer turning off the device screen.If the app uses background audio, then the developer will need to turn
ON
theBackground Modes
under theCapabilities
tab of the Xcode project, and will need to selectAudio, AirPlay, and Picture in Picture
.Declaration
Swift
public var requiresBackgroundAudio: Bool { get }
-
Default initializer.
Declaration
Swift
public init(identifier: String, type: RSDAsyncActionType, startStepIdentifier: String?, stopStepIdentifier: String?)
Parameters
identifier
The identifier for this recorder.
type
The async action type associated with this recorder.
startStepIdentifier
The start step identifier (if any).
stopStepIdentifier
The stop step identifier (if any).
-
Validate the async action to check for any configuration that should throw an error. This method does nothing but is required by the
RSDAsyncActionConfiguration
protocol.Declaration
Swift
public func validate() throws