@streamlayer/react-ui 1.28.3 → 1.29.0

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 (27) hide show
  1. package/lib/app/app/Layout/styles.d.ts +1 -0
  2. package/lib/app/app/Layout/styles.js +33 -24
  3. package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +2 -0
  4. package/lib/app/webos/ExposedPauseAd/PauseAd.js +92 -70
  5. package/lib/app/webos/ExposedPauseAd/styles.d.ts +1 -1
  6. package/lib/app/webos/ExposedPauseAd/styles.js +5 -5
  7. package/lib/app/webos/index.d.ts +4 -0
  8. package/lib/app/webos/index.js +38 -36
  9. package/lib/app/webos/story.js +29 -25
  10. package/lib/app/webos/ui/Sidebar/PromoAction.js +38 -34
  11. package/lib/app/webos/ui/Sidebar/index.js +24 -24
  12. package/lib/app/webos/ui/Sidebar/styles.d.ts +1 -0
  13. package/lib/app/webos/ui/Sidebar/styles.js +120 -115
  14. package/lib/assets/style.css +1 -1
  15. package/lib/{index-DXvAPWiE.js → index-l-eyvmpL.js} +296 -281
  16. package/lib/ui/advertisement/notification/index.js +24 -24
  17. package/lib/ui/advertisement/notification/lower-third/index.js +48 -40
  18. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +8 -7
  19. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.d.ts +9 -0
  20. package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +44 -0
  21. package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +240 -6
  22. package/lib/{useVastAds-CakWRNKN.js → vast-client.min-B0NUra1B.js} +358 -594
  23. package/package.json +17 -17
  24. package/lib/app/webos/ui/Layout/index.d.ts +0 -21
  25. package/lib/app/webos/ui/Layout/index.js +0 -78
  26. package/lib/app/webos/ui/Layout/styles.d.ts +0 -11
  27. package/lib/app/webos/ui/Layout/styles.js +0 -59
@@ -1,3 +1,4 @@
1
+ export declare const breakpoints: (value: string) => string;
1
2
  export declare const Container: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
2
3
  export declare const ContentContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
3
4
  export declare const Sidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
@@ -1,64 +1,73 @@
1
1
  import { styled as s } from "@linaria/react";
2
- const e = /* @__PURE__ */ s("div")({
2
+ const n = (a) => `
3
+ @media only screen and (max-width: 1024px) {
4
+ ${a}
5
+ }
6
+
7
+ @media only screen and (max-width: 1366px) and (orientation: landscape) {
8
+ ${a}
9
+ }
10
+ `, o = /* @__PURE__ */ s("div")({
3
11
  name: "Container",
4
12
  class: "c6rz41d",
5
13
  propsAsIs: !1
6
- }), n = /* @__PURE__ */ s("div")({
14
+ }), i = /* @__PURE__ */ s("div")({
7
15
  name: "ContentContainer",
8
16
  class: "clv6awu",
9
17
  propsAsIs: !1
10
- }), o = /* @__PURE__ */ s("div")({
18
+ }), t = /* @__PURE__ */ s("div")({
11
19
  name: "Sidebar",
12
20
  class: "ssfv9z7",
13
21
  propsAsIs: !1
14
- }), i = /* @__PURE__ */ s("div")({
22
+ }), r = /* @__PURE__ */ s("div")({
15
23
  name: "SideBarOverlay",
16
24
  class: "sweyrp8",
17
25
  propsAsIs: !1
18
- }), r = /* @__PURE__ */ s("div")({
26
+ }), p = /* @__PURE__ */ s("div")({
19
27
  name: "Banner",
20
28
  class: "b5w8mb1",
21
29
  propsAsIs: !1
22
- }), t = /* @__PURE__ */ s("div")({
30
+ }), l = /* @__PURE__ */ s("div")({
23
31
  name: "VideoContainer",
24
32
  class: "v1uhtlpt",
25
33
  propsAsIs: !1
26
- }), p = /* @__PURE__ */ s("div")({
34
+ }), c = /* @__PURE__ */ s("div")({
27
35
  name: "VideoBox",
28
36
  class: "v7viet2",
29
37
  propsAsIs: !1
30
- }), l = /* @__PURE__ */ s("div")({
38
+ }), d = /* @__PURE__ */ s("div")({
31
39
  name: "VideoPlayer",
32
40
  class: "v9y7cje",
33
41
  propsAsIs: !1
34
- }), c = /* @__PURE__ */ s("div")({
42
+ }), m = /* @__PURE__ */ s("div")({
35
43
  name: "Overlay",
36
44
  class: "opmmtyi",
37
45
  propsAsIs: !1
38
- }), d = /* @__PURE__ */ s("div")({
46
+ }), v = /* @__PURE__ */ s("div")({
39
47
  name: "Notification",
40
48
  class: "nk5geky",
41
49
  propsAsIs: !1
42
- }), v = /* @__PURE__ */ s("div")({
50
+ }), f = /* @__PURE__ */ s("div")({
43
51
  name: "PointsContainer",
44
52
  class: "p17bxk8w",
45
53
  propsAsIs: !1
46
- }), m = /* @__PURE__ */ s("div")({
54
+ }), A = /* @__PURE__ */ s("div")({
47
55
  name: "InApp",
48
56
  class: "i1h25kze",
49
57
  propsAsIs: !1
50
58
  });
51
59
  export {
52
- r as Banner,
53
- e as Container,
54
- n as ContentContainer,
55
- m as InApp,
56
- d as Notification,
57
- c as Overlay,
58
- v as PointsContainer,
59
- i as SideBarOverlay,
60
- o as Sidebar,
61
- p as VideoBox,
62
- t as VideoContainer,
63
- l as VideoPlayer
60
+ p as Banner,
61
+ o as Container,
62
+ i as ContentContainer,
63
+ A as InApp,
64
+ v as Notification,
65
+ m as Overlay,
66
+ f as PointsContainer,
67
+ r as SideBarOverlay,
68
+ t as Sidebar,
69
+ c as VideoBox,
70
+ l as VideoContainer,
71
+ d as VideoPlayer,
72
+ n as breakpoints
64
73
  };
@@ -1,3 +1,4 @@
1
+ import { StreamLayerSDKTvOptions } from '..';
1
2
  export interface PauseAdProps {
2
3
  vastUrls: Array<{
3
4
  template?: 'default';
@@ -11,5 +12,6 @@ export interface PauseAdProps {
11
12
  onRender?: (params: {
12
13
  rendered: boolean;
13
14
  }) => void;
15
+ options?: StreamLayerSDKTvOptions;
14
16
  }
15
17
  export declare const PauseAd: React.FC<PauseAdProps>;
@@ -1,95 +1,117 @@
1
- import { jsx as t, jsxs as p } from "react/jsx-runtime";
2
- import { cx as E } from "@linaria/core";
3
- import { useFocusable as x } from "@noriginmedia/norigin-spatial-navigation";
4
- import { useState as A, useRef as y, useEffect as d } from "react";
5
- import { eventBus as P } from "@streamlayer/sdk-web-interfaces";
6
- import { useGAMPlayer as T } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js";
7
- import { PauseAdOverlay as b, PauseAdContent as g, PauseAdGradientLeft as w, PauseAdGradientRight as k, PauseAdGradientBottom as B, PauseAdTopLeft as L, PauseAdTitle as S, PauseAdCaption as C, PauseAdBottomLeft as G, PauseAdPlayButton as D, PauseAdSidebar as F, ExternalAdContainer as I } from "./styles.js";
8
- const M = ({ vastUrl: a }) => {
9
- const r = y(null), [, , u] = T(r, a);
10
- return d(() => {
11
- u && u();
12
- }, [u]), /* @__PURE__ */ t(I, { ref: r });
13
- }, j = ({ isClosing: a, title: r, caption: u, onPlay: f, onClose: s, vastUrl: m }) => {
14
- const { ref: e, focusSelf: o } = x({
1
+ import { jsx as e, jsxs as y } from "react/jsx-runtime";
2
+ import { cx as B } from "@linaria/core";
3
+ import { useFocusable as L } from "@noriginmedia/norigin-spatial-navigation";
4
+ import { useState as x, useRef as k, useEffect as P } from "react";
5
+ import { useStore as G } from "@streamlayer/react-polyfills";
6
+ import { eventBus as g } from "@streamlayer/sdk-web-interfaces";
7
+ import { useLoadGAMStatic as b } from "../../../ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js";
8
+ import { PauseAdOverlay as M, PauseAdContent as D, PauseAdGradientLeft as F, PauseAdGradientRight as I, PauseAdGradientBottom as j, PauseAdTopLeft as K, PauseAdTitle as N, PauseAdCaption as $, PauseAdBottomLeft as O, PauseAdPlayButton as V, PauseAdSidebar as _, ExternalAdContainer as w } from "./styles.js";
9
+ const q = ({ vastUrl: t }) => {
10
+ var d;
11
+ const [, n] = b(), u = G(n, { keys: [t] });
12
+ return (d = u == null ? void 0 : u[t]) != null && d.imageSrc ? u[t].adUrl ? /* @__PURE__ */ e("a", { href: u[t].adUrl, target: "_blank", rel: "noopener noreferrer", children: /* @__PURE__ */ e(w, { src: u[t].imageSrc }) }) : /* @__PURE__ */ e(w, { src: u[t].imageSrc }) : null;
13
+ }, z = ({ isClosing: t, title: n, caption: u, onPlay: d, onClose: s, vastUrl: a, options: r }) => {
14
+ const { ref: o, focusSelf: f } = L({
15
15
  focusKey: "sl-pause-ad-play",
16
- onEnterRelease: f,
16
+ onEnterRelease: d,
17
17
  isFocusBoundary: !0,
18
18
  forceFocus: !0
19
19
  });
20
- return d(() => {
21
- e.current && o();
22
- }, [e, o]), d(() => {
23
- const l = (n) => {
24
- const i = n.keyCode;
25
- if (i === 461 || i === 10009 || i === 27) {
26
- n.preventDefault(), n.stopPropagation(), n.stopImmediatePropagation(), s == null || s();
20
+ return P(() => {
21
+ o.current && f();
22
+ }, [o, f]), P(() => {
23
+ const A = (m) => {
24
+ const l = m.keyCode;
25
+ if (l === 461 || l === 10009 || l === 27) {
26
+ m.preventDefault(), m.stopPropagation(), m.stopImmediatePropagation(), s == null || s();
27
27
  return;
28
28
  }
29
29
  };
30
- return window.addEventListener("keydown", l, { capture: !0 }), () => window.removeEventListener("keydown", l, { capture: !0 });
31
- }, [s]), /* @__PURE__ */ t(b, { className: E(a && "pause-ad-closing"), children: /* @__PURE__ */ p(g, { children: [
32
- /* @__PURE__ */ t(w, {}),
33
- /* @__PURE__ */ t(k, {}),
34
- /* @__PURE__ */ t(B, {}),
35
- /* @__PURE__ */ p(L, { children: [
36
- /* @__PURE__ */ t(S, { children: r }),
37
- /* @__PURE__ */ t(C, { children: u })
30
+ return window.addEventListener("keydown", A, { capture: !0 }), () => window.removeEventListener("keydown", A, { capture: !0 });
31
+ }, [s]), /* @__PURE__ */ e(M, { className: B(t && "pause-ad-closing"), children: /* @__PURE__ */ y(D, { children: [
32
+ /* @__PURE__ */ e(F, {}),
33
+ /* @__PURE__ */ e(I, {}),
34
+ /* @__PURE__ */ e(j, {}),
35
+ /* @__PURE__ */ y(K, { children: [
36
+ /* @__PURE__ */ e(N, { children: n }),
37
+ /* @__PURE__ */ e($, { children: u })
38
38
  ] }),
39
- /* @__PURE__ */ t(G, { children: /* @__PURE__ */ t(
40
- D,
39
+ (r == null ? void 0 : r.showPauseButton) && /* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
40
+ V,
41
41
  {
42
- ref: e,
43
- onClick: f,
44
- onMouseEnter: () => e.current.focus(),
42
+ ref: o,
43
+ onClick: d,
44
+ onMouseEnter: () => o.current.focus(),
45
45
  "aria-label": "Resume playback"
46
46
  }
47
47
  ) }),
48
- /* @__PURE__ */ p(F, { children: [
49
- m && /* @__PURE__ */ t(M, { vastUrl: m }),
50
- /* @__PURE__ */ t("span", { children: "ADVERTISEMENT" })
48
+ /* @__PURE__ */ y(_, { children: [
49
+ a && /* @__PURE__ */ e(q, { vastUrl: a }),
50
+ /* @__PURE__ */ e("span", { children: "ADVERTISEMENT" })
51
51
  ] })
52
52
  ] }) });
53
- }, H = ({
54
- showPauseAd: a,
55
- vastUrls: r,
53
+ }, R = ({
54
+ showPauseAd: t,
55
+ vastUrls: n,
56
56
  title: u,
57
- caption: f,
57
+ caption: d,
58
58
  onPlay: s,
59
- onClose: m,
60
- onRender: e
59
+ onClose: a,
60
+ onRender: r,
61
+ options: o
61
62
  }) => {
62
- const [o, l] = A(!1), [n, i] = A(!1), c = y();
63
- d(() => (c.current && clearTimeout(c.current), a ? (P.emit("exposedPauseAd", {
64
- action: "enabled",
65
- payload: {}
66
- }), c.current = setTimeout(() => {
67
- i(!1), l(!0);
68
- }, 5e3)) : (P.emit("exposedPauseAd", {
69
- action: "disabled",
70
- payload: {}
71
- }), i(!0), c.current = setTimeout(() => {
72
- l(!1);
73
- }, 400)), () => {
74
- c.current && clearTimeout(c.current);
75
- }), [a]), d(() => {
76
- e == null || e({ rendered: o });
77
- }, [o, e]), d(() => () => {
78
- e == null || e({ rendered: !1 });
79
- }, [e]);
80
- const h = r == null ? void 0 : r[0].url;
81
- return o ? /* @__PURE__ */ t(
82
- j,
63
+ const [f, A] = x(!1), [m, l] = x(!1), c = k(), i = n == null ? void 0 : n[0].url, h = k(i);
64
+ h.current = i;
65
+ const [S, T] = b();
66
+ return P(() => {
67
+ if (t && i) {
68
+ g.emit("exposedPauseAd", {
69
+ action: "enabled",
70
+ payload: {}
71
+ }), S(i).then((p) => {
72
+ h.current === i && (p == null ? void 0 : p.success) !== !0 && (clearTimeout(c.current), a == null || a());
73
+ }).catch(() => {
74
+ h.current === i && (clearTimeout(c.current), a == null || a());
75
+ });
76
+ const E = () => {
77
+ var p;
78
+ (p = T.get()[h.current]) != null && p.imageSrc ? (clearTimeout(c.current), l(!1), A(!0), g.emit("exposedPauseAd", {
79
+ action: "rendered",
80
+ payload: {}
81
+ })) : c.current = setTimeout(() => {
82
+ E();
83
+ }, 200);
84
+ };
85
+ c.current = setTimeout(() => {
86
+ E();
87
+ }, 5e3);
88
+ } else
89
+ g.emit("exposedPauseAd", {
90
+ action: "disabled",
91
+ payload: {}
92
+ }), l(!0), c.current = setTimeout(() => {
93
+ A(!1);
94
+ }, 400);
95
+ return () => {
96
+ c.current && clearTimeout(c.current);
97
+ };
98
+ }, [T, S, a, t, i]), P(() => {
99
+ r == null || r({ rendered: f });
100
+ }, [f, r]), P(() => () => {
101
+ r == null || r({ rendered: !1 });
102
+ }, [r]), f ? /* @__PURE__ */ e(
103
+ z,
83
104
  {
84
- onClose: m,
85
- isClosing: n,
105
+ onClose: a,
106
+ isClosing: m,
86
107
  title: u,
87
- caption: f,
108
+ caption: d,
88
109
  onPlay: s,
89
- vastUrl: h
110
+ vastUrl: i,
111
+ options: o
90
112
  }
91
113
  ) : null;
92
114
  };
93
115
  export {
94
- H as PauseAd
116
+ R as PauseAd
95
117
  };
@@ -9,4 +9,4 @@ export declare const PauseAdCaption: import('@linaria/react').StyledComponent<im
9
9
  export declare const PauseAdBottomLeft: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
10
10
  export declare const PauseAdPlayButton: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLButtonElement> & import('react').ButtonHTMLAttributes<HTMLButtonElement> & Record<never, unknown>>;
11
11
  export declare const PauseAdSidebar: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
- export declare const ExternalAdContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLDivElement> & import('react').HTMLAttributes<HTMLDivElement> & Record<never, unknown>>;
12
+ export declare const ExternalAdContainer: import('@linaria/react').StyledComponent<import('react').ClassAttributes<HTMLImageElement> & import('react').ImgHTMLAttributes<HTMLImageElement> & Record<never, unknown>>;
@@ -15,11 +15,11 @@ const e = /* @__PURE__ */ s("div")({
15
15
  name: "PauseAdGradientRight",
16
16
  class: "p1kh2yb0",
17
17
  propsAsIs: !1
18
- }), d = /* @__PURE__ */ s("div")({
18
+ }), p = /* @__PURE__ */ s("div")({
19
19
  name: "PauseAdGradientBottom",
20
20
  class: "pl8f94x",
21
21
  propsAsIs: !1
22
- }), p = /* @__PURE__ */ s("div")({
22
+ }), d = /* @__PURE__ */ s("div")({
23
23
  name: "PauseAdTopLeft",
24
24
  class: "p1m6zmrt",
25
25
  propsAsIs: !1
@@ -43,7 +43,7 @@ const e = /* @__PURE__ */ s("div")({
43
43
  name: "PauseAdSidebar",
44
44
  class: "p1dpvfl1",
45
45
  propsAsIs: !1
46
- }), c = /* @__PURE__ */ s("div")({
46
+ }), c = /* @__PURE__ */ s("img")({
47
47
  name: "ExternalAdContainer",
48
48
  class: "ezfmabr",
49
49
  propsAsIs: !1
@@ -53,12 +53,12 @@ export {
53
53
  r as PauseAdBottomLeft,
54
54
  A as PauseAdCaption,
55
55
  t as PauseAdContent,
56
- d as PauseAdGradientBottom,
56
+ p as PauseAdGradientBottom,
57
57
  o as PauseAdGradientLeft,
58
58
  n as PauseAdGradientRight,
59
59
  e as PauseAdOverlay,
60
60
  i as PauseAdPlayButton,
61
61
  u as PauseAdSidebar,
62
62
  l as PauseAdTitle,
63
- p as PauseAdTopLeft
63
+ d as PauseAdTopLeft
64
64
  };
@@ -1,6 +1,9 @@
1
1
  import { Component } from 'react';
2
2
  import { StreamLayerSDK } from '@streamlayer/sdk-web-interfaces';
3
3
  import { PauseAdProps } from './ExposedPauseAd/PauseAd';
4
+ export type StreamLayerSDKTvOptions = {
5
+ showPauseButton?: boolean;
6
+ };
4
7
  export type StreamLayerSDKTvProps = {
5
8
  persistent?: boolean;
6
9
  children: React.ReactNode;
@@ -11,6 +14,7 @@ export type StreamLayerSDKTvProps = {
11
14
  onRenderPauseAd?: (params: {
12
15
  rendered: boolean;
13
16
  }) => void;
17
+ options?: StreamLayerSDKTvOptions;
14
18
  };
15
19
  export declare class StreamLayerSDKTv extends Component<StreamLayerSDKTvProps, {
16
20
  hasError: boolean;
@@ -1,46 +1,48 @@
1
- import { jsx as t, jsxs as b } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
2
  import { init as y } from "@noriginmedia/norigin-spatial-navigation";
3
- import { Layout as v } from "../app/Layout/index.js";
4
- import { Component as D, useCallback as u } from "react";
5
- import { useStore as d } from "@streamlayer/react-polyfills";
6
- import { StreamLayerSDKAdvertisementWebOS as m } from "./Advertisement/index.js";
7
- import { PauseAd as L } from "./ExposedPauseAd/PauseAd.js";
8
- import { StreamLayerSDKQuestionWebOS as S } from "./Question/index.js";
3
+ import { Layout as b } from "../app/Layout/index.js";
4
+ import { Component as D, useCallback as c } from "react";
5
+ import { useStore as x } from "@streamlayer/react-polyfills";
6
+ import { StreamLayerSDKAdvertisementWebOS as u } from "./Advertisement/index.js";
7
+ import { PauseAd as v } from "./ExposedPauseAd/PauseAd.js";
8
+ import { StreamLayerSDKQuestionWebOS as s } from "./Question/index.js";
9
9
  y({
10
10
  shouldFocusDOMNode: !0
11
11
  });
12
- const K = ({
13
- persistent: o,
14
- children: e,
12
+ const L = ({
13
+ persistent: e,
14
+ children: o,
15
15
  sdk: r,
16
- showPauseAd: p,
17
- pauseAdVastUrl: c,
18
- onClosePauseAd: a,
19
- onRenderPauseAd: s
16
+ showPauseAd: l,
17
+ pauseAdVastUrl: m,
18
+ onClosePauseAd: n,
19
+ onRenderPauseAd: f,
20
+ options: S
20
21
  }) => {
21
- const i = d(r.uiState), f = u(() => {
22
- a == null || a();
23
- }, [a]), h = u(() => {
22
+ const a = x(r.uiState), p = c(() => {
23
+ n == null || n();
24
+ }, [n]), h = c(() => {
24
25
  r.controlVideoPlayer({ play: !0 });
25
- }, [r]), l = i.appSidebar || i.promotionSidebar || i.promotionOverlay;
26
- return /* @__PURE__ */ b(
27
- v,
26
+ }, [r]);
27
+ return /* @__PURE__ */ d(
28
+ b,
28
29
  {
29
30
  sdk: r,
30
- sidebar: ({ promo: n }) => n ? /* @__PURE__ */ t(m, { sdk: r, persistent: o, sidebar: "right" }) : /* @__PURE__ */ t(S, { sdk: r, persistent: o }),
31
- notification: ({ promo: n }) => n ? /* @__PURE__ */ t(m, { sdk: r, notification: !0, persistent: o }) : /* @__PURE__ */ t(S, { notification: !0, sdk: r, persistent: o }),
32
- banner: /* @__PURE__ */ t(m, { sdk: r, persistent: o, banner: "bottom" }),
31
+ sidebar: ({ promo: i }) => a.exposedPauseAd ? null : i ? /* @__PURE__ */ t(u, { sdk: r, persistent: e, sidebar: "right" }) : /* @__PURE__ */ t(s, { sdk: r, persistent: e }),
32
+ notification: ({ promo: i }) => a.exposedPauseAd ? null : i ? /* @__PURE__ */ t(u, { sdk: r, notification: !0, persistent: e }) : /* @__PURE__ */ t(s, { notification: !0, sdk: r, persistent: e }),
33
+ banner: a.exposedPauseAd ? null : /* @__PURE__ */ t(u, { sdk: r, persistent: e, banner: "bottom" }),
33
34
  webos: !0,
34
35
  children: [
35
- e,
36
- c && !l && /* @__PURE__ */ t(
37
- L,
36
+ o,
37
+ m && /* @__PURE__ */ t(
38
+ v,
38
39
  {
39
- showPauseAd: p,
40
- vastUrls: c,
41
- onClose: f,
42
- onRender: s,
43
- onPlay: h
40
+ showPauseAd: l,
41
+ vastUrls: m,
42
+ onClose: p,
43
+ onRender: f,
44
+ onPlay: h,
45
+ options: S
44
46
  }
45
47
  )
46
48
  ]
@@ -48,17 +50,17 @@ const K = ({
48
50
  );
49
51
  };
50
52
  class W extends D {
51
- constructor(e) {
52
- super(e), this.state = { hasError: !1 };
53
+ constructor(o) {
54
+ super(o), this.state = { hasError: !1 };
53
55
  }
54
56
  static getDerivedStateFromError() {
55
57
  return { hasError: !0 };
56
58
  }
57
- componentDidCatch(e, r) {
58
- console.error("StreamLayerSDKTv error:", e, r.componentStack);
59
+ componentDidCatch(o, r) {
60
+ console.error("StreamLayerSDKTv error:", o, r.componentStack);
59
61
  }
60
62
  render() {
61
- return this.state.hasError ? this.props.children : /* @__PURE__ */ t(K, { ...this.props });
63
+ return this.state.hasError ? this.props.children : /* @__PURE__ */ t(L, { ...this.props });
62
64
  }
63
65
  }
64
66
  export {
@@ -1,33 +1,33 @@
1
1
  import { jsx as a, jsxs as p, Fragment as f } from "react/jsx-runtime";
2
2
  import c from "hls.js";
3
- import { useRef as m, useState as d, useEffect as u } from "react";
3
+ import { useRef as m, useState as d, useEffect as i } from "react";
4
4
  import { StreamLayerProvider as y, useStreamLayer as l, useStreamLayerUI as S } from "@streamlayer/react";
5
5
  import { anonymous as h } from "@streamlayer/sdk-web-anonymous-auth";
6
6
  import { useStreamLayerDebug as b } from "../../utils/debug/index.js";
7
7
  import { StreamLayerSDKTv as g } from "./index.js";
8
- const w = ({ src: t }) => {
9
- const e = m(), n = m(), [r, o] = d(t);
10
- return u(() => {
11
- o(t);
12
- }, [t]), u(() => () => {
8
+ const w = ({ src: r }) => {
9
+ const e = m(), n = m(), [t, o] = d(r);
10
+ return i(() => {
11
+ o(r);
12
+ }, [r]), i(() => () => {
13
13
  n.current && clearTimeout(n.current);
14
- }, []), u(() => {
15
- if (r && r.includes("m3u8"))
14
+ }, []), i(() => {
15
+ if (t && t.includes("m3u8"))
16
16
  if (c.isSupported() && e.current) {
17
17
  const s = new c({
18
18
  debug: !1
19
19
  });
20
- s.loadSource(r), s.attachMedia(e.current);
20
+ s.loadSource(t), s.attachMedia(e.current);
21
21
  } else
22
22
  o("");
23
23
  e.current && (e.current.volume = 0.1, e.current.play().catch((s) => {
24
- var i;
25
- console.error(s), (i = e.current) == null || i.play();
24
+ var u;
25
+ console.error(s), (u = e.current) == null || u.play();
26
26
  }));
27
- }, [r]), /* @__PURE__ */ a(
27
+ }, [t]), /* @__PURE__ */ a(
28
28
  "video",
29
29
  {
30
- src: r || "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
30
+ src: t || "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
31
31
  ref: e,
32
32
  style: { width: "100%", height: "100%", borderRadius: 10, objectFit: "contain" },
33
33
  autoPlay: !0,
@@ -39,39 +39,43 @@ const w = ({ src: t }) => {
39
39
  }
40
40
  );
41
41
  }, v = () => {
42
- const t = l(), [e, n] = d("");
43
- return u(() => t ? t.streamSummary().subscribe((r) => {
42
+ const r = l(), [e, n] = d("");
43
+ return i(() => r ? r.streamSummary().subscribe((t) => {
44
44
  var o, s;
45
- (s = (o = r.data) == null ? void 0 : o.summary) != null && s.stream && n(r.data.summary.stream);
45
+ (s = (o = t.data) == null ? void 0 : o.summary) != null && s.stream && n(t.data.summary.stream);
46
46
  }) : () => {
47
- }, [t]), /* @__PURE__ */ a(
47
+ }, [r]), /* @__PURE__ */ a(
48
48
  w,
49
49
  {
50
50
  src: e || "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4"
51
51
  }
52
52
  );
53
- }, L = ({ sdk: t }) => (u(() => {
54
- t.anonymousAuthorization();
55
- }, [t]), null), k = ({ persistent: t }) => {
53
+ }, k = ({ sdk: r }) => (i(() => {
54
+ r.anonymousAuthorization();
55
+ }, [r]), null), L = ({ persistent: r }) => {
56
56
  const e = l(), n = S();
57
57
  return e ? /* @__PURE__ */ p(f, { children: [
58
- /* @__PURE__ */ a(L, { sdk: e }),
59
- /* @__PURE__ */ a(g, { sdk: e, persistent: t, uiState: n, children: /* @__PURE__ */ a(v, {}) })
58
+ /* @__PURE__ */ a(k, { sdk: e }),
59
+ /* @__PURE__ */ a(g, { sdk: e, persistent: r, uiState: n, children: /* @__PURE__ */ a(v, {}) })
60
60
  ] }) : null;
61
- }, R = /* @__PURE__ */ new Set([h]), P = ({ sdkKey: t, eventId: e, persistent: n, production: r }) => {
62
- const o = b({ sdkKey: t, eventId: e, production: r });
61
+ }, R = /* @__PURE__ */ new Set([h]), P = ({ sdkKey: r, eventId: e, persistent: n, production: t }) => {
62
+ const o = b({ sdkKey: r, eventId: e, production: t });
63
63
  return /* @__PURE__ */ a(
64
64
  y,
65
65
  {
66
66
  event: o.event,
67
67
  sdkKey: o.sdkKey,
68
68
  production: o.env === "production",
69
+ themeMode: "dark",
69
70
  plugins: R,
70
71
  autoEnable: !0,
71
72
  withAd: !0,
73
+ skipOnboarding: !0,
72
74
  withAdNotification: !0,
75
+ friendsTab: "disabled",
76
+ hideFriends: !0,
73
77
  webOS: !0,
74
- children: /* @__PURE__ */ a(k, { persistent: n })
78
+ children: /* @__PURE__ */ a(L, { persistent: n })
75
79
  }
76
80
  );
77
81
  };