@streamlayer/react-ui 1.32.4 → 1.33.1
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.d.ts +1 -1
- package/lib/app/app/Advertisement/index.js +14 -15
- package/lib/app/app/Banner/index.d.ts +1 -1
- package/lib/app/app/Features/FeatureProvider.d.ts +2 -2
- package/lib/app/app/Features/Gamification/Leaderboard.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Leaderboard.js +46 -36
- package/lib/app/app/Features/Gamification/Question.d.ts +2 -2
- 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/QuestionsList.d.ts +1 -1
- package/lib/app/app/Features/Gamification/Tabs.d.ts +1 -1
- package/lib/app/app/Features/Gamification/UserSummary.d.ts +1 -1
- package/lib/app/app/Features/Gamification/index.d.ts +2 -2
- package/lib/app/app/Features/Gamification/index.js +29 -28
- package/lib/app/app/Features/index.d.ts +2 -2
- package/lib/app/app/InApp/index.d.ts +1 -1
- package/lib/app/app/Insight/index.d.ts +2 -2
- package/lib/app/app/Layout/index.d.ts +1 -1
- package/lib/app/app/Navigation/index.d.ts +1 -1
- package/lib/app/app/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/index.d.ts +2 -2
- package/lib/app/app/Notifications/Onboarding/index.js +45 -42
- package/lib/app/app/Notifications/index.d.ts +1 -1
- package/lib/app/app/Points/index.d.ts +1 -1
- package/lib/app/app/index.d.ts +1 -1
- 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/app/useApp.d.ts +1 -1
- package/lib/app/app/useAppContext.d.ts +1 -1
- 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/BetPack/BetPackContent/QuestionScreen/index.d.ts +2 -2
- package/lib/app/masters/BetPack/BetPackContent/index.d.ts +1 -1
- package/lib/app/masters/BetPack/BetPackOverlay/index.d.ts +1 -1
- package/lib/app/masters/BetPack/index.d.ts +1 -1
- package/lib/app/masters/Features/FeatureProvider.d.ts +2 -2
- package/lib/app/masters/Features/Gamification/Question.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/QuestionsList.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/Tabs.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/UserSummary.d.ts +1 -1
- package/lib/app/masters/Features/Gamification/index.d.ts +1 -1
- package/lib/app/masters/Features/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/Notification/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/index.d.ts +2 -2
- package/lib/app/masters/Notifications/Onboarding/index.js +42 -39
- package/lib/app/masters/Notifications/index.d.ts +1 -1
- package/lib/app/masters/Points/index.d.ts +1 -1
- package/lib/app/masters/masters.d.ts +2 -1
- 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/masters/useMastersApp.d.ts +1 -1
- package/lib/app/masters/useMastersContext.d.ts +1 -1
- 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/useSdkFeature.d.ts +3 -3
- package/lib/app/webos/Advertisement/AdvertisementUI.d.ts +1 -1
- package/lib/app/webos/Advertisement/index.d.ts +1 -1
- package/lib/app/webos/ExposedPauseAd/PauseAd.d.ts +1 -1
- package/lib/app/webos/ExposedPauseAd/PauseAd.js +68 -68
- package/lib/app/webos/Question/index.d.ts +1 -1
- package/lib/app/webos/index.d.ts +1 -1
- package/lib/app/webos/story.js +26 -26
- package/lib/app/webos/ui/Sidebar/PromoAction.d.ts +1 -1
- package/lib/app/webos/ui/Sidebar/index.d.ts +2 -2
- package/lib/app/webos/ui/Sidebar/styles.js +82 -888
- package/lib/app/webos/ui/insight/index.d.ts +1 -1
- 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/analytics.d.ts +1 -1
- 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 +3 -3
- package/lib/ui/advertisement/index.d.ts +1 -1
- package/lib/ui/advertisement/mock.d.ts +1 -1
- package/lib/ui/advertisement/notification/index.d.ts +1 -1
- package/lib/ui/advertisement/notification/lower-third/index.d.ts +1 -1
- 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.d.ts +1 -1
- package/lib/ui/advertisement/overlay/externalAd/vast-player/useVastAds.js +63 -204
- package/lib/ui/advertisement/overlay/index.d.ts +2 -2
- package/lib/ui/close-btn/index.d.ts +1 -1
- package/lib/ui/gamification/constants.d.ts +1 -1
- package/lib/ui/gamification/detail/header/index.d.ts +1 -1
- package/lib/ui/gamification/insight/index.d.ts +1 -1
- package/lib/ui/gamification/insight-list/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/list-item/index.d.ts +1 -1
- package/lib/ui/gamification/leaderboard/static.d.ts +1 -1
- package/lib/ui/gamification/onboarding/index.d.ts +2 -2
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.d.ts +2 -2
- package/lib/ui/gamification/question/inapp/notification/AdNotification/NotificationMedia/index.js +1 -1
- package/lib/ui/gamification/question/inapp/notification/AdNotification/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/NotificationMedia/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/notification/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/onboarding/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result/frames/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/frames/index.d.ts +1 -1
- package/lib/ui/gamification/question/inapp/prediction-result-ad/index.d.ts +1 -1
- package/lib/ui/gamification/question/index.d.ts +1 -1
- package/lib/ui/gamification/question/list/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/insight/index.d.ts +2 -2
- package/lib/ui/gamification/question/notification/prediction-result/index.d.ts +1 -1
- package/lib/ui/gamification/question/notification/tweet/index.d.ts +1 -1
- package/lib/ui/gamification/vote/feedback/index.d.ts +1 -1
- package/lib/ui/gamification/vote/index.d.ts +1 -1
- package/lib/ui/gamification/vote/vote-option/index.d.ts +1 -1
- package/lib/ui/gamification/vote/win-bar/index.d.ts +1 -1
- package/lib/ui/icons/index.d.ts +198 -66
- package/lib/ui/navigation/button/index.d.ts +1 -1
- package/lib/ui/questions/insight/index.d.ts +1 -1
- package/lib/ui/questions/twitter/index.d.ts +1 -1
- 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/components/bypassLogin.d.ts +1 -1
- package/lib/utils/debug/components/developer.d.ts +1 -1
- package/lib/utils/debug/components/eventInput.d.ts +1 -1
- package/lib/utils/debug/index.js +8 -8
- package/lib/utils/debug/storage.d.ts +1 -1
- package/lib/utils/storage.d.ts +1 -1
- 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,71 +1,69 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { StreamLayerSDKAdvertisement as
|
|
5
|
-
import { Layout as
|
|
6
|
-
import { PromoButton as
|
|
7
|
-
const
|
|
8
|
-
const e =
|
|
9
|
-
|
|
1
|
+
import { jsxs as p, Fragment as y, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { u as V } from "../../../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useRef as x, useState as P, useCallback as b, useEffect as w } from "react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as i } from "../../Advertisement/index.js";
|
|
5
|
+
import { Layout as F } from "../../Layout/index.js";
|
|
6
|
+
import { PromoButton as L, VideoFrame as j } from "./styles.js";
|
|
7
|
+
const K = ({ isMobileScreen: a, skipAutoClose: n, sidebar: l, banner: h, promotionId: r, layoutMode: s }) => {
|
|
8
|
+
const e = V(), u = x(null), [g, v] = P(!1), m = b(({ muted: o }) => {
|
|
9
|
+
v(o ?? !1);
|
|
10
10
|
}, []);
|
|
11
|
-
return
|
|
12
|
-
e == null || e.removeVideoPlayerController(
|
|
13
|
-
}), [e,
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
(
|
|
17
|
-
|
|
11
|
+
return w(() => (e == null || e.addVideoPlayerController(m), () => {
|
|
12
|
+
e == null || e.removeVideoPlayerController(m);
|
|
13
|
+
}), [e, m]), /* @__PURE__ */ p(y, { children: [
|
|
14
|
+
r && /* @__PURE__ */ p(L, { onClick: () => {
|
|
15
|
+
var o;
|
|
16
|
+
(o = u.current) == null || o.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
|
|
17
|
+
var c, d, f;
|
|
18
|
+
r && ((f = (d = (c = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : c.background) == null ? void 0 : d.advertisement) == null || f.show(r));
|
|
18
19
|
}, 200);
|
|
19
20
|
}, children: [
|
|
20
21
|
"open promotion: ",
|
|
21
|
-
|
|
22
|
+
r
|
|
22
23
|
] }),
|
|
23
|
-
/* @__PURE__ */
|
|
24
|
-
|
|
24
|
+
/* @__PURE__ */ t(j, { ref: u, "data-testid": "video-frame", children: e && /* @__PURE__ */ t(
|
|
25
|
+
F,
|
|
25
26
|
{
|
|
26
27
|
sdk: e,
|
|
27
|
-
sidebar: /* @__PURE__ */
|
|
28
|
-
|
|
28
|
+
sidebar: /* @__PURE__ */ t(
|
|
29
|
+
i,
|
|
29
30
|
{
|
|
30
|
-
isMobileScreen:
|
|
31
|
-
event: m,
|
|
31
|
+
isMobileScreen: a,
|
|
32
32
|
sdk: e,
|
|
33
|
-
sidebar:
|
|
34
|
-
layoutMode:
|
|
35
|
-
skipAutoClose:
|
|
33
|
+
sidebar: l,
|
|
34
|
+
layoutMode: s,
|
|
35
|
+
skipAutoClose: n,
|
|
36
36
|
externalAd: !0,
|
|
37
37
|
persistent: !0
|
|
38
38
|
}
|
|
39
39
|
),
|
|
40
|
-
banner: /* @__PURE__ */
|
|
41
|
-
|
|
40
|
+
banner: /* @__PURE__ */ t(
|
|
41
|
+
i,
|
|
42
42
|
{
|
|
43
|
-
isMobileScreen:
|
|
44
|
-
event: m,
|
|
43
|
+
isMobileScreen: a,
|
|
45
44
|
sdk: e,
|
|
46
|
-
banner:
|
|
47
|
-
layoutMode:
|
|
48
|
-
skipAutoClose:
|
|
45
|
+
banner: h,
|
|
46
|
+
layoutMode: s,
|
|
47
|
+
skipAutoClose: n,
|
|
49
48
|
persistent: !0
|
|
50
49
|
}
|
|
51
50
|
),
|
|
52
|
-
overlay: /* @__PURE__ */
|
|
53
|
-
|
|
51
|
+
overlay: /* @__PURE__ */ t(
|
|
52
|
+
i,
|
|
54
53
|
{
|
|
55
|
-
isMobileScreen:
|
|
56
|
-
event: m,
|
|
54
|
+
isMobileScreen: a,
|
|
57
55
|
sdk: e,
|
|
58
|
-
sidebar:
|
|
59
|
-
layoutMode:
|
|
60
|
-
skipAutoClose:
|
|
56
|
+
sidebar: l,
|
|
57
|
+
layoutMode: s,
|
|
58
|
+
skipAutoClose: n,
|
|
61
59
|
persistent: !0
|
|
62
60
|
}
|
|
63
61
|
),
|
|
64
|
-
children: /* @__PURE__ */
|
|
62
|
+
children: /* @__PURE__ */ t("div", { className: "divAnchor", children: /* @__PURE__ */ t(
|
|
65
63
|
"video",
|
|
66
64
|
{
|
|
67
65
|
src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
|
|
68
|
-
muted:
|
|
66
|
+
muted: g,
|
|
69
67
|
width: "100%",
|
|
70
68
|
height: "100%",
|
|
71
69
|
autoplay: "autoplay",
|
|
@@ -79,5 +77,5 @@ const D = ({ isMobileScreen: o, skipAutoClose: a, sidebar: u, banner: p, event:
|
|
|
79
77
|
] });
|
|
80
78
|
};
|
|
81
79
|
export {
|
|
82
|
-
|
|
80
|
+
K as Video
|
|
83
81
|
};
|
|
@@ -1,38 +1,37 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { styled as
|
|
3
|
-
import {
|
|
2
|
+
import { styled as e } from "@linaria/react";
|
|
3
|
+
import { d as m } from "../../../../hooks-B0Qttldg.js";
|
|
4
4
|
import { useStreamLayerDebug as a } from "../../../../utils/debug/index.js";
|
|
5
5
|
import { Video as p } from "./video.js";
|
|
6
|
-
const c = /* @__PURE__ */
|
|
6
|
+
const c = /* @__PURE__ */ e("div")({
|
|
7
7
|
name: "Body",
|
|
8
8
|
class: "b1ql7fnw",
|
|
9
9
|
propsAsIs: !1
|
|
10
|
-
}), l = /* @__PURE__ */
|
|
10
|
+
}), l = /* @__PURE__ */ e("div")({
|
|
11
11
|
name: "Main",
|
|
12
12
|
class: "m18rqnzu",
|
|
13
13
|
propsAsIs: !1
|
|
14
14
|
}), h = ({
|
|
15
15
|
isMobileScreen: t,
|
|
16
|
-
promotionId:
|
|
17
|
-
sdkKey:
|
|
16
|
+
promotionId: s,
|
|
17
|
+
sdkKey: n,
|
|
18
18
|
eventId: i,
|
|
19
|
-
production:
|
|
19
|
+
production: d
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
sdkKey:
|
|
21
|
+
const r = a({
|
|
22
|
+
sdkKey: n,
|
|
23
23
|
eventId: i,
|
|
24
|
-
production:
|
|
24
|
+
production: d
|
|
25
25
|
});
|
|
26
26
|
return /* @__PURE__ */ o(l, {
|
|
27
|
-
children: /* @__PURE__ */ o(
|
|
28
|
-
sdkKey:
|
|
29
|
-
event:
|
|
30
|
-
production:
|
|
27
|
+
children: /* @__PURE__ */ o(m, {
|
|
28
|
+
sdkKey: r.sdkKey,
|
|
29
|
+
event: r.event,
|
|
30
|
+
production: r.env === "production",
|
|
31
31
|
autoEnable: !0,
|
|
32
32
|
children: /* @__PURE__ */ o(c, {
|
|
33
33
|
children: /* @__PURE__ */ o(p, {
|
|
34
|
-
|
|
35
|
-
promotionId: n,
|
|
34
|
+
promotionId: s,
|
|
36
35
|
isMobileScreen: t
|
|
37
36
|
})
|
|
38
37
|
})
|
|
@@ -1,31 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { StreamLayerSDKAdvertisement as
|
|
5
|
-
import { StreamLayerThemeProvider as
|
|
6
|
-
import { PromoButton as
|
|
7
|
-
const
|
|
8
|
-
const e =
|
|
9
|
-
|
|
1
|
+
import { jsxs as i, Fragment as h, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { u as f } from "../../../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useRef as p, useState as g, useCallback as v, useEffect as y } from "react";
|
|
4
|
+
import { StreamLayerSDKAdvertisement as P } from "../../Advertisement/index.js";
|
|
5
|
+
import { StreamLayerThemeProvider as V } from "../../../../ui/theme/index.js";
|
|
6
|
+
import { PromoButton as S, VideoFrame as b, VideoPlayerWrap as x, AdvBanner as C } from "./styles.js";
|
|
7
|
+
const T = ({ isMobileScreen: c, promotionId: o }) => {
|
|
8
|
+
const e = f(), l = p(null), [d, u] = g(!1), a = v(({ muted: t }) => {
|
|
9
|
+
u(t ?? !1);
|
|
10
10
|
}, []);
|
|
11
|
-
return
|
|
12
|
-
e == null || e.removeVideoPlayerController(
|
|
13
|
-
}), [e,
|
|
14
|
-
|
|
15
|
-
var
|
|
16
|
-
(
|
|
17
|
-
|
|
11
|
+
return y(() => (e == null || e.addVideoPlayerController(a), () => {
|
|
12
|
+
e == null || e.removeVideoPlayerController(a);
|
|
13
|
+
}), [e, a]), /* @__PURE__ */ i(h, { children: [
|
|
14
|
+
o && /* @__PURE__ */ i(S, { onClick: () => {
|
|
15
|
+
var t;
|
|
16
|
+
(t = l.current) == null || t.scrollIntoView({ behavior: "smooth" }), setTimeout(() => {
|
|
17
|
+
var n, s, m;
|
|
18
|
+
o && ((m = (s = (n = e == null ? void 0 : e.getFeature(12)) == null ? void 0 : n.background) == null ? void 0 : s.advertisement) == null || m.show(o));
|
|
18
19
|
}, 200);
|
|
19
20
|
}, children: [
|
|
20
21
|
"open promotion: ",
|
|
21
|
-
|
|
22
|
+
o
|
|
22
23
|
] }),
|
|
23
|
-
/* @__PURE__ */ r(
|
|
24
|
+
/* @__PURE__ */ r(b, { ref: l, "data-testid": "video-frame", children: /* @__PURE__ */ i(x, { children: [
|
|
24
25
|
/* @__PURE__ */ r("div", { className: "divAnchor", children: /* @__PURE__ */ r(
|
|
25
26
|
"video",
|
|
26
27
|
{
|
|
27
28
|
src: "https://storage.googleapis.com/gvabox/media/samples/stock.mp4",
|
|
28
|
-
muted:
|
|
29
|
+
muted: d,
|
|
29
30
|
width: "100%",
|
|
30
31
|
height: "100%",
|
|
31
32
|
autoplay: "autoplay",
|
|
@@ -34,19 +35,10 @@ const B = ({ isMobileScreen: l, event: m, promotionId: t }) => {
|
|
|
34
35
|
controls: !0
|
|
35
36
|
}
|
|
36
37
|
) }),
|
|
37
|
-
/* @__PURE__ */ r(
|
|
38
|
-
v,
|
|
39
|
-
{
|
|
40
|
-
isMobileScreen: l,
|
|
41
|
-
event: m,
|
|
42
|
-
sdk: e,
|
|
43
|
-
notification: !0,
|
|
44
|
-
persistent: !0
|
|
45
|
-
}
|
|
46
|
-
) }) })
|
|
38
|
+
/* @__PURE__ */ r(C, { children: e && /* @__PURE__ */ r(V, { children: /* @__PURE__ */ r(P, { isMobileScreen: c, sdk: e, notification: !0, persistent: !0 }) }) })
|
|
47
39
|
] }) })
|
|
48
40
|
] });
|
|
49
41
|
};
|
|
50
42
|
export {
|
|
51
|
-
|
|
43
|
+
T as Video
|
|
52
44
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { useStreamLayerDebug as
|
|
4
|
-
import { AppLogin as
|
|
2
|
+
import { d as o } from "../../../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useStreamLayerDebug as a, StreamLayerDebug as n } from "../../../../utils/debug/index.js";
|
|
4
|
+
import { AppLogin as s } from "./login.js";
|
|
5
5
|
const p = () => {
|
|
6
|
-
const r =
|
|
6
|
+
const r = a();
|
|
7
7
|
return /* @__PURE__ */ t(o, { sdkKey: r.sdkKey, production: r.env === "production", autoEnable: !1, children: [
|
|
8
|
-
/* @__PURE__ */ e(
|
|
9
|
-
/* @__PURE__ */ e(
|
|
8
|
+
/* @__PURE__ */ e(s, {}),
|
|
9
|
+
/* @__PURE__ */ e(n, { ...r, standalone: !0, hideAuth: !0 })
|
|
10
10
|
] });
|
|
11
11
|
};
|
|
12
12
|
export {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { u as c } from "../../../../hooks-B0Qttldg.js";
|
|
2
3
|
import { useState as u, useEffect as h } from "react";
|
|
3
|
-
import { useStreamLayer as c } from "@streamlayer/react";
|
|
4
4
|
import { storage as s } from "@streamlayer/sdk-web-core";
|
|
5
5
|
const d = ({ token: t, schema: o }) => {
|
|
6
6
|
const n = c();
|
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
import { jsxs as S, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { u as V } from "../../../hooks-B0Qttldg.js";
|
|
2
3
|
import p from "hls.js";
|
|
3
|
-
import { useRef as y, useState as h, useCallback as P, useEffect as
|
|
4
|
-
import { useStreamLayer as V } from "@streamlayer/react";
|
|
4
|
+
import { useRef as y, useState as h, useCallback as P, useEffect as n } from "react";
|
|
5
5
|
import { StreamLayerSDKPoints as b } from "../Points/index.js";
|
|
6
|
-
import { VideoFrame as w, PointsContainer as v, VideoPlayerWrap as C, LinkToLogin as L, Preload as x, VideoIFrame as k, VideoTag as
|
|
6
|
+
import { VideoFrame as w, PointsContainer as v, VideoPlayerWrap as C, LinkToLogin as L, Preload as x, VideoIFrame as k, VideoTag as R } from "./styles.js";
|
|
7
7
|
import { VideoContainer as K, VideoMuteButton as W } from "./styles.js";
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
({ muted:
|
|
11
|
-
i(
|
|
8
|
+
const T = ({ muted: l, toggleMute: i }) => {
|
|
9
|
+
const r = y(), c = y(), o = V(), [a, u] = h(""), [m, g] = h(!1), s = P(
|
|
10
|
+
({ muted: e = !1 }) => {
|
|
11
|
+
i(e), r.current && (r.current.mute = e);
|
|
12
12
|
},
|
|
13
13
|
[i]
|
|
14
14
|
);
|
|
15
|
-
return
|
|
15
|
+
return n(() => (o == null || o.addVideoPlayerController(s), () => {
|
|
16
16
|
o == null || o.removeVideoPlayerController(s);
|
|
17
|
-
}), [o, s]),
|
|
17
|
+
}), [o, s]), n(() => o ? o.streamSummary().subscribe((e) => {
|
|
18
18
|
var d, f;
|
|
19
|
-
(f = (d =
|
|
19
|
+
(f = (d = e.data) == null ? void 0 : d.summary) != null && f.stream && u(e.data.summary.stream);
|
|
20
20
|
}) : () => {
|
|
21
|
-
}, [o]),
|
|
21
|
+
}, [o]), n(() => () => {
|
|
22
22
|
c.current && clearTimeout(c.current);
|
|
23
|
-
}, []),
|
|
24
|
-
if (
|
|
25
|
-
if (p.isSupported() &&
|
|
26
|
-
const
|
|
23
|
+
}, []), n(() => {
|
|
24
|
+
if (a && a.includes("m3u8"))
|
|
25
|
+
if (p.isSupported() && r.current) {
|
|
26
|
+
const e = new p({
|
|
27
27
|
debug: !1
|
|
28
28
|
});
|
|
29
|
-
|
|
29
|
+
e.loadSource(a), e.attachMedia(r.current);
|
|
30
30
|
} else
|
|
31
31
|
u("");
|
|
32
|
-
|
|
32
|
+
r.current && (r.current.volume = 0.1, r.current.play().catch(() => {
|
|
33
33
|
g(!0);
|
|
34
34
|
}));
|
|
35
|
-
}, [
|
|
36
|
-
var
|
|
37
|
-
m && ((
|
|
38
|
-
}, [m]),
|
|
35
|
+
}, [a]), n(() => {
|
|
36
|
+
var e;
|
|
37
|
+
m && ((e = r.current) == null || e.play());
|
|
38
|
+
}, [m]), a ? a.includes("player.castr.com") ? /* @__PURE__ */ t(
|
|
39
39
|
k,
|
|
40
40
|
{
|
|
41
|
-
src: `${
|
|
41
|
+
src: `${a}?loop=on&fullscreen=off&airplay=off&cast=off&pip=off`,
|
|
42
42
|
width: "100%",
|
|
43
43
|
height: "100%",
|
|
44
44
|
frameBorder: "0",
|
|
@@ -46,10 +46,10 @@ const R = ({ muted: l, toggleMute: i }) => {
|
|
|
46
46
|
allow: "autoplay"
|
|
47
47
|
}
|
|
48
48
|
) : /* @__PURE__ */ t(
|
|
49
|
-
|
|
49
|
+
R,
|
|
50
50
|
{
|
|
51
|
-
src:
|
|
52
|
-
ref:
|
|
51
|
+
src: a,
|
|
52
|
+
ref: r,
|
|
53
53
|
muted: l,
|
|
54
54
|
autoPlay: !0,
|
|
55
55
|
loop: !0,
|
|
@@ -59,10 +59,10 @@ const R = ({ muted: l, toggleMute: i }) => {
|
|
|
59
59
|
}
|
|
60
60
|
) : /* @__PURE__ */ t(x, { children: /* @__PURE__ */ t("img", { src: "https://cdn.streamlayer.io/sdk-web-demo/loader.png", alt: "" }) });
|
|
61
61
|
}, M = ({ muted: l, toggleMute: i }) => {
|
|
62
|
-
const
|
|
62
|
+
const r = V();
|
|
63
63
|
return /* @__PURE__ */ S(w, { "data-testid": "video-frame", children: [
|
|
64
|
-
|
|
65
|
-
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(
|
|
64
|
+
r && /* @__PURE__ */ t(v, { children: /* @__PURE__ */ t(b, { sdk: r }) }),
|
|
65
|
+
/* @__PURE__ */ t(C, { children: /* @__PURE__ */ t(T, { muted: l, toggleMute: i }) }),
|
|
66
66
|
/* @__PURE__ */ t(
|
|
67
67
|
L,
|
|
68
68
|
{
|
package/lib/app/app/useApp.d.ts
CHANGED
package/lib/app/login/demo.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import {
|
|
3
|
-
import { useStore as
|
|
4
|
-
import { storage as
|
|
1
|
+
import { jsxs as i, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { u } from "../../hooks-B0Qttldg.js";
|
|
3
|
+
import { useStore as l } from "@streamlayer/react-polyfills";
|
|
4
|
+
import { storage as c } from "@streamlayer/sdk-web-core";
|
|
5
5
|
import "@streamlayer/sdk-web-anonymous-auth";
|
|
6
|
-
import { Login as
|
|
7
|
-
const
|
|
8
|
-
|
|
6
|
+
import { Login as m } from "./index.js";
|
|
7
|
+
const x = () => {
|
|
8
|
+
var n, e;
|
|
9
|
+
const o = u();
|
|
9
10
|
if (!o)
|
|
10
11
|
return null;
|
|
11
|
-
o == null || o.closeFeature(
|
|
12
|
-
const r =
|
|
13
|
-
return r.data ? /* @__PURE__ */
|
|
12
|
+
o == null || o.closeFeature(!1);
|
|
13
|
+
const r = l(o.getUserStore());
|
|
14
|
+
return r.data ? /* @__PURE__ */ i("div", { children: [
|
|
14
15
|
/* @__PURE__ */ t(
|
|
15
16
|
"a",
|
|
16
17
|
{
|
|
@@ -22,21 +23,21 @@ const w = () => {
|
|
|
22
23
|
}
|
|
23
24
|
),
|
|
24
25
|
/* @__PURE__ */ t("button", { onClick: o.logout, children: "logout" }),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
+
/* @__PURE__ */ i("div", { children: [
|
|
26
27
|
"current user: ",
|
|
27
|
-
r.data.data.attributes.name,
|
|
28
|
-
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("textarea", { style: { width: "100%" }, value:
|
|
28
|
+
(e = (n = r.data.data) == null ? void 0 : n.attributes) == null ? void 0 : e.name,
|
|
29
|
+
/* @__PURE__ */ t("div", { children: /* @__PURE__ */ t("textarea", { style: { width: "100%" }, value: c.getToken(), rows: 10 }) })
|
|
29
30
|
] })
|
|
30
|
-
] }) : /* @__PURE__ */ t(
|
|
31
|
+
] }) : /* @__PURE__ */ t(m, { login: async (s) => {
|
|
31
32
|
try {
|
|
32
|
-
await o.authorizationBypass("streamlayer:streamlayer",
|
|
33
|
-
} catch (
|
|
34
|
-
throw console.log("login err",
|
|
33
|
+
await o.authorizationBypass("streamlayer:streamlayer", s);
|
|
34
|
+
} catch (a) {
|
|
35
|
+
throw console.log("login err", a), a;
|
|
35
36
|
}
|
|
36
37
|
}, anonymousLogin: async () => {
|
|
37
38
|
await o.anonymousAuthorization();
|
|
38
39
|
}, host: o.host });
|
|
39
40
|
};
|
|
40
41
|
export {
|
|
41
|
-
|
|
42
|
+
x as LoginComponent
|
|
42
43
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { ScreenContainer as
|
|
4
|
-
import { S as
|
|
5
|
-
import { EndScreenSponsorIcon as
|
|
6
|
-
const
|
|
7
|
-
const [
|
|
2
|
+
import { useState as d } from "react";
|
|
3
|
+
import { ScreenContainer as r } from "../ScreenContainer/index.js";
|
|
4
|
+
import { S as t, a as l, b as m, c as i, d as c } from "../../../../../styles-BfnMua4o.js";
|
|
5
|
+
import { EndScreenSponsorIcon as p, EndScreenMedia as h } from "./styles.js";
|
|
6
|
+
const C = ({ onEvent: o }) => {
|
|
7
|
+
const [s, a] = d(
|
|
8
8
|
0
|
|
9
9
|
/* FIRST */
|
|
10
10
|
);
|
|
11
|
-
return
|
|
12
|
-
/* @__PURE__ */ e(
|
|
13
|
-
/* @__PURE__ */ n(
|
|
14
|
-
/* @__PURE__ */ e(
|
|
15
|
-
/* @__PURE__ */ e(
|
|
11
|
+
return s === 0 ? /* @__PURE__ */ e(r, { children: /* @__PURE__ */ n(t, { children: [
|
|
12
|
+
/* @__PURE__ */ e(p, {}),
|
|
13
|
+
/* @__PURE__ */ n(l, { children: [
|
|
14
|
+
/* @__PURE__ */ e(m, { children: "Great picks!" }),
|
|
15
|
+
/* @__PURE__ */ e(i, { children: "Stay in the Enhanced Stream for live results, predictions, trivia, polls, and match insights." })
|
|
16
16
|
] }),
|
|
17
17
|
/* @__PURE__ */ e(
|
|
18
|
-
|
|
18
|
+
c,
|
|
19
19
|
{
|
|
20
20
|
"data-a": "intr",
|
|
21
21
|
onClick: () => {
|
|
22
|
-
|
|
22
|
+
a(
|
|
23
23
|
1
|
|
24
24
|
/* LAST */
|
|
25
25
|
);
|
|
@@ -28,12 +28,12 @@ const E = ({ onEvent: s, height: r }) => {
|
|
|
28
28
|
children: "Continue"
|
|
29
29
|
}
|
|
30
30
|
)
|
|
31
|
-
] }) }, "end") : /* @__PURE__ */ e(
|
|
31
|
+
] }) }, "end") : /* @__PURE__ */ e(r, { children: /* @__PURE__ */ n(t, { children: [
|
|
32
32
|
/* @__PURE__ */ e(h, { src: "https://cdn.streamlayer.io/assets/sdk-web/onboarding-steps/bet_pack_end_screen.png" }),
|
|
33
|
-
/* @__PURE__ */ e(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
33
|
+
/* @__PURE__ */ e(i, { children: "Look for more live match insights, predictions and more." }),
|
|
34
|
+
/* @__PURE__ */ e(c, { "data-a": "intr", onClick: () => o({ type: "slOpenGameCenter" }), children: "Open Game Center" })
|
|
35
35
|
] }) }, "end");
|
|
36
36
|
};
|
|
37
37
|
export {
|
|
38
|
-
|
|
38
|
+
C as EndScreen
|
|
39
39
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Gamification } from '
|
|
2
|
-
import { ExtendedQuestion } from '
|
|
1
|
+
import { Gamification } from '../../../../../packages/feature-gamification/src/index.ts';
|
|
2
|
+
import { ExtendedQuestion } from '../../../../../packages/sdk-web-types/src/index.ts';
|
|
3
3
|
export declare const QuestionScreen: React.FC<{
|
|
4
4
|
question: ExtendedQuestion;
|
|
5
5
|
vote: Gamification['submitAnswer'];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gamification } from '
|
|
1
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
2
2
|
import { BetPackEventCb } from '../';
|
|
3
3
|
export declare const BetPackContent: React.FC<{
|
|
4
4
|
gamification: Gamification;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { StreamLayerSDK } from '
|
|
2
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
3
3
|
import { AllowedMessageType } from './utils';
|
|
4
4
|
export { BetPackOverlay, type BetPackOverlayProps } from './BetPackOverlay';
|
|
5
5
|
export type BetPackEventCb = (event: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Features } from '
|
|
2
|
-
import { StreamLayerSDK } from '
|
|
1
|
+
import { Features } from '../../../packages/sdk-web-features/src/index.ts';
|
|
2
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
3
3
|
/** Here we check data, render loaders, load data and perform some side effects for the active feature */
|
|
4
4
|
export declare const FeatureProvider: React.FC<{
|
|
5
5
|
feature: Features;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Gamification } from '
|
|
1
|
+
import { Gamification } from '../../../../packages/feature-gamification/src/index.ts';
|
|
2
2
|
export declare const QuestionsList: React.FC<{
|
|
3
3
|
store: ReturnType<Exclude<Gamification['feedList'], undefined>['getStore']>;
|
|
4
4
|
openQuestion: (questionId: string) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppNodeRef } from '../../..';
|
|
2
2
|
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
|
-
import { Gamification as GamificationClass } from '
|
|
3
|
+
import { Gamification as GamificationClass } from '../../../../packages/feature-gamification/src/index.ts';
|
|
4
4
|
export declare const GamificationOverlay: React.FC<{
|
|
5
5
|
gamification: GamificationClass;
|
|
6
6
|
className?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AppNodeRef } from '../..';
|
|
2
|
-
import { Features } from '
|
|
3
|
-
import { StreamLayerSDK } from '
|
|
2
|
+
import { Features } from '../../../packages/sdk-web-features/src/index.ts';
|
|
3
|
+
import { StreamLayerSDK } from '../../../packages/sdk-web-interfaces/src/index.ts';
|
|
4
4
|
import { ResponsiveStore } from '../useSdkResponsive';
|
|
5
5
|
/** render feature by type */
|
|
6
6
|
export declare const ActiveFeature: React.FC<{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Notification } from '
|
|
2
|
-
import { GameSettings } from '
|
|
1
|
+
import { Notification } from '../../../../../packages/sdk-web-notifications/src/index.ts';
|
|
2
|
+
import { GameSettings } from '../../../../../packages/sdk-web-types/src/index.ts';
|
|
3
3
|
export declare const Onboarding: React.FC<{
|
|
4
4
|
close: Notification['close'];
|
|
5
5
|
action: Notification['action'];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AppNodeRef } from '../../..';
|
|
2
2
|
import { ResponsiveStore } from '../../useSdkResponsive';
|
|
3
|
-
import { StreamLayerSDK } from '
|
|
4
|
-
import { Notification } from '
|
|
3
|
+
import { StreamLayerSDK } from '../../../../packages/sdk-web-interfaces/src/index.ts';
|
|
4
|
+
import { Notification } from '../../../../packages/sdk-web-notifications/src/index.ts';
|
|
5
5
|
export declare const Onboarding: React.FC<{
|
|
6
6
|
sdk: StreamLayerSDK;
|
|
7
7
|
notification: Notification;
|