Sound Annotation
Represents an audio file added to a page. Sound annotations can be created from recording audio using the device's microphone or by importing an existing audio file. Sound annotations are stored inside the PDF file itself. On a page, SoundAnnotations are represented by an icon, similar to NoteAnnotations. PSPDFKit will always render sound annotations at a fixed size, centered in the provided boundingBox.
Constructors
Link copied to clipboard
constructor(@IntRange(from = 0 ) pageIndex: Int, @NonNull boundingBox: RectF, @NonNull audioSource: EmbeddedAudioSource)
Creates a new sound annotation.
Creates a new sound annotation.
constructor(@NonNull properties: AnnotationPropertyManager, markDirty: Boolean, @Nullable resourceId: String)
Intended for internal usage only
constructor(@NonNull propertyMap: AnnotationPropertyManager, markDirty: Boolean, @Nullable soundData: EmbeddedAudioSource)
Intended for internal usage only
Properties
Functions
Link copied to clipboard
Returns audio data from the annotation.
Link copied to clipboard
Returns audio data from the annotation, asynchronously.
Link copied to clipboard
Encoding of the audio data.
Link copied to clipboard
The number of audio channels.
Link copied to clipboard
Returns the name of the icon that should be displayed for this annotation.
Link copied to clipboard
The number of audio samples for each channel per second.
Link copied to clipboard
The number of bits per sample value per channel.
Link copied to clipboard
Gets the annotation type of the annotation.
Link copied to clipboard
Checks if the annotation contains valid audio data in supported encoding.
Link copied to clipboard
Check if the annotation is resizable, or if this is a non-resizable annotation.
Link copied to clipboard
Replaces the audio data in this annotation.
Link copied to clipboard
Sets the name of the icon that should be displayed for this annotation.
Link copied to clipboard
open fun updateTransformationProperties(@NonNull newBoundingBox: RectF, @NonNull oldBoundingBox: RectF)
Annotations may override this method to transform their properties (i.e.