@arcgis/map-components
Version:
ArcGIS Map Components
48 lines (47 loc) • 1.78 kB
JavaScript
import { c as t } from "../../chunks/runtime.js";
import { makeAccessorController as s } from "@arcgis/lumina/controllers/accessor";
import { watch as e } from "@arcgis/core/core/reactiveUtils.js";
import a from "@arcgis/core/views/VideoView.js";
import { LitElement as r, createEvent as o, noShadowRoot as h } from "@arcgis/lumina";
import { css as l } from "@lit/reactive-element/css-tag.js";
/*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.33/esri/copyright.txt for details.
v4.33.13 */
const d = l`{arcgis-video{display:block;height:100%;width:100%;.esri-view{height:100%;width:100%}}}`, c = s(a, {
omitProps: ["container", "navigation", "scale", "ui"]
});
class m extends r {
constructor() {
super(), this.autoDestroyDisabled = !1, this.view = c(this), this.ready = this.view.ready, this.layer = this.view.layer, this.map = this.view.map, this.arcgisViewReadyChange = o();
}
static {
this.properties = { autoDestroyDisabled: 5, view: 32, ready: 4, layer: 0, map: 0 };
}
static {
this.shadowRootOptions = h;
}
static {
this.styles = d;
}
async destroy() {
await this.manager.destroy();
}
load() {
const i = this;
i.el.childElem = document.createElement("div"), i.el.append(i.el.childElem), this.view.container = i.el.childElem;
}
loaded() {
this.manager.onLifecycle(() => [
e(() => this.layer, () => {
this.layer && this.view && (this.view.layer = this.layer, this.layer.loaded || this.layer.load());
}, { initial: !0 }),
e(() => this.view.ready, () => {
this.view.ready && this.arcgisViewReadyChange.emit();
}, { initial: this.view.ready })
]);
}
}
t("arcgis-video", m);
export {
m as ArcgisVideo
};