@voicenter-team/opensips-js 1.0.118 → 1.0.120

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -82419,13 +82419,13 @@ class Wy extends Dw {
82419
82419
  super("ScreenShareWhiteboard", "screen"), this.imageSrc = null, this.konvaDrawer = null, this.mode = void 0, this.screenSharePlugin = null, this.selectors = {}, this.screenSharePlugin = e, this.selectors = {
82420
82420
  ...Ame,
82421
82421
  ...t.selectors || {}
82422
- };
82422
+ }, this.selectors.document || (this.selectors.document = document);
82423
82423
  }
82424
82424
  createVideoElement() {
82425
82425
  const e = document.createElement("video");
82426
82426
  e.setAttribute("id", this.selectors.videoElement), e.setAttribute("autoplay", ""), e.style.setProperty("visibility", "hidden"), e.style.setProperty("width", "auto"), e.style.setProperty("height", "auto"), this.video = e;
82427
82427
  const t = document.createElement("div");
82428
- t.classList.add(this.selectors.videoElementContainer), t.style.setProperty("display", "none"), t.appendChild(e), this.wrapperEl = t, document.body.appendChild(t);
82428
+ t.classList.add(this.selectors.videoElementContainer), t.style.setProperty("display", "none"), t.appendChild(e), this.wrapperEl = t, this.selectors.document.body ? this.selectors.document.body.appendChild(t) : this.selectors.document.appendChild(t);
82429
82429
  }
82430
82430
  getAspectRatioDimensions(e, t) {
82431
82431
  const n = e.getTracks()[0].getSettings(), i = t.clientWidth, s = t.clientHeight, a = n.width, o = n.height, u = a / o, c = i / s;
@@ -82444,9 +82444,9 @@ class Wy extends Dw {
82444
82444
  */
82445
82445
  async start(e) {
82446
82446
  this.createVideoElement(), this.initialStream = e, this.video.srcObject = e;
82447
- const t = document.getElementById(this.selectors.container);
82447
+ const t = this.selectors.document.getElementById(this.selectors.container);
82448
82448
  t.style.setProperty("position", "relative"), t.style.setProperty("min-width", "100%"), t.style.setProperty("height", "100%"), t.style.setProperty("display", "flex"), t.style.setProperty("justify-content", "center");
82449
- const n = document.getElementById(this.selectors.compositeCanvasContainer);
82449
+ const n = this.selectors.document.getElementById(this.selectors.compositeCanvasContainer);
82450
82450
  n.style.setProperty("position", "relative"), n.style.setProperty("margin", "auto 0");
82451
82451
  const { width: i, height: s } = this.getAspectRatioDimensions(e, t);
82452
82452
  let a = i, o = s;
@@ -82457,7 +82457,7 @@ class Wy extends Dw {
82457
82457
  });
82458
82458
  const u = this.screenShareKonvaDrawer.addLayer();
82459
82459
  this.screenShareKonvaDrawer.initFreeDrawing(u);
82460
- const c = document.getElementById(this.selectors.drawerContainer), d = c.querySelector("canvas"), p = c.querySelector(".konvajs-content"), m = document.getElementById(this.selectors.compositeCanvas);
82460
+ const c = this.selectors.document.getElementById(this.selectors.drawerContainer), d = c.querySelector("canvas"), p = c.querySelector(".konvajs-content"), m = this.selectors.document.getElementById(this.selectors.compositeCanvas);
82461
82461
  m.style.setProperty("position", "absolute"), m.style.setProperty("top", "0"), m.style.setProperty("left", "0");
82462
82462
  const _ = m.getContext("2d"), y = () => {
82463
82463
  const { width: w, height: x } = this.getAspectRatioDimensions(e, t);