PSPDFSoundAnnotationController
Objective-C
@interface PSPDFSoundAnnotationController : NSObject
Swift
class SoundAnnotationController : NSObject
Manages sound playback for sound annotations.
-
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?)
-
Unavailable
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_EMPTY_INIT_UNAVAILABLE
-
Unavailable
Not the designated initializer
Undocumented
Declaration
Objective-C
PSPDF_EMPTY_INIT_UNAVAILABLE
-
Undocumented
Declaration
Objective-C
- (instancetype)initWithSoundAnnotation:(PSPDFSoundAnnotation *)annotation NS_DESIGNATED_INITIALIZER;
Swift
init(soundAnnotation annotation: SoundAnnotation)
-
The controlled sound annotation.
Declaration
Objective-C
@property (nonatomic, weak, readonly) PSPDFSoundAnnotation *_Nullable annotation;
Swift
weak var annotation: SoundAnnotation? { get }
-
The current playback state.
Declaration
Objective-C
@property (nonatomic, readonly) PSPDFSoundAnnotationState state;
Swift
var state: SoundAnnotation.State { get }
-
The duration of the audio playback
Declaration
Objective-C
@property (nonatomic, readonly) NSTimeInterval playbackDuration;
Swift
var playbackDuration: TimeInterval { get }
-
Starts or resumes playback.
Declaration
Objective-C
- (BOOL)startPlayback:(NSError *_Nullable *_Nullable)error;
Swift
func startPlayback() throws
-
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 (nonatomic, readonly, 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.