@streamlayer/react-ui 1.32.4 → 1.33.2
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.
- package/lib/app/app/Advertisement/index.js +14 -15
- package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
- package/lib/app/app/Features/Gamification/Question.js +42 -42
- package/lib/app/app/Features/Gamification/QuestionAdvertisement.js +19 -25
- package/lib/app/app/Features/Gamification/index.js +29 -28
- package/lib/app/app/Notifications/Onboarding/index.js +45 -42
- package/lib/app/app/story/index.js +24 -24
- package/lib/app/app/story/insight/index.js +14 -15
- package/lib/app/app/story/insight/video.js +3 -3
- package/lib/app/app/story/promotion/content.js +5 -5
- package/lib/app/app/story/promotion/index.d.ts +1 -0
- package/lib/app/app/story/promotion/index.js +24 -25
- package/lib/app/app/story/promotion/video.d.ts +0 -1
- package/lib/app/app/story/promotion/video.js +41 -43
- package/lib/app/app/story/promotion-notification/index.js +15 -16
- package/lib/app/app/story/promotion-notification/video.d.ts +0 -1
- package/lib/app/app/story/promotion-notification/video.js +22 -30
- package/lib/app/app/story/settings/index.js +6 -6
- package/lib/app/app/story/settings/login.js +1 -1
- package/lib/app/app/story/video.js +28 -28
- package/lib/app/login/demo.js +19 -18
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.d.ts +0 -1
- package/lib/app/masters/BetPack/BetPackContent/EndScreen/index.js +17 -17
- package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
- package/lib/app/masters/masters.d.ts +1 -0
- package/lib/app/masters/masters.js +34 -32
- package/lib/app/masters/provider.d.ts +4 -0
- package/lib/app/masters/provider.js +23 -0
- package/lib/app/masters/story/components.js +48 -52
- package/lib/app/masters/story/index.js +16 -15
- package/lib/app/tgl/index.d.ts +1 -0
- package/lib/app/tgl/index.js +19 -20
- package/lib/app/tgl/video.d.ts +0 -1
- package/lib/app/tgl/video.js +40 -42
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
- package/lib/app/webos/story.js +26 -26
- package/lib/app/webos/ui/Sidebar/styles.js +82 -888
- package/lib/assets/style.css +1 -1
- package/lib/core/app.d.ts +7 -0
- package/lib/core/app.js +14 -0
- package/lib/core/event.d.ts +6 -0
- package/lib/core/event.js +5 -0
- package/lib/core/hooks.d.ts +16 -0
- package/lib/core/hooks.js +8 -0
- package/lib/core/provider.d.ts +49 -0
- package/lib/core/provider.js +9 -0
- package/lib/hooks-B0Qttldg.js +99 -0
- package/lib/index.d.ts +0 -1
- package/lib/index.js +2 -4
- package/lib/ui/advertisement/banner/index.d.ts +2 -2
- package/lib/ui/advertisement/notification/lower-third/index.js +34 -30
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMPlayer.js +100 -33212
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useGAMStatic.js +13 -13
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
- package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
- package/lib/ui/icons/index.d.ts +198 -66
- package/lib/ui/video-player/index.js +26 -23
- package/lib/useStreamLayerApp.d.ts +23 -0
- package/lib/useStreamLayerApp.js +167 -0
- package/lib/utils/debug/index.js +8 -8
- package/package.json +42 -35
- package/lib/index-l-eyvmpL.js +0 -3758
- package/lib/utils/createDemo.d.ts +0 -12
- package/lib/utils/createDemo.js +0 -49
- package/lib/vast-client.min-B0NUra1B.js +0 -1060
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
import { jsxs as p, jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import { cx as d } from "@linaria/core";
|
|
3
|
-
import { SDKContainer as
|
|
4
|
-
import { useSdkScroll as
|
|
5
|
-
import { useSdkFeature as
|
|
3
|
+
import { SDKContainer as x, mobileSdkContainer as y, SDKScrollContainer as A } from "./styles.js";
|
|
4
|
+
import { useSdkScroll as P } from "./useSdkScroll.js";
|
|
5
|
+
import { useSdkFeature as h } from "../useSdkFeature.js";
|
|
6
6
|
import { useAnalyticsListener as F, newTabLinkListener as N } from "../../hooks/analytics.js";
|
|
7
|
-
import { useState as
|
|
7
|
+
import { useState as L, useMemo as M, useCallback as C, useRef as S, useEffect as v } from "react";
|
|
8
8
|
import { useStore as u } from "@streamlayer/react-polyfills";
|
|
9
9
|
import { FeatureType as b } from "@streamlayer/sdk-web-types";
|
|
10
10
|
import { resetCss as f } from "../../ui/theme/theme.js";
|
|
11
|
-
import { BetPackOverlay as
|
|
11
|
+
import { BetPackOverlay as E } from "./BetPack/index.js";
|
|
12
12
|
import { ActiveFeature as B, StandaloneFeature as D } from "./Features/index.js";
|
|
13
13
|
import { SDKHeader as I } from "./Header/index.js";
|
|
14
14
|
import { SDKNotifications as K } from "./Notifications/index.js";
|
|
15
15
|
import { MastersContext as g } from "./useMastersContext.js";
|
|
16
16
|
import { useSdkResponsive as w } from "./useSdkResponsive.js";
|
|
17
17
|
import { StreamLayerMastersThemeProvider as ne } from "../../ui/theme/masters.js";
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
import { MastersStreamLayerProvider as se } from "./provider.js";
|
|
19
|
+
const G = ({ sdk: e, className: r }) => {
|
|
20
|
+
const [, t] = h(e);
|
|
21
|
+
return /* @__PURE__ */ n(B, { className: r, feature: t, sdk: e });
|
|
22
|
+
}, O = ({ sdk: e, className: r, appNode: t, responsiveStore: l, useContainer: c }) => {
|
|
23
|
+
const m = u(e.featuresList.getStore());
|
|
24
|
+
return m ? Array.from(m, (a) => {
|
|
24
25
|
const s = e.getFeature(a);
|
|
25
26
|
return s ? /* @__PURE__ */ n(
|
|
26
27
|
D,
|
|
27
28
|
{
|
|
28
|
-
useContainer:
|
|
29
|
+
useContainer: c,
|
|
29
30
|
responsiveStore: l,
|
|
30
|
-
className:
|
|
31
|
-
appNode:
|
|
31
|
+
className: r,
|
|
32
|
+
appNode: t,
|
|
32
33
|
feature: s,
|
|
33
34
|
sdk: e
|
|
34
35
|
},
|
|
@@ -36,31 +37,31 @@ const G = ({ sdk: e, className: t }) => {
|
|
|
36
37
|
) : null;
|
|
37
38
|
}) : null;
|
|
38
39
|
}, R = (e) => {
|
|
39
|
-
const
|
|
40
|
-
return F(
|
|
41
|
-
}, j = ({ sdk: e, useContainer:
|
|
42
|
-
const
|
|
40
|
+
const r = S(null);
|
|
41
|
+
return F(r, { enabled: !0, event: "click", listener: N }), /* @__PURE__ */ n(E, { ref: r, ...e });
|
|
42
|
+
}, j = ({ sdk: e, useContainer: r }) => {
|
|
43
|
+
const t = S(null), l = u(e.status), c = u(e.sdkStore.slStreamId), m = S(null), [a] = w(t), [s, i] = P(t, a, r), o = l === "ready" && !!c.data;
|
|
43
44
|
return v(() => {
|
|
44
45
|
window.requestAnimationFrame(() => {
|
|
45
46
|
e.initializeApp().then(() => {
|
|
46
47
|
e.openFeature(b.GAMES);
|
|
47
48
|
});
|
|
48
49
|
});
|
|
49
|
-
}, [e]), F(
|
|
50
|
+
}, [e]), F(t, { enabled: !0, event: "click", listener: N }), v(() => {
|
|
50
51
|
import("./Features/Gamification/gamification-feature.js");
|
|
51
|
-
}, []), /* @__PURE__ */ p(
|
|
52
|
-
/* @__PURE__ */ n(I, { className: d(f), ref:
|
|
53
|
-
/* @__PURE__ */ p(
|
|
52
|
+
}, []), /* @__PURE__ */ p(x, { className: d("SDKContainer", !r && y), ref: t, children: [
|
|
53
|
+
/* @__PURE__ */ n(I, { className: d(f), ref: m }),
|
|
54
|
+
/* @__PURE__ */ p(A, { className: "sl-hide-on-modal", ref: s, children: [
|
|
54
55
|
o && /* @__PURE__ */ n(
|
|
55
56
|
K,
|
|
56
57
|
{
|
|
57
58
|
sdk: e,
|
|
58
59
|
scrollNode: s,
|
|
59
|
-
headerNode:
|
|
60
|
-
appNode:
|
|
60
|
+
headerNode: m,
|
|
61
|
+
appNode: t,
|
|
61
62
|
scrollStore: i,
|
|
62
63
|
responsiveStore: a,
|
|
63
|
-
useContainer:
|
|
64
|
+
useContainer: r
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
o && /* @__PURE__ */ n(G, { className: f, sdk: e }),
|
|
@@ -68,17 +69,17 @@ const G = ({ sdk: e, className: t }) => {
|
|
|
68
69
|
O,
|
|
69
70
|
{
|
|
70
71
|
responsiveStore: a,
|
|
71
|
-
appNode:
|
|
72
|
+
appNode: t,
|
|
72
73
|
className: f,
|
|
73
74
|
sdk: e,
|
|
74
|
-
useContainer:
|
|
75
|
+
useContainer: r
|
|
75
76
|
}
|
|
76
77
|
)
|
|
77
78
|
] })
|
|
78
79
|
] });
|
|
79
|
-
},
|
|
80
|
-
const [l,
|
|
81
|
-
|
|
80
|
+
}, re = ({ sdk: e, betPack: r, useContainer: t }) => {
|
|
81
|
+
const [l, c] = L(r), a = !!u(e.userId()), s = M(() => ({ sdk: e }), [e]), i = C(() => {
|
|
82
|
+
c(!1);
|
|
82
83
|
const o = e == null ? void 0 : e.getFeature(b.GAMES);
|
|
83
84
|
o == null || o.closeQuestion();
|
|
84
85
|
}, [e]);
|
|
@@ -92,10 +93,11 @@ const G = ({ sdk: e, className: t }) => {
|
|
|
92
93
|
close: () => i()
|
|
93
94
|
}
|
|
94
95
|
),
|
|
95
|
-
!l && /* @__PURE__ */ n(j, { sdk: e, useContainer:
|
|
96
|
+
!l && /* @__PURE__ */ n(j, { sdk: e, useContainer: t })
|
|
96
97
|
] });
|
|
97
98
|
};
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
+
re as MastersApp,
|
|
101
|
+
se as MastersStreamLayerProvider,
|
|
100
102
|
ne as StreamLayerMastersThemeProvider
|
|
101
103
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { d as m, e as u } from "../../hooks-B0Qttldg.js";
|
|
3
|
+
const S = ({ sdkKey: r, plugins: e, children: a, event: t, onDeepLinkHandled: s, videoPlayerController: i, production: d = !0 }) => /* @__PURE__ */ o(
|
|
4
|
+
m,
|
|
5
|
+
{
|
|
6
|
+
sdkKey: r,
|
|
7
|
+
plugins: e,
|
|
8
|
+
production: d,
|
|
9
|
+
autoEnable: !0,
|
|
10
|
+
onDeepLinkHandled: s,
|
|
11
|
+
videoPlayerController: i,
|
|
12
|
+
friendsTab: "disabled",
|
|
13
|
+
skipOnboarding: !0,
|
|
14
|
+
hideFriends: !0,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ n(u, { event: t }),
|
|
17
|
+
a
|
|
18
|
+
]
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
export {
|
|
22
|
+
S as MastersStreamLayerProvider
|
|
23
|
+
};
|
|
@@ -1,96 +1,95 @@
|
|
|
1
1
|
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { StreamLayerLogin as g } from "@streamlayer/react/auth";
|
|
2
|
+
import { styled as o } from "@linaria/react";
|
|
3
|
+
import { u as d } from "../../../hooks-B0Qttldg.js";
|
|
4
|
+
import { useState as u, useCallback as v, useEffect as b } from "react";
|
|
6
5
|
import { storage as a } from "@streamlayer/sdk-web-core";
|
|
7
|
-
import { StreamLayerSDKPoints as
|
|
8
|
-
import { StreamLayerMastersThemeProvider as
|
|
9
|
-
const
|
|
6
|
+
import { StreamLayerSDKPoints as g } from "../Points/index.js";
|
|
7
|
+
import { StreamLayerMastersThemeProvider as y } from "../../../ui/theme/masters.js";
|
|
8
|
+
const k = /* @__PURE__ */ o("div")({
|
|
10
9
|
name: "PointsContainer",
|
|
11
10
|
class: "p1ibyybw",
|
|
12
11
|
propsAsIs: !1
|
|
13
|
-
}),
|
|
12
|
+
}), w = /* @__PURE__ */ o("div")({
|
|
14
13
|
name: "Container",
|
|
15
14
|
class: "cwn5esv",
|
|
16
15
|
propsAsIs: !1
|
|
17
|
-
}),
|
|
16
|
+
}), F = /* @__PURE__ */ o("div")({
|
|
18
17
|
name: "HostAppContent",
|
|
19
18
|
class: "h1wlm0i9",
|
|
20
19
|
propsAsIs: !1
|
|
21
|
-
}),
|
|
20
|
+
}), M = /* @__PURE__ */ o("div")({
|
|
22
21
|
name: "AppContainer",
|
|
23
22
|
class: "al0jzb8",
|
|
24
23
|
propsAsIs: !1
|
|
25
|
-
}),
|
|
24
|
+
}), H = /* @__PURE__ */ o("div")({
|
|
26
25
|
name: "MobileHeader",
|
|
27
26
|
class: "m1pnv6pj",
|
|
28
27
|
propsAsIs: !1
|
|
29
|
-
}),
|
|
28
|
+
}), U = /* @__PURE__ */ o("div")({
|
|
30
29
|
name: "Body",
|
|
31
30
|
class: "b1brtptg",
|
|
32
31
|
propsAsIs: !1
|
|
33
|
-
}),
|
|
32
|
+
}), A = /* @__PURE__ */ o("div")({
|
|
34
33
|
name: "VideoFrame",
|
|
35
34
|
class: "v19mta0g",
|
|
36
35
|
propsAsIs: !1
|
|
37
|
-
}),
|
|
36
|
+
}), C = /* @__PURE__ */ o("video")({
|
|
38
37
|
name: "VideoPlayer",
|
|
39
38
|
class: "v17i6v46",
|
|
40
39
|
propsAsIs: !1
|
|
41
|
-
}),
|
|
40
|
+
}), T = /* @__PURE__ */ o("div")({
|
|
42
41
|
name: "LoginContainer",
|
|
43
42
|
class: "lf71eub",
|
|
44
43
|
propsAsIs: !1
|
|
45
|
-
}),
|
|
44
|
+
}), D = /* @__PURE__ */ o("button")({
|
|
46
45
|
name: "BackToTop",
|
|
47
46
|
class: "b1xvh1fy",
|
|
48
47
|
propsAsIs: !1
|
|
49
|
-
}),
|
|
48
|
+
}), E = /* @__PURE__ */ o("a")({
|
|
50
49
|
name: "BackToTopLink",
|
|
51
50
|
class: "b1jcte5i",
|
|
52
51
|
propsAsIs: !1
|
|
53
|
-
}),
|
|
54
|
-
const
|
|
55
|
-
muted:
|
|
52
|
+
}), z = () => {
|
|
53
|
+
const s = d(), [r, i] = u(!1), t = v(({
|
|
54
|
+
muted: l
|
|
56
55
|
}) => {
|
|
57
|
-
i(
|
|
56
|
+
i(l ?? !1);
|
|
58
57
|
}, []);
|
|
59
|
-
return b(() => (
|
|
60
|
-
|
|
61
|
-
}), [
|
|
62
|
-
children: [
|
|
63
|
-
children: /* @__PURE__ */ e(
|
|
64
|
-
children: /* @__PURE__ */ e(
|
|
65
|
-
sdk:
|
|
58
|
+
return b(() => (s == null || s.addVideoPlayerController(t), () => {
|
|
59
|
+
s == null || s.removeVideoPlayerController(t);
|
|
60
|
+
}), [s, t]), /* @__PURE__ */ n(A, {
|
|
61
|
+
children: [s && /* @__PURE__ */ e(y, {
|
|
62
|
+
children: /* @__PURE__ */ e(k, {
|
|
63
|
+
children: /* @__PURE__ */ e(g, {
|
|
64
|
+
sdk: s
|
|
66
65
|
})
|
|
67
66
|
})
|
|
68
|
-
}), /* @__PURE__ */ e(
|
|
69
|
-
children: /* @__PURE__ */ e(
|
|
67
|
+
}), /* @__PURE__ */ e(T, {
|
|
68
|
+
children: /* @__PURE__ */ e(I, {
|
|
70
69
|
hideUser: !0
|
|
71
70
|
})
|
|
72
|
-
}), /* @__PURE__ */ e(
|
|
71
|
+
}), /* @__PURE__ */ e(C, {
|
|
73
72
|
src: "https://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4",
|
|
74
73
|
muted: r,
|
|
75
74
|
controls: !0
|
|
76
75
|
})]
|
|
77
76
|
});
|
|
78
|
-
},
|
|
79
|
-
hideUser:
|
|
77
|
+
}, I = ({
|
|
78
|
+
hideUser: s
|
|
80
79
|
}) => {
|
|
81
|
-
var
|
|
82
|
-
const [r, i] =
|
|
80
|
+
var c;
|
|
81
|
+
const [r, i] = u({
|
|
83
82
|
token: a.getExternalToken(),
|
|
84
83
|
schema: a.getSchema()
|
|
85
|
-
}), t =
|
|
84
|
+
}), t = d();
|
|
86
85
|
return /* @__PURE__ */ n("div", {
|
|
87
86
|
children: [/* @__PURE__ */ n("form", {
|
|
88
87
|
className: "auth-form",
|
|
89
88
|
onSubmit: (m) => {
|
|
90
89
|
m.preventDefault();
|
|
91
|
-
const p = new FormData(m.currentTarget),
|
|
90
|
+
const p = new FormData(m.currentTarget), h = p.get("token"), f = p.get("schema");
|
|
92
91
|
i({
|
|
93
|
-
token:
|
|
92
|
+
token: h,
|
|
94
93
|
schema: f
|
|
95
94
|
});
|
|
96
95
|
},
|
|
@@ -102,7 +101,7 @@ const A = /* @__PURE__ */ s("div")({
|
|
|
102
101
|
type: "text",
|
|
103
102
|
id: "token",
|
|
104
103
|
name: "token",
|
|
105
|
-
placeholder: "..." + ((
|
|
104
|
+
placeholder: "..." + ((c = a.getExternalToken()) == null ? void 0 : c.slice(-8))
|
|
106
105
|
})]
|
|
107
106
|
}), /* @__PURE__ */ n("div", {
|
|
108
107
|
children: [/* @__PURE__ */ e("label", {
|
|
@@ -120,13 +119,10 @@ const A = /* @__PURE__ */ s("div")({
|
|
|
120
119
|
children: "submit"
|
|
121
120
|
})
|
|
122
121
|
})]
|
|
123
|
-
}), /* @__PURE__ */ e(g, {
|
|
124
|
-
token: r.token,
|
|
125
|
-
schema: r.schema
|
|
126
122
|
}), /* @__PURE__ */ e("button", {
|
|
127
123
|
onClick: () => t == null ? void 0 : t.logout(),
|
|
128
124
|
children: "logout"
|
|
129
|
-
}), !
|
|
125
|
+
}), !s && /* @__PURE__ */ n("div", {
|
|
130
126
|
children: [/* @__PURE__ */ e("div", {
|
|
131
127
|
children: "user"
|
|
132
128
|
}), /* @__PURE__ */ e("textarea", {
|
|
@@ -139,13 +135,13 @@ const A = /* @__PURE__ */ s("div")({
|
|
|
139
135
|
});
|
|
140
136
|
};
|
|
141
137
|
export {
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
138
|
+
M as AppContainer,
|
|
139
|
+
D as BackToTop,
|
|
140
|
+
E as BackToTopLink,
|
|
141
|
+
U as Body,
|
|
142
|
+
w as Container,
|
|
143
|
+
F as HostAppContent,
|
|
144
|
+
I as MastersLogin,
|
|
145
|
+
H as MobileHeader,
|
|
146
|
+
z as Video
|
|
151
147
|
};
|
|
@@ -1,23 +1,24 @@
|
|
|
1
1
|
import { jsx as e, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { MastersApp as
|
|
2
|
+
import { u as l } from "../../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useState as s, Fragment as a } from "react";
|
|
4
|
+
import { MastersApp as c } from "../masters.js";
|
|
5
|
+
import { MastersStreamLayerProvider as p } from "../provider.js";
|
|
5
6
|
import { StreamLayerMastersThemeProvider as m } from "../../../ui/theme/masters.js";
|
|
6
7
|
import { useStreamLayerDebug as h } from "../../../utils/debug/index.js";
|
|
7
|
-
import { MobileHeader as u, Body as y, Container as k, AppContainer as
|
|
8
|
+
import { MobileHeader as u, Body as y, Container as k, AppContainer as f, HostAppContent as T, BackToTop as v, BackToTopLink as C } from "./components.js";
|
|
8
9
|
const L = ({ betPack: o }) => {
|
|
9
|
-
const r =
|
|
10
|
-
return r ? /* @__PURE__ */ e(m, { style: { height: "100%" }, children: /* @__PURE__ */ e(
|
|
10
|
+
const r = l();
|
|
11
|
+
return r ? /* @__PURE__ */ e(m, { style: { height: "100%" }, children: /* @__PURE__ */ e(c, { sdk: r, betPack: o, useContainer: !0 }) }) : null;
|
|
11
12
|
}, S = () => {
|
|
12
13
|
console.log("deep link handled cb");
|
|
13
14
|
}, g = () => {
|
|
14
15
|
console.log("video player handled cb");
|
|
15
|
-
},
|
|
16
|
-
const r = h(), [
|
|
17
|
-
t
|
|
16
|
+
}, K = ({ betPack: o }) => {
|
|
17
|
+
const r = h(), [t, n] = s(0), i = () => {
|
|
18
|
+
n(t + 1);
|
|
18
19
|
};
|
|
19
|
-
return /* @__PURE__ */ e(
|
|
20
|
-
|
|
20
|
+
return /* @__PURE__ */ e(a, { children: /* @__PURE__ */ d(
|
|
21
|
+
p,
|
|
21
22
|
{
|
|
22
23
|
sdkKey: r.sdkKey,
|
|
23
24
|
production: r.env === "production",
|
|
@@ -26,14 +27,14 @@ const L = ({ betPack: o }) => {
|
|
|
26
27
|
event: r.event,
|
|
27
28
|
children: [
|
|
28
29
|
/* @__PURE__ */ e(u, { onClick: () => i(), children: "header" }),
|
|
29
|
-
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(
|
|
30
|
-
/* @__PURE__ */ e(
|
|
30
|
+
/* @__PURE__ */ e(y, { children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(f, { className: "StreamLayerSDK", children: /* @__PURE__ */ e(L, { betPack: o }) }) }) }) }),
|
|
31
|
+
/* @__PURE__ */ e(T, { style: { height: 3e3 }, children: "...host app content..." }),
|
|
31
32
|
/* @__PURE__ */ e(v, { onClick: () => document.documentElement.scrollTop = 0, children: "BackToTop" }),
|
|
32
33
|
/* @__PURE__ */ e(C, { href: "#", children: "BackToTop Link" })
|
|
33
34
|
]
|
|
34
35
|
}
|
|
35
|
-
) },
|
|
36
|
+
) }, t);
|
|
36
37
|
};
|
|
37
38
|
export {
|
|
38
|
-
|
|
39
|
+
K as MastersStory
|
|
39
40
|
};
|
package/lib/app/tgl/index.d.ts
CHANGED
package/lib/app/tgl/index.js
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { styled as o } from "@linaria/react";
|
|
3
|
-
import {
|
|
3
|
+
import { d as l } from "../../hooks-B0Qttldg.js";
|
|
4
4
|
import { useStreamLayerDebug as u } from "../../utils/debug/index.js";
|
|
5
|
-
import { Video as
|
|
6
|
-
const
|
|
5
|
+
import { Video as f } from "./video.js";
|
|
6
|
+
const b = /* @__PURE__ */ o("div")({
|
|
7
7
|
name: "Body",
|
|
8
8
|
class: "b1ssmzei",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}),
|
|
10
|
+
}), v = /* @__PURE__ */ o("div")({
|
|
11
11
|
name: "Main",
|
|
12
12
|
class: "me6bye3",
|
|
13
13
|
propsAsIs: !1
|
|
14
14
|
}), k = ({
|
|
15
15
|
isMobileScreen: s,
|
|
16
16
|
persistent: t,
|
|
17
|
-
insightId:
|
|
18
|
-
promotionId:
|
|
19
|
-
sdkKey:
|
|
17
|
+
insightId: i,
|
|
18
|
+
promotionId: d,
|
|
19
|
+
sdkKey: n,
|
|
20
20
|
eventId: m,
|
|
21
21
|
sidebar: a,
|
|
22
22
|
production: p,
|
|
23
23
|
banner: c,
|
|
24
24
|
layoutMode: y = "side-by-side"
|
|
25
25
|
}) => {
|
|
26
|
-
const
|
|
27
|
-
sdkKey:
|
|
26
|
+
const r = u({
|
|
27
|
+
sdkKey: n,
|
|
28
28
|
eventId: m,
|
|
29
29
|
production: p
|
|
30
30
|
});
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
children: /* @__PURE__ */
|
|
33
|
-
sdkKey:
|
|
34
|
-
event:
|
|
35
|
-
production:
|
|
31
|
+
return /* @__PURE__ */ e(v, {
|
|
32
|
+
children: /* @__PURE__ */ e(l, {
|
|
33
|
+
sdkKey: r.sdkKey,
|
|
34
|
+
event: r.event,
|
|
35
|
+
production: r.env === "production",
|
|
36
36
|
autoEnable: !0,
|
|
37
|
-
children: /* @__PURE__ */
|
|
38
|
-
children: /* @__PURE__ */
|
|
39
|
-
event: e.event,
|
|
37
|
+
children: /* @__PURE__ */ e(b, {
|
|
38
|
+
children: /* @__PURE__ */ e(f, {
|
|
40
39
|
banner: c,
|
|
41
40
|
sidebar: a,
|
|
42
41
|
layoutMode: y,
|
|
43
|
-
promotionId:
|
|
42
|
+
promotionId: d,
|
|
44
43
|
isMobileScreen: s,
|
|
45
44
|
persistent: t,
|
|
46
|
-
insightId:
|
|
45
|
+
insightId: i
|
|
47
46
|
})
|
|
48
47
|
})
|
|
49
48
|
})
|
package/lib/app/tgl/video.d.ts
CHANGED
package/lib/app/tgl/video.js
CHANGED
|
@@ -1,58 +1,58 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { jsxs as t, Fragment as T, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { u as w } from "../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useRef as x, useState as A, useCallback as S, useEffect as F } from "react";
|
|
4
4
|
import { StreamLayerSDKAdvertisement as s } from "../app/Advertisement/index.js";
|
|
5
|
-
import { StreamLayerSDKInsight as
|
|
6
|
-
import { StreamLayerThemeProvider as
|
|
7
|
-
import { PromoButton as
|
|
8
|
-
const
|
|
9
|
-
const e =
|
|
10
|
-
|
|
5
|
+
import { StreamLayerSDKInsight as C } from "../app/Insight/index.js";
|
|
6
|
+
import { StreamLayerThemeProvider as d } from "../../ui/theme/index.js";
|
|
7
|
+
import { PromoButton as L, VideoFrame as k, AdvSidebar as R, customTheme as h, VideoPlayerWrap as b, AdvBanner as j, AdvContent as B } from "./styles.js";
|
|
8
|
+
const z = ({ isMobileScreen: l, sidebar: n, banner: u, persistent: o, insightId: p, promotionId: m, layoutMode: a }) => {
|
|
9
|
+
const e = w(), f = x(null), [P, V] = A(!0), c = S(({ muted: i }) => {
|
|
10
|
+
V(i ?? !1);
|
|
11
11
|
}, []);
|
|
12
|
-
return
|
|
13
|
-
e == null || e.removeVideoPlayerController(
|
|
14
|
-
}), [e,
|
|
15
|
-
|
|
12
|
+
return F(() => (e == null || e.addVideoPlayerController(c), () => {
|
|
13
|
+
e == null || e.removeVideoPlayerController(c);
|
|
14
|
+
}), [e, c]), /* @__PURE__ */ t(T, { children: [
|
|
15
|
+
m && /* @__PURE__ */ t(L, { onClick: () => {
|
|
16
16
|
var i;
|
|
17
|
-
(i =
|
|
18
|
-
|
|
17
|
+
(i = f.current) == null || i.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
|
|
18
|
+
var v, g, y;
|
|
19
|
+
m && ((y = (g = (v = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : v.background) == null ? void 0 : g.advertisement) == null || y.show(m));
|
|
19
20
|
}, 200);
|
|
20
21
|
}, children: [
|
|
21
22
|
"open promotion: ",
|
|
22
|
-
|
|
23
|
+
m
|
|
23
24
|
] }),
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ t(k, { ref: f, "data-testid": "video-frame", children: [
|
|
25
26
|
/* @__PURE__ */ r(
|
|
26
|
-
|
|
27
|
+
R,
|
|
27
28
|
{
|
|
28
29
|
style: {
|
|
29
30
|
...a === "cover" ? { position: "absolute" } : {},
|
|
30
|
-
...
|
|
31
|
-
...
|
|
31
|
+
...n === "left" ? { left: 0 } : { right: 0, order: 3 },
|
|
32
|
+
...l ? { maxWidth: "calc(300px + env(safe-area-inset-left))" } : {}
|
|
32
33
|
},
|
|
33
|
-
children: e && /* @__PURE__ */
|
|
34
|
+
children: e && /* @__PURE__ */ t(d, { customTheme: h, children: [
|
|
34
35
|
/* @__PURE__ */ r(
|
|
35
36
|
s,
|
|
36
37
|
{
|
|
37
|
-
isMobileScreen:
|
|
38
|
-
event: n,
|
|
38
|
+
isMobileScreen: l,
|
|
39
39
|
sdk: e,
|
|
40
|
-
sidebar:
|
|
40
|
+
sidebar: n,
|
|
41
41
|
layoutMode: a,
|
|
42
|
-
persistent:
|
|
42
|
+
persistent: o,
|
|
43
43
|
skipTypeCheck: !0
|
|
44
44
|
}
|
|
45
45
|
),
|
|
46
|
-
/* @__PURE__ */ r(
|
|
46
|
+
/* @__PURE__ */ r(C, { insightId: p, sdk: e, persistent: o })
|
|
47
47
|
] })
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
/* @__PURE__ */
|
|
50
|
+
/* @__PURE__ */ t(b, { children: [
|
|
51
51
|
/* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
|
|
52
52
|
"video",
|
|
53
53
|
{
|
|
54
54
|
src: "https://storage.googleapis.com/cdn.streamlayer.io/assets/sdk-web/Own%20The%20Game%201080p%20RF18.mp4",
|
|
55
|
-
muted:
|
|
55
|
+
muted: P,
|
|
56
56
|
width: "100%",
|
|
57
57
|
height: "100%",
|
|
58
58
|
autoplay: "autoplay",
|
|
@@ -62,44 +62,42 @@ const O = ({ isMobileScreen: m, sidebar: l, banner: p, event: n, persistent: t,
|
|
|
62
62
|
}
|
|
63
63
|
) }),
|
|
64
64
|
/* @__PURE__ */ r(
|
|
65
|
-
|
|
65
|
+
j,
|
|
66
66
|
{
|
|
67
67
|
style: {
|
|
68
68
|
...a === "cover" ? { position: "absolute" } : {},
|
|
69
|
-
...
|
|
69
|
+
...u === "top" ? { top: 0, order: -1 } : { bottom: 0 }
|
|
70
70
|
},
|
|
71
|
-
children: e && /* @__PURE__ */ r(
|
|
71
|
+
children: e && /* @__PURE__ */ r(d, { customTheme: h, children: /* @__PURE__ */ r(
|
|
72
72
|
s,
|
|
73
73
|
{
|
|
74
|
-
isMobileScreen:
|
|
75
|
-
event: n,
|
|
74
|
+
isMobileScreen: l,
|
|
76
75
|
sdk: e,
|
|
77
|
-
banner:
|
|
76
|
+
banner: u,
|
|
78
77
|
layoutMode: a,
|
|
79
|
-
persistent:
|
|
78
|
+
persistent: o
|
|
80
79
|
}
|
|
81
80
|
) })
|
|
82
81
|
}
|
|
83
82
|
)
|
|
84
83
|
] })
|
|
85
84
|
] }),
|
|
86
|
-
/* @__PURE__ */ r(
|
|
85
|
+
/* @__PURE__ */ r(B, { children: e && /* @__PURE__ */ t(d, { customTheme: h, children: [
|
|
87
86
|
/* @__PURE__ */ r(
|
|
88
87
|
s,
|
|
89
88
|
{
|
|
90
|
-
isMobileScreen:
|
|
91
|
-
event: n,
|
|
89
|
+
isMobileScreen: l,
|
|
92
90
|
sdk: e,
|
|
93
|
-
sidebar:
|
|
91
|
+
sidebar: n,
|
|
94
92
|
layoutMode: a,
|
|
95
|
-
persistent:
|
|
93
|
+
persistent: o,
|
|
96
94
|
skipTypeCheck: !0
|
|
97
95
|
}
|
|
98
96
|
),
|
|
99
|
-
/* @__PURE__ */ r(
|
|
97
|
+
/* @__PURE__ */ r(C, { insightId: p, sdk: e, persistent: o })
|
|
100
98
|
] }) })
|
|
101
99
|
] });
|
|
102
100
|
};
|
|
103
101
|
export {
|
|
104
|
-
|
|
102
|
+
z as Video
|
|
105
103
|
};
|