PSPDFSoundAnnotationController

Undocumented

  • Stops any currently active recording or playback, except the sender. If the sender is nil, all annotations are stopped.

    Declaration

    Objective-C

    + (void)stopRecordingOrPlaybackForAllExcept:(nullable id)sender;

    Swift

    class func stopRecordingOrPlaybackForAllExcept(_ sender: Any?)
  • Checks if we have permission to record.

    Declaration

    Objective-C

    + (void)requestRecordPermission:(nullable void (^)(BOOL))block;

    Swift

    class func requestRecordPermission(_ block: ((Bool) -> Void)? = nil)
  • Undocumented

  • Undocumented

  • Undocumented

  • The controlled sound annotation.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFSoundAnnotation *_Nullable annotation;

    Swift

    weak var annotation: PSPDFSoundAnnotation? { get }
  • The current playback state.

    Declaration

    Objective-C

    @property (readonly, nonatomic) PSPDFSoundAnnotationState state;

    Swift

    var state: PSPDFSoundAnnotationState { get }
  • The duration of the audio playback

    Declaration

    Objective-C

    @property (readonly, nonatomic) NSTimeInterval playbackDuration;

    Swift

    var playbackDuration: TimeInterval { get }
  • Starts or resumes playback.

    Declaration

    Objective-C

    - (BOOL)startPlayback:(NSError *_Nullable *_Nullable)error;

    Swift

    func startPlayback() throws
  • Pauses playback or recording.

    Declaration

    Objective-C

    - (void)pause;

    Swift

    func pause()
  • Stops playback or recording.

    Declaration

    Objective-C

    - (BOOL)stop:(NSError *_Nullable *_Nullable)error;

    Swift

    func stop() throws
  • The audio player object. Only available if playback is ongoing or prepared.

    Declaration

    Objective-C

    @property (readonly, nonatomic, nullable) AVAudioPlayer *audioPlayer;

    Swift

    var audioPlayer: AVAudioPlayer? { get }
  • Starts or resumes recording.

    Declaration

    Objective-C

    - (BOOL)startRecording:(NSError *_Nullable *_Nullable)error;

    Swift

    func startRecording() throws
  • Discards the current recording.

    Declaration

    Objective-C

    - (void)discardRecording;

    Swift

    func discardRecording()