@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
122 lines (120 loc) • 6.12 kB
TypeScript
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 { DOMContainer, DOMContainerProperties } from "./DOMContainer.js";
import type { Viewport2DMixin } from "./Viewport2DMixin.js";
import type { NavigationProperties } from "./navigation/Navigation.js";
export interface VideoViewProperties extends DOMContainerProperties, Partial<Pick<VideoView, "layer" | "map" | "scale">> {
/**
* 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 [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);
/**
* 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