@webitel/ui-sdk 25.10.57 → 25.10.59

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.
Files changed (25) hide show
  1. package/dist/{install-BA-wW2x7.js → install-CSFHmKMg.js} +1659 -1646
  2. package/dist/ui-sdk.css +1 -1
  3. package/dist/ui-sdk.js +1 -1
  4. package/dist/ui-sdk.umd.cjs +34 -34
  5. package/dist/{vidstack-Bq6c3Bam-BYiLfDL7.js → vidstack-Bq6c3Bam-B986laoT.js} +2 -2
  6. package/dist/{vidstack-D2pY00kU-CVWx-yHP.js → vidstack-D2pY00kU-CanI4lQe.js} +2 -2
  7. package/dist/{vidstack-DDXt6fpN-BagNaE5J.js → vidstack-DDXt6fpN-Dqmm7fj6.js} +1 -1
  8. package/dist/{vidstack-D_-9AA6_-DrRiBDDV.js → vidstack-D_-9AA6_-BN_hFKDq.js} +1 -1
  9. package/dist/{vidstack-DqAw8m9J-D4-vRGk-.js → vidstack-DqAw8m9J-He_m3NxW.js} +1 -1
  10. package/dist/{vidstack-audio-BfGSVaa3.js → vidstack-audio-C8PKjqvV.js} +2 -2
  11. package/dist/{vidstack-dash-V4qbr09v.js → vidstack-dash-B7oepLjG.js} +3 -3
  12. package/dist/{vidstack-google-cast-CT40gY6Z.js → vidstack-google-cast-CQk0kX_z.js} +3 -3
  13. package/dist/{vidstack-hls-D62WkG1T.js → vidstack-hls-h9DeHhUl.js} +3 -3
  14. package/dist/{vidstack-video-HjNlMLft.js → vidstack-video-hLjkIjzA.js} +2 -2
  15. package/dist/{vidstack-vimeo-CHeghuZO.js → vidstack-vimeo-CeAFeHi1.js} +3 -3
  16. package/dist/{vidstack-youtube-BwookFna.js → vidstack-youtube-ubCCIUAI.js} +2 -2
  17. package/package.json +1 -1
  18. package/src/components/wt-vidstack-player/components/layouts/video-layout.vue +2 -3
  19. package/src/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue +8 -3
  20. package/src/components/wt-vidstack-player/components/panels/video-display-panel/video-display-panel.vue +19 -1
  21. package/src/components/wt-vidstack-player/wt-vidstack-player.vue +61 -13
  22. package/src/store/new/modules/tableStoreModule/tableStoreModule.js +2 -0
  23. package/types/components/wt-vidstack-player/components/layouts/video-layout.vue.d.ts +2 -0
  24. package/types/components/wt-vidstack-player/components/panels/screen-sharing-control-panel/screen-sharing-control-panel.vue.d.ts +5 -1
  25. package/types/components/wt-vidstack-player/wt-vidstack-player.vue.d.ts +4 -0
@@ -5,8 +5,8 @@ var ot = (n) => {
5
5
  var Xt = (n, t, s) => t in n ? Qt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : n[t] = s;
6
6
  var M = (n, t, s) => Xt(n, typeof t != "symbol" ? t + "" : t, s), X = (n, t, s) => t.has(n) || ot("Cannot " + s);
7
7
  var i = (n, t, s) => (X(n, t, "read from private field"), s ? s.call(n) : t.get(n)), d = (n, t, s) => t.has(n) ? ot("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), c = (n, t, s, r) => (X(n, t, "write to private field"), r ? r.call(n, s) : t.set(n, s), s), a = (n, t, s) => (X(n, t, "access private method"), s);
8
- import { y as Yt, x as ut, z as j, A as Zt, b as ti, E as nt, e as lt, B as _, C as ii, F as ei, d as si, G as ai, l as rt, H as dt, D as ni, L as Y, J as Z } from "./install-BA-wW2x7.js";
9
- import { R as ri } from "./vidstack-DqAw8m9J-D4-vRGk-.js";
8
+ import { y as Yt, x as ut, z as j, A as Zt, b as ti, E as nt, e as lt, B as _, C as ii, F as ei, d as si, G as ai, l as rt, H as dt, D as ni, L as Y, J as Z } from "./install-CSFHmKMg.js";
9
+ import { R as ri } from "./vidstack-DqAw8m9J-He_m3NxW.js";
10
10
  let q = null, z = [], J = [];
11
11
  function ht() {
12
12
  return q ?? (q = new AudioContext());
@@ -5,7 +5,7 @@ var w = (t) => {
5
5
  var P = (t, e, a) => e in t ? _(t, e, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[e] = a;
6
6
  var u = (t, e, a) => P(t, typeof e != "symbol" ? e + "" : e, a), C = (t, e, a) => e.has(t) || w("Cannot " + a);
7
7
  var c = (t, e, a) => (C(t, e, "read from private field"), a ? a.call(t) : e.get(t)), m = (t, e, a) => e.has(t) ? w("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, a), y = (t, e, a, o) => (C(t, e, "write to private field"), o ? o.call(t, a) : e.set(t, a), a), s = (t, e, a) => (C(t, e, "access private method"), a);
8
- import { l as b, h as A, S as O, C as D, d as R, m as M } from "./install-BA-wW2x7.js";
8
+ import { l as b, h as A, S as O, C as D, d as R, m as M } from "./install-CSFHmKMg.js";
9
9
  function G() {
10
10
  return "https://www.gstatic.com/cv/js/sender/v1/cast_sender.js?loadCastFramework=1";
11
11
  }
@@ -94,7 +94,7 @@ class F {
94
94
  async load(e) {
95
95
  if (!c(this, n))
96
96
  throw Error("[vidstack] google cast player was not initialized");
97
- return new (await import("./vidstack-google-cast-CT40gY6Z.js")).GoogleCastProvider(c(this, n), e);
97
+ return new (await import("./vidstack-google-cast-CQk0kX_z.js")).GoogleCastProvider(c(this, n), e);
98
98
  }
99
99
  }
100
100
  n = new WeakMap(), r = new WeakSet(), S = async function(e) {
@@ -5,7 +5,7 @@ var g = (s) => {
5
5
  var w = (s, t, i) => t in s ? y(s, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : s[t] = i;
6
6
  var c = (s, t, i) => w(s, typeof t != "symbol" ? t + "" : t, i), h = (s, t, i) => t.has(s) || g("Cannot " + i);
7
7
  var e = (s, t, i) => (h(s, t, "read from private field"), i ? i.call(s) : t.get(s)), l = (s, t, i) => t.has(s) ? g("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(s) : t.set(s, i), p = (s, t, i, a) => (h(s, t, "write to private field"), a ? a.call(s, i) : t.set(s, i), i), u = (s, t, i) => (h(s, t, "access private method"), i);
8
- import { J as M, l as f, e as A, d as P, R as O, b as S } from "./install-BA-wW2x7.js";
8
+ import { J as M, l as f, e as A, d as P, R as O, b as S } from "./install-CSFHmKMg.js";
9
9
  var r, o, b, m;
10
10
  class W {
11
11
  constructor(t) {
@@ -1,4 +1,4 @@
1
- import { c as d, a as i, I as l, e as m } from "./install-BA-wW2x7.js";
1
+ import { c as d, a as i, I as l, e as m } from "./install-CSFHmKMg.js";
2
2
  const p = /* @__PURE__ */ i(
3
3
  '<svg viewBox="0 0 32 32" fill="none" aria-hidden="true" xmlns="http://www.w3.org/2000/svg"></svg>'
4
4
  );
@@ -3,7 +3,7 @@ var l = (i) => {
3
3
  };
4
4
  var c = (i, t, s) => t.has(i) || l("Cannot " + s);
5
5
  var r = (i, t, s) => (c(i, t, "read from private field"), s ? s.call(i) : t.get(i)), e = (i, t, s) => t.has(i) ? l("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, s), h = (i, t, s, f) => (c(i, t, "write to private field"), f ? f.call(i, s) : t.set(i, s), s), m = (i, t, s) => (c(i, t, "access private method"), s);
6
- import { j as p, t as u } from "./install-BA-wW2x7.js";
6
+ import { j as p, t as u } from "./install-CSFHmKMg.js";
7
7
  var o, a, n, d;
8
8
  class F {
9
9
  constructor(t) {
@@ -1,8 +1,8 @@
1
1
  var a = Object.defineProperty;
2
2
  var o = (i, e, t) => e in i ? a(i, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[e] = t;
3
3
  var r = (i, e, t) => o(i, typeof e != "symbol" ? e + "" : e, t);
4
- import { s as p } from "./install-BA-wW2x7.js";
5
- import { H as d, a as u } from "./vidstack-Bq6c3Bam-BYiLfDL7.js";
4
+ import { s as p } from "./install-CSFHmKMg.js";
5
+ import { H as d, a as u } from "./vidstack-Bq6c3Bam-B986laoT.js";
6
6
  class n extends d {
7
7
  constructor(t, s) {
8
8
  super(t, s);
@@ -5,9 +5,9 @@ var Y = (n) => {
5
5
  var wt = (n, t, e) => t in n ? vt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
6
6
  var I = (n, t, e) => wt(n, typeof t != "symbol" ? t + "" : t, e), b = (n, t, e) => t.has(n) || Y("Cannot " + e);
7
7
  var i = (n, t, e) => (b(n, t, "read from private field"), e ? e.call(n) : t.get(n)), f = (n, t, e) => t.has(n) ? Y("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, e), p = (n, t, e, r) => (b(n, t, "write to private field"), r ? r.call(n, e) : t.set(n, e), e), h = (n, t, e) => (b(n, t, "access private method"), e);
8
- import { o as Et, b as _, p as Lt, d as At, Q as z, l as J, e as Dt, D as N, f as xt, g as O, T as Mt, L as q, q as Ct, r as Nt, t as Rt, h as Ft, j as Z, k as Pt, m as qt, n as _t } from "./install-BA-wW2x7.js";
9
- import { VideoProvider as $t } from "./vidstack-video-HjNlMLft.js";
10
- import { R as jt } from "./vidstack-DqAw8m9J-D4-vRGk-.js";
8
+ import { o as Et, b as _, p as Lt, d as At, Q as z, l as J, e as Dt, D as N, f as xt, g as O, T as Mt, L as q, q as Ct, r as Nt, t as Rt, h as Ft, j as Z, k as Pt, m as qt, n as _t } from "./install-CSFHmKMg.js";
9
+ import { VideoProvider as $t } from "./vidstack-video-hLjkIjzA.js";
10
+ import { R as jt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
11
11
  function W(n) {
12
12
  try {
13
13
  return new Intl.DisplayNames(navigator.languages, { type: "language" }).of(n) ?? null;
@@ -5,9 +5,9 @@ var W = (d) => {
5
5
  var vt = (d, t, s) => t in d ? Lt(d, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : d[t] = s;
6
6
  var G = (d, t, s) => vt(d, typeof t != "symbol" ? t + "" : t, s), O = (d, t, s) => t.has(d) || W("Cannot " + s);
7
7
  var e = (d, t, s) => (O(d, t, "read from private field"), s ? s.call(d) : t.get(d)), T = (d, t, s) => t.has(d) ? W("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(d) : t.set(d, s), l = (d, t, s, i) => (O(d, t, "write to private field"), i ? i.call(d, s) : t.set(d, s), s), r = (d, t, s) => (O(d, t, "access private method"), s);
8
- import { y as St, K as L, U as Z, x as At, D as tt, d as V, l as et, e as It, V as bt, L as Rt } from "./install-BA-wW2x7.js";
9
- import { R as wt } from "./vidstack-DqAw8m9J-D4-vRGk-.js";
10
- import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-CVWx-yHP.js";
8
+ import { y as St, K as L, U as Z, x as At, D as tt, d as V, l as et, e as It, V as bt, L as Rt } from "./install-CSFHmKMg.js";
9
+ import { R as wt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
10
+ import { g as Mt, a as Dt, b as it, h as st, l as Nt, c as Pt } from "./vidstack-D2pY00kU-CanI4lQe.js";
11
11
  var g, _, at;
12
12
  class _t {
13
13
  constructor(t) {
@@ -5,9 +5,9 @@ var N = (n) => {
5
5
  var ot = (n, t, i) => t in n ? rt(n, t, { enumerable: !0, configurable: !0, writable: !0, value: i }) : n[t] = i;
6
6
  var _ = (n, t, i) => ot(n, typeof t != "symbol" ? t + "" : t, i), R = (n, t, i) => t.has(n) || N("Cannot " + i);
7
7
  var e = (n, t, i) => (R(n, t, "read from private field"), i ? i.call(n) : t.get(n)), p = (n, t, i) => t.has(n) ? N("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, i), f = (n, t, i, s) => (R(n, t, "write to private field"), s ? s.call(n, i) : t.set(n, i), i), a = (n, t, i) => (R(n, t, "access private method"), i);
8
- import { i as ht, b as C, p as at, d as O, Q as V, l as j, e as dt, D as x, f as ut, T as ct, g as k, L as $, h as lt, j as q, k as pt, m as ft, n as vt } from "./install-BA-wW2x7.js";
9
- import { VideoProvider as yt } from "./vidstack-video-HjNlMLft.js";
10
- import { R as gt } from "./vidstack-DqAw8m9J-D4-vRGk-.js";
8
+ import { i as ht, b as C, p as at, d as O, Q as V, l as j, e as dt, D as x, f as ut, T as ct, g as k, L as $, h as lt, j as q, k as pt, m as ft, n as vt } from "./install-CSFHmKMg.js";
9
+ import { VideoProvider as yt } from "./vidstack-video-hLjkIjzA.js";
10
+ import { R as gt } from "./vidstack-DqAw8m9J-He_m3NxW.js";
11
11
  const Lt = (n) => ut(n);
12
12
  var T, h, o, D, b, r, E, M, U, F, Q, K, W, B, J, X, Y, z, G, Z, tt;
13
13
  class St {
@@ -5,8 +5,8 @@ var b = (i) => {
5
5
  var N = (i, t, e) => t in i ? $(i, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[t] = e;
6
6
  var m = (i, t, e) => N(i, typeof t != "symbol" ? t + "" : t, e), E = (i, t, e) => t.has(i) || b("Cannot " + e);
7
7
  var s = (i, t, e) => (E(i, t, "read from private field"), e ? e.call(i) : t.get(i)), r = (i, t, e) => t.has(i) ? b("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(i) : t.set(i, e), c = (i, t, e, n) => (E(i, t, "write to private field"), n ? n.call(i, e) : t.set(i, e), e), p = (i, t, e) => (E(i, t, "access private method"), e);
8
- import { s as U, u as V, v as A, w as q, x as C, l as F, D as Y, E as _, T as j, g as v } from "./install-BA-wW2x7.js";
9
- import { H as z, a as B } from "./vidstack-Bq6c3Bam-BYiLfDL7.js";
8
+ import { s as U, u as V, v as A, w as q, x as C, l as F, D as Y, E as _, T as j, g as v } from "./install-CSFHmKMg.js";
9
+ import { H as z, a as B } from "./vidstack-Bq6c3Bam-B986laoT.js";
10
10
  var P, f, k, D, H;
11
11
  class G {
12
12
  constructor(t, e) {
@@ -5,9 +5,9 @@ var N = (r) => {
5
5
  var de = (r, c, e) => c in r ? ue(r, c, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[c] = e;
6
6
  var b = (r, c, e) => de(r, typeof c != "symbol" ? c + "" : c, e), S = (r, c, e) => c.has(r) || N("Cannot " + e);
7
7
  var t = (r, c, e) => (S(r, c, "read from private field"), e ? e.call(r) : c.get(r)), f = (r, c, e) => c.has(r) ? N("Cannot add the same private member more than once") : c instanceof WeakSet ? c.add(r) : c.set(r, e), u = (r, c, e, i) => (S(r, c, "write to private field"), i ? i.call(r, e) : c.set(r, e), e), o = (r, c, e) => (S(r, c, "access private method"), e);
8
- import { y as fe, J as U, K as C, p as pe, e as q, d as Q, b as ye, M as _, L as R, l as be, N as ke, T as ve, Q as J } from "./install-BA-wW2x7.js";
9
- import { R as me } from "./vidstack-DqAw8m9J-D4-vRGk-.js";
10
- import { E as we } from "./vidstack-DDXt6fpN-BagNaE5J.js";
8
+ import { y as fe, J as U, K as C, p as pe, e as q, d as Q, b as ye, M as _, L as R, l as be, N as ke, T as ve, Q as J } from "./install-CSFHmKMg.js";
9
+ import { R as me } from "./vidstack-DqAw8m9J-He_m3NxW.js";
10
+ import { E as we } from "./vidstack-DDXt6fpN-Dqmm7fj6.js";
11
11
  import { resolveVimeoVideoId as Pe, getVimeoVideoInfo as Te } from "./vidstack-krOAtKMi-B4IZWKdc.js";
12
12
  const Ce = [
13
13
  "bufferend",
@@ -5,8 +5,8 @@ var B = (r) => {
5
5
  var N = (r, n, e) => n in r ? K(r, n, { enumerable: !0, configurable: !0, writable: !0, value: e }) : r[n] = e;
6
6
  var T = (r, n, e) => N(r, typeof n != "symbol" ? n + "" : n, e), R = (r, n, e) => n.has(r) || B("Cannot " + e);
7
7
  var s = (r, n, e) => (R(r, n, "read from private field"), e ? e.call(r) : n.get(r)), p = (r, n, e) => n.has(r) ? B("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(r) : n.set(r, e), l = (r, n, e, t) => (R(r, n, "write to private field"), t ? t.call(r, e) : n.set(r, e), e), o = (r, n, e) => (R(r, n, "access private method"), e);
8
- import { y as q, J as z, p as A, e as G, b as H, M as Q, K as C, O as W, t as $, P as X } from "./install-BA-wW2x7.js";
9
- import { E as Z } from "./vidstack-DDXt6fpN-BagNaE5J.js";
8
+ import { y as q, J as z, p as A, e as G, b as H, M as Q, K as C, O as W, t as $, P as X } from "./install-CSFHmKMg.js";
9
+ import { E as Z } from "./vidstack-DDXt6fpN-Dqmm7fj6.js";
10
10
  import { resolveYouTubeVideoId as ee } from "./vidstack-Dm1xEU9Q-qSXq3AI-.js";
11
11
  const b = {
12
12
  Ended: 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webitel/ui-sdk",
3
- "version": "25.10.57",
3
+ "version": "25.10.59",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "make-all": "npm version patch --git-tag-version false && npm run build && (npm run build:types || true) && (npm run lint:fix || true) && npm run publish-lib",
@@ -17,7 +17,7 @@
17
17
  </template>
18
18
 
19
19
  <template v-if="props.mode === 'stream'">
20
- <screen-sharing-control-panel :session="props.session" />
20
+ <screen-sharing-control-panel :session="props.session" @close-session="emit('close-session')" />
21
21
  </template>
22
22
  </media-controls>
23
23
  </template>
@@ -44,6 +44,7 @@ const props = defineProps<{
44
44
 
45
45
  const emit = defineEmits<{
46
46
  'close-player': [],
47
+ 'close-session': [],
47
48
  }>();
48
49
  </script>
49
50
 
@@ -51,8 +52,6 @@ const emit = defineEmits<{
51
52
  .video-layout {
52
53
 
53
54
  .video-display-panel {
54
- opacity: 1;
55
-
56
55
  :deep(.video-display-panel__controls) { // hide panel buttons
57
56
  opacity: 0;
58
57
  transition: all var(--transition) ease-out;
@@ -50,7 +50,7 @@
50
50
 
51
51
  <script setup lang="ts">
52
52
  import convertDuration from '@webitel/ui-sdk/src/scripts/convertDuration';
53
- import {computed, inject, onUnmounted, ref, watch} from 'vue';
53
+ import {computed, defineEmits, inject, onUnmounted, ref, watch} from 'vue';
54
54
 
55
55
  import {WtVidstackPlayerSession} from "../../../types/WtVidstackPlayerSession";
56
56
 
@@ -61,6 +61,10 @@ interface Props {
61
61
  }
62
62
  const props = defineProps<Props>();
63
63
 
64
+ const emit = defineEmits<{
65
+ 'close-session': [],
66
+ }>()
67
+
64
68
  const {size} = inject('size');
65
69
  const screenshotStatus = ref<ScreenshotStatus | null>(null)
66
70
 
@@ -105,9 +109,9 @@ const toggleRecordAction = () => {
105
109
  }
106
110
  };
107
111
 
108
- const makeScreenshot = () => {
112
+ const makeScreenshot = async () => {
109
113
  try {
110
- props.session.screenshot()
114
+ await props.session.screenshot()
111
115
  changeScreenshotStatus('done')
112
116
  } catch {
113
117
  changeScreenshotStatus('error')
@@ -123,6 +127,7 @@ const changeScreenshotStatus = (status: ScreenshotStatus) => {
123
127
 
124
128
  const closeSession = () => {
125
129
  props.session.close()
130
+ emit('close-session')
126
131
  };
127
132
 
128
133
  onUnmounted(() => {
@@ -7,8 +7,12 @@
7
7
  <wt-avatar
8
8
  v-if="props.username"
9
9
  :username="props.username"
10
+ size="sm"
10
11
  />
11
- {{ props.title || props.username }}
12
+
13
+ <span>
14
+ {{ props.title || props.username }}
15
+ </span>
12
16
  </div>
13
17
  <div class="video-display-panel__controls">
14
18
  <toggle-button
@@ -72,9 +76,14 @@ const handlePlayerSize = (value: boolean) => {
72
76
  background: var(--p-player-head-line-background);
73
77
  color: var(--p-player-head-line-color);
74
78
  transition: all var(--transition) ease-in-out;
79
+ backdrop-filter: blur(var(--p-player-head-line-blur));
80
+ opacity: 0;
75
81
 
76
82
  &__title {
77
83
  @extend %typo-body-1-bold;
84
+ display: flex;
85
+ align-items: center;
86
+ gap: var(--p-player-headline-sm-gap);
78
87
  }
79
88
 
80
89
  &__controls {
@@ -83,13 +92,22 @@ const handlePlayerSize = (value: boolean) => {
83
92
  gap: var(--p-player-headline-sm-gap);
84
93
  }
85
94
 
95
+ &--sm {
96
+ gap: var(--p-player-headline-sm-gap);
97
+ }
98
+
86
99
  &--md {
87
100
  padding: var(--p-player-headline-md-padding);
101
+ gap: var(--p-player-headline-md-gap);
88
102
 
89
103
  .video-display-panel__controls {
90
104
  gap: var(--p-player-headline-md-gap);
91
105
  }
92
106
  }
107
+
108
+ &--lg {
109
+ gap: var(--p-player-headline-lg-gap);
110
+ }
93
111
  }
94
112
 
95
113
  </style>
@@ -7,13 +7,16 @@
7
7
  ref="player"
8
8
  :src="playerSrc"
9
9
  :autoplay="props.autoplay"
10
+ :muted="props.muted"
10
11
  class="wt-vidstack-player__player"
11
12
  cross-origin
12
13
  plays-inline
13
14
  @close="emit('close')"
14
15
  @change-size="changeSize"
15
16
  >
16
- <media-provider></media-provider>
17
+ <media-provider
18
+ class="wt-vidstack-player__provider"
19
+ ></media-provider>
17
20
  <video-layout
18
21
  :closable="props.closable"
19
22
  :autoplay="props.autoplay"
@@ -22,6 +25,7 @@
22
25
  :session="props.session"
23
26
  :mode="mode"
24
27
  @close-player="emit('close')"
28
+ @close-session="emit('close-session')"
25
29
  />
26
30
 
27
31
  </media-player>
@@ -33,7 +37,18 @@ import 'vidstack/player';
33
37
  import 'vidstack/player/ui';
34
38
 
35
39
  import type { MediaPlayerElement } from 'vidstack/elements';
36
- import {computed, defineEmits, defineProps, onMounted,provide, ref, useTemplateRef} from 'vue';
40
+ import {
41
+ computed,
42
+ defineEmits,
43
+ defineProps,
44
+ nextTick,
45
+ onBeforeUnmount,
46
+ onMounted,
47
+ provide,
48
+ ref,
49
+ useTemplateRef,
50
+ watch
51
+ } from 'vue';
37
52
 
38
53
  import {ComponentSize} from '../../enums';
39
54
  import VideoLayout from './components/layouts/video-layout.vue';
@@ -44,6 +59,7 @@ interface Props {
44
59
  src: string | { src: string; type?: string };
45
60
  mime?: string;
46
61
  autoplay?: boolean;
62
+ muted?: boolean;
47
63
  title?: string;
48
64
  username?: string;
49
65
  closable?: boolean;
@@ -55,6 +71,7 @@ interface Props {
55
71
  const props = withDefaults(defineProps<Props>(), {
56
72
  mime: 'video/mp4',
57
73
  autoplay: false,
74
+ muted: false,
58
75
  title: '',
59
76
  username: '',
60
77
  closable: false,
@@ -63,6 +80,7 @@ const props = withDefaults(defineProps<Props>(), {
63
80
 
64
81
  const emit = defineEmits<{
65
82
  'close': [],
83
+ 'close-session': [],
66
84
  }>()
67
85
 
68
86
  const player = useTemplateRef<MediaPlayerElement>('player');
@@ -100,16 +118,30 @@ const playerSrc = computed(() => {
100
118
  });
101
119
 
102
120
  /** @author @Oleksandr Palonnyi
103
- * Attach MediaStream to Vidstack player after mount.
104
- * A short delay ensures the internal <video> is ready before playback.
121
+ * Binds the incoming MediaStream to the Vidstack player after mount.
122
+ * A brief delay ensures the internal <video> element is ready before playback starts.
105
123
  */
106
- onMounted(async () => {
107
- if (player.value && props.mode === 'stream') {
108
- setTimeout(async () => {
109
- const videoEl = player.value.querySelector('video')
110
- videoEl.srcObject = props.stream
124
+ onMounted(() => {
125
+ if (player.value && props.mode === 'stream' && props.stream) {
126
+ const videoEl = player.value.querySelector('video')
127
+
128
+ videoEl.addEventListener("loadedmetadata", async () => {
111
129
  await videoEl.play().catch((err) => console.error('play error:', err))
112
- }, 100)
130
+ })
131
+
132
+ if (videoEl.srcObject !== props.stream) {
133
+ setTimeout(() => {
134
+ videoEl.srcObject = props.stream ?? null
135
+ }, 100)
136
+ }
137
+ }
138
+ })
139
+
140
+ onBeforeUnmount(() => {
141
+ const videoEl = player.value.querySelector('video')
142
+ if (videoEl && videoEl.srcObject) {
143
+ videoEl.srcObject.getTracks().forEach(t => t.stop())
144
+ videoEl.srcObject = null
113
145
  }
114
146
  })
115
147
  </script>
@@ -120,7 +152,7 @@ onMounted(async () => {
120
152
  .wt-vidstack-player {
121
153
  transition: var(--transition);
122
154
 
123
- .wt-vidstack-player__player {
155
+ &__player {
124
156
  padding: 0;
125
157
  margin: 0;
126
158
  }
@@ -134,6 +166,15 @@ onMounted(async () => {
134
166
  z-index: 100;
135
167
  border-radius: var(--p-player-wrapper-sm-border-radius);
136
168
  overflow: hidden;
169
+ box-shadow: var(--elevation-10);
170
+ height: var(--p-player-wrapper-sm-height);
171
+
172
+ .wt-vidstack-player__provider {
173
+ display: block;
174
+ height: 100%;
175
+ // Control bar sm height
176
+ padding-bottom: 48px;
177
+ }
137
178
  }
138
179
 
139
180
  &--md {
@@ -167,11 +208,18 @@ media-player[data-hocus] { // hover or focus within https://vidstack.io/docs/wc/
167
208
  .video-display-panel {
168
209
  background: var(--p-player-head-line-hover-background);
169
210
 
170
- :deep(.video-display-panel__controls) { // show panel buttons on hover
211
+ :deep(.video-display-panel) { // show panel buttons on hover
171
212
  opacity: 1;
172
213
  }
173
214
  }
174
215
  }
216
+ </style>
175
217
 
176
-
218
+ <style lang="scss">
219
+ .wt-vidstack-player {
220
+ video {
221
+ height: 100%;
222
+ object-fit: fill;
223
+ }
224
+ }
177
225
  </style>
@@ -116,6 +116,8 @@ const actions = {
116
116
 
117
117
  const headers = context.state.headers.map(
118
118
  ({ sort: currentSort, ...header }) => {
119
+ if (currentSort === undefined) return header;
120
+
119
121
  let sort;
120
122
 
121
123
  if (field) {
@@ -8,8 +8,10 @@ type __VLS_Props = {
8
8
  session: WtVidstackPlayerSession;
9
9
  };
10
10
  declare const _default: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "close-session": () => any;
11
12
  "close-player": () => any;
12
13
  }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
14
+ "onClose-session"?: () => any;
13
15
  "onClose-player"?: () => any;
14
16
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
17
  export default _default;
@@ -2,5 +2,9 @@ import { WtVidstackPlayerSession } from "../../../types/WtVidstackPlayerSession"
2
2
  interface Props {
3
3
  session: WtVidstackPlayerSession;
4
4
  }
5
- declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
5
+ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
6
+ "close-session": () => any;
7
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
8
+ "onClose-session"?: () => any;
9
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
6
10
  export default _default;
@@ -9,6 +9,7 @@ interface Props {
9
9
  };
10
10
  mime?: string;
11
11
  autoplay?: boolean;
12
+ muted?: boolean;
12
13
  title?: string;
13
14
  username?: string;
14
15
  closable?: boolean;
@@ -18,8 +19,10 @@ interface Props {
18
19
  }
19
20
  declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
21
  close: () => any;
22
+ "close-session": () => any;
21
23
  }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
22
24
  onClose?: () => any;
25
+ "onClose-session"?: () => any;
23
26
  }>, {
24
27
  title: string;
25
28
  mode: WtVidstakPlayerControlsMode;
@@ -27,5 +30,6 @@ declare const _default: import("vue").DefineComponent<Props, {}, {}, {}, {}, imp
27
30
  autoplay: boolean;
28
31
  mime: string;
29
32
  closable: boolean;
33
+ muted: boolean;
30
34
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
35
  export default _default;