import { ObjectManager } from "../../ObjectManager"; import { AnnotationBase, type AnnotationBaseProperties } from "./AnnotationBase"; import { FileSpecification } from "../FileSpecification"; import type { FileSpecificationProperties } from "../FileSpecification"; import { RichMediaAnnotationContentType } from "../../Enums"; /** * Defines properties of a rich media annotation. * Rich media annotations provide a common framework for video, audio, * animations and other multimedia presentations. * @see {@link RichMediaAnnotation} */ export type RichMediaAnnotationProperties = AnnotationBaseProperties & { type: "richmedia"; /** * The video content represented by a {@link FileSpecification} object. * Only one 'video' or 'audio' should be specified, if both specified then 'video' is preffered. */ video?: FileSpecification | FileSpecificationProperties; /** * The audio content represented by a {@link FileSpecification} object. * Only one 'video' or 'audio' should be specified, if both specified then 'video' is preffered. */ audio?: FileSpecification | FileSpecificationProperties; /** The string specifying the circumstances under which the annotation shall be activated, the valid values: "XA" - The annotation is explicitly activated by a user action or script. "PO" - The annotation is activated as soon as the page that contains the annotation receives focus as the current page. "PV" - The annotation is activated as soon as any part of the page that contains the annotation becomes visible. */ activationCondition?: "XA" | "PO" | "PV"; /** * The string specifying * the circumstances under which the annotation shall be deactivated, the valid values: * "XD" - The annotation is explicitly deactivated by a user action or script. * "PC" - The annotation is deactivated as soon as the page that contains * the annotation loses focus as the current page. * "PI" - The annotation is deactivated as soon as the entire page * that contains the annotation is no longer visible. */ deactivationCondition?: "XD" | "PC" | "PI"; /** * The string specifying * the style of presentation of the rich media (embedded or windowed), the valid values: * "Embedded", "Windowed" */ presentationStyle?: "Embedded" | "Windowed"; /** * A value indicating the default behavior of a navigation pane user interface element. * If "true", the navigation pane should be visible when the content is initially activated. * If "false", the navigation pane should not be displayed. */ showNavigationPane?: boolean; /** * Gets or sets the value indicating the default behavior of an interactive toolbar * associated with this annotation. * If "true", the toolbar should be displayed when the annotation is activated and given focus. * If "false", the toolbar should not be displayed. */ showToolbar?: boolean; }; /** * Represents a rich media annotation. * Rich media annotations provide a common framework for video, audio, * animations and other multimedia presentations. */ export declare class RichMediaAnnotation extends AnnotationBase { /** * Creates a new {@link RichMediaAnnotation}. * * @param om - {@link ObjectManager} that controls the lifetime of the {@link RichMediaAnnotation}. */ constructor(om: ObjectManager); /** * Creates a new {@link RichMediaAnnotation}. */ constructor(); /** * Sets the content of this {@link RichMediaAnnotation} to the video represented by a * {@link FileSpecification} object. * @param value - The {@link FileSpecification} object representing the video content. */ setVideo(value: FileSpecification | FileSpecificationProperties): void; /** * Sets the content of this {@link RichMediaAnnotation} to the audio represented by a * {@link FileSpecification} object. * @param value - The {@link FileSpecification} object representing the audio content. */ setAudio(value: FileSpecification | FileSpecificationProperties): void; /** * Sets the content of this {@link RichMediaAnnotation}. * @param content - The {@link FileSpecification} object representing the content. * @param contentType - The content type. */ setContent(content: FileSpecification | FileSpecificationProperties, contentType: RichMediaAnnotationContentType): void; /** * Gets an object containing {@link FileSpecification} object representing the content * associated with this {@link RichMediaAnnotation} and value specifying the type of content * audio or video. */ getContent(): { content: FileSpecification; type: RichMediaAnnotationContentType; } | null; /** Gets or sets the string specifying the circumstances under which the annotation shall be activated, the valid values: "XA" - The annotation is explicitly activated by a user action or script. "PO" - The annotation is activated as soon as the page that contains the annotation receives focus as the current page. "PV" - The annotation is activated as soon as any part of the page that contains the annotation becomes visible. */ get activationCondition(): string | null; /** Gets or sets the string specifying the circumstances under which the annotation shall be activated, the valid values: "XA" - The annotation is explicitly activated by a user action or script. "PO" - The annotation is activated as soon as the page that contains the annotation receives focus as the current page. "PV" - The annotation is activated as soon as any part of the page that contains the annotation becomes visible. */ set activationCondition(value: string | null); /** * Gets or sets the string specifying * the circumstances under which the annotation shall be deactivated, the valid values: * "XD" - The annotation is explicitly deactivated by a user action or script. * "PC" - The annotation is deactivated as soon as the page that contains * the annotation loses focus as the current page. * "PI" - The annotation is deactivated as soon as the entire page * that contains the annotation is no longer visible. */ get deactivationCondition(): string | null; /** * Gets or sets the string specifying * the circumstances under which the annotation shall be deactivated, the valid values: * "XD" - The annotation is explicitly deactivated by a user action or script. * "PC" - The annotation is deactivated as soon as the page that contains * the annotation loses focus as the current page. * "PI" - The annotation is deactivated as soon as the entire page * that contains the annotation is no longer visible. */ set deactivationCondition(value: string | null); /** * Gets or sets the string specifying * the style of presentation of the rich media (embedded or windowed), the valid values: * "Embedded", "Windowed" */ get presentationStyle(): string | null; /** * Gets or sets the string specifying * the style of presentation of the rich media (embedded or windowed), the valid values: * "Embedded", "Windowed" */ set presentationStyle(value: string | null); /** * Gets or sets a value indicating the default behavior of a navigation pane user interface element. * If "true", the navigation pane should be visible when the content is initially activated. * If "false", the navigation pane should not be displayed. * The default is "false". */ get showNavigationPane(): boolean; /** * Gets or sets a value indicating the default behavior of a navigation pane user interface element. * If "true", the navigation pane should be visible when the content is initially activated. * If "false", the navigation pane should not be displayed. * The default is "false". */ set showNavigationPane(value: boolean); /** * Gets or sets the value indicating the default behavior of an interactive toolbar * associated with this annotation. * If "true", the toolbar should be displayed when the annotation is activated and given focus. * If "false", the toolbar should not be displayed. */ get showToolbar(): boolean; /** * Gets or sets the value indicating the default behavior of an interactive toolbar * associated with this annotation. * If "true", the toolbar should be displayed when the annotation is activated and given focus. * If "false", the toolbar should not be displayed. */ set showToolbar(value: boolean); }