Skip to content

Video

ESM:
Use dark colors for code blocksCopy
1
import "@arcgis/map-components/components/arcgis-video";
CDN:
No specific import is needed for this component.
Since:ArcGIS Maps SDK for JavaScript 4.33

The ArcGIS Video component provides a view for displaying video feeds from a VideoLayer. It is designed to render and interact with video layers.

A Video component must have a valid VideoLayer. It supports various features such as navigating, zooming, and panning, making it suitable for applications that require interactive video overlays.

Example
Use dark colors for code blocksCopy
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<arcgis-video></arcgis-video>

<script type="module">
  const VideoLayer = await $arcgis.import("@arcgis/core/layers/VideoLayer.js");
  const videoElement = document.querySelector("arcgis-video");
  const videoLayer = new VideoLayer({
    autoplay: true,
    url: "YOUR_VIDEO_LAYER_URL",
  });
  await videoLayer.load();
  if (videoLayer.loaded) {
    videoElement.layer = videoLayer;
  }
</script>

Properties

PropertyAttributeType
ariaDOMContainerAria
autoDestroyDisabledauto-destroy-disabledboolean
layerVideoLayer
mapMap | WebMap
ready
readonly
boolean
view
readonly
VideoView

aria

Property
aria: DOMContainerAria
Since:ArcGIS Maps SDK for JavaScript 4.34Video since 4.33, aria added at 4.34.

The ARIA attributes for the view container. Provides accessibility information to assistive technologies such as screen readers. Supports the following properties: label, description, describedByElements, and labelledByElements.

autoDestroyDisabled

Property
autoDestroyDisabled: boolean
Attribute
auto-destroy-disabled
Default value
false

layer

Property
layer: VideoLayer

The VideoLayer to display in the view.

Read more...

map

Property
map: Map | WebMap

A reference to the associated Map or WebMap.

Default value
null

ready

readonlyProperty
ready: boolean

When true, this property indicates whether the view successfully satisfied all dependencies, signaling that the following conditions are met.

Read more...

Default value
false

view

readonlyProperty
view: VideoView

The VideoView instance created and manged by the component. Accessible once the component is fully loaded.

Methods

MethodSignature
componentOnReadycomponentOnReady(): Promise<void>
destroydestroy(): Promise<void>

componentOnReady

Method
componentOnReady(): Promise<void>

Create a promise that resolves once component is fully loaded.

Example
Use dark colors for code blocksCopy
1
2
3
4
const arcgisVideo = document.querySelector("arcgis-video");
document.body.append(arcgisVideo);
await arcgisVideo.componentOnReady();
console.log("arcgis-video is ready to go!");
Returns
Promise<void>

destroy

Method
destroy(): Promise<void>

Destroys the view, and any associated resources, including its map, popup, and UI elements.

Returns
Promise<void>

Events

arcgisViewReadyChange

Event
arcgisViewReadyChange: CustomEvent<void>
bubbles
composed
cancelable

Slots

NameDescription
default(unnamed)

Default slot for adding components to the video. User is responsible for positioning the content via CSS.

top-left

Slot for components positioned in the top-left corner.

top-right

Slot for components positioned in the top-right corner.

bottom-left

Slot for components positioned in the bottom-left corner.

bottom-right

Slot for components positioned in the bottom-right corner.

top-start

Slot for components positioned at the top-start (top-left in LTR, top-right in RTL).

top-end

Slot for components positioned at the top-end (top-right in LTR, top-left in RTL).

bottom-start

Slot for components positioned at the bottom-start (bottom-left in LTR, bottom-right in RTL).

bottom-end

Slot for components positioned at the bottom-end (bottom-right in LTR, bottom-left in RTL).

default (unnamed)

Slot

Default slot for adding components to the video. User is responsible for positioning the content via CSS.

top-left

Slot

Slot for components positioned in the top-left corner.

top-right

Slot

Slot for components positioned in the top-right corner.

bottom-left

Slot

Slot for components positioned in the bottom-left corner.

bottom-right

Slot

Slot for components positioned in the bottom-right corner.

top-start

Slot

Slot for components positioned at the top-start (top-left in LTR, top-right in RTL).

top-end

Slot

Slot for components positioned at the top-end (top-right in LTR, top-left in RTL).

bottom-start

Slot

Slot for components positioned at the bottom-start (bottom-left in LTR, bottom-right in RTL).

bottom-end

Slot

Slot for components positioned at the bottom-end (bottom-right in LTR, bottom-left in RTL).

Styles

NameDescription
--arcgis-layout-overlay-space-top

Since 4.34 Specifies the top padding for the layout.

--arcgis-layout-overlay-space-bottom

Since 4.34 Specifies the bottom padding for the layout.

--arcgis-layout-overlay-space-left

Since 4.34 Specifies the left padding for the layout.

--arcgis-layout-overlay-space-right

Since 4.34 Specifies the right padding for the layout.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.