import type Map from "../Map.js"; import type WebMap from "../WebMap.js"; import type Accessor from "../core/Accessor.js"; import type VideoLayer from "../layers/VideoLayer.js"; import type Navigation from "./navigation/Navigation.js"; import type { EventedMixin } from "../core/Evented.js"; import type { EsriPromiseMixin } from "../core/Promise.js"; import type { ScreenRect } from "../core/types.js"; import type { DOMContainer, DOMContainerProperties } from "./DOMContainer.js"; import type { Viewport2DMixin } from "./Viewport2DMixin.js"; import type { NavigationProperties } from "./navigation/Navigation.js"; export interface VideoViewProperties extends DOMContainerProperties, Partial> { /** * Enables the `Shift` + `Alt`/`Option` + `O` keyboard shortcut for showing the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion). Applications should enable this only when handling custom selection of the focus region with the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event. When `false`, the shortcut does not change the [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) property. * * @internal * @since 5.2 * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) */ focusRegionShortcutEnabled?: boolean; /** * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it. * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus. * * @internal * @since 5.2 * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) */ focusRegionVisible?: boolean; /** * Options to configure the navigation behavior of the View. * * @example * // Disable the gamepad usage, single touch panning, panning momentum and mouse wheel zooming. * const view = new VideoView({ * container: "videoViewDiv", * layer: videoLayer, * navigation: { * gamepad: { * enabled: false * }, * actionMap: { * dragSecondary: "none", // Disable rotating the view with the right mouse button * mouseWheel: "none" // Disable zooming with the mouse wheel * }, * browserTouchPanEnabled: false, * momentumEnabled: false, * } * }); */ navigation?: NavigationProperties; } /** * The VideoView class provides a view for displaying video feeds from a [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/). * It is designed to render and interact with video layers. * * A VideoView must be instantiated with a valid [layer](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#layer) and [container](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#container). * It supports various features such as navigating, zooming, and panning, making it suitable for * applications that require interactive video overlays. * * > **Notes** * > * > VideoView is responsible for rendering the video feed from a VideoLayer. * > To easily interact with the VideoView in your application, and add additional UI elements like zoom controls, * > use the [Video Component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-video/). * * @since 4.33 * @see [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) * @example * const videoView = new VideoView({ * container: "videoViewDiv", * layer: videoLayer * }); */ export default class VideoView extends VideoViewSuperclass { constructor(properties?: VideoViewProperties); /** * The screen rectangle of the active focus region, or `null` when [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) is `false`. * This screen rectangle represents the area of the view that is currently in focus and can be used with methods that require a screen rectangle as input, such as `hitTest()`. * * | Action | Keyboard Shortcut / Property | * |--------|----------------------------| * | Enable or disable focus region | When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, use the `Shift` + `Alt`/`Option` + `O` keyboard shortcut while the view is in focus. Alternatively, set [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) to `true` or `false`. | * | Resize focus region | Use the `Shift` + `Alt`/`Option` + Up/Down arrow keys while the focus region is enabled. | * * To know when this focus region is selected, listen for the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event. * * @internal * @since 5.2 * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) */ get focusRegion(): ScreenRect | null; /** * Enables the `Shift` + `Alt`/`Option` + `O` keyboard shortcut for showing the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion). Applications should enable this only when handling custom selection of the focus region with the [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) event. When `false`, the shortcut does not change the [DOMContainer.focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) property. * * @internal * @since 5.2 * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) * @see [focusRegionVisible](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionVisible) * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) */ accessor focusRegionShortcutEnabled: boolean; /** * Indicates whether the [DOMContainer.focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) is visible. Set this property to `true` to show the centered focus region, or `false` to hide it. * When [DOMContainer.focusRegionShortcutEnabled](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegionShortcutEnabled) is `true`, visibility can also be toggled by pressing the `Shift` + `Alt`/`Option` + `O` keyboard shortcut when the view is in focus. * * @internal * @since 5.2 * @see [focusRegion](https://developers.arcgis.com/javascript/latest/references/core/views/DOMContainer/#focusRegion) * @see [focus-region-select](https://developers.arcgis.com/javascript/latest/references/core/views/View/#event-focus-region-select) */ accessor focusRegionVisible: boolean; /** The [VideoLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/) to display in the view. */ accessor layer: VideoLayer | null | undefined; /** A reference to the associated [Map](https://developers.arcgis.com/javascript/latest/references/core/Map/) or [WebMap](https://developers.arcgis.com/javascript/latest/references/core/WebMap/). */ accessor map: Map | WebMap | null | undefined; /** * Options to configure the navigation behavior of the View. * * @example * // Disable the gamepad usage, single touch panning, panning momentum and mouse wheel zooming. * const view = new VideoView({ * container: "videoViewDiv", * layer: videoLayer, * navigation: { * gamepad: { * enabled: false * }, * actionMap: { * dragSecondary: "none", // Disable rotating the view with the right mouse button * mouseWheel: "none" // Disable zooming with the mouse wheel * }, * browserTouchPanEnabled: false, * momentumEnabled: false, * } * }); */ get navigation(): Navigation; set navigation(value: NavigationProperties); /** * Indicates whether the operational data (e.g. layers in the map) should be visible on top of the video. When set to `true`, the video will be rendered as an underlay, allowing the operational data to be displayed over it. When set to `false`, only the video will be visible, and any operational data will be hidden. Default is `false`. * * @default false * @since 5.1 */ accessor operationalDataVisible: boolean; /** * When `true`, this property indicates whether the view successfully satisfied all dependencies, * signaling that the following conditions are met. * * - [width](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#width) * - [height](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#height) * - [videoSize](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#videoSize) * - The [layer](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#layer) is [ready](https://developers.arcgis.com/javascript/latest/references/core/layers/VideoLayer/#state). * * When a view becomes ready it will resolve itself and invoke * the callback defined in [when()](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#when) where code can execute on a working view. Subsequent * changes to a view's readiness would typically be handled by watching `view.ready` and providing * logic for cases where the [layer](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#layer) or [container](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#container) change. * * @default false * @see [when()](https://developers.arcgis.com/javascript/latest/references/core/views/VideoView/#when) */ get ready(): boolean; /** * Scale is the ratio between the size of the video in pixels and the size of the view in pixels. * A scale value of `1` displays the video at its native resolution, meaning one pixel corresponds * to one pixel in the view. If the scale value is less than `1`, the video will appear enlarged. * For example, when the scale is `0.5`, the video would be displayed at twice its native size. * * @default 0 * @example videoView.scale = 0.5; */ accessor scale: number; /** An array containing the width and height of the video in pixels, e.g. `[width, height]`. */ get videoSize(): [ number, number ]; } declare const VideoViewSuperclass: typeof Accessor & typeof EsriPromiseMixin & typeof EventedMixin & typeof DOMContainer & typeof Viewport2DMixin