@streamlayer/react 1.23.0 → 1.23.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/pause-ad.d.ts +2 -4
- package/lib/app/polymarket.d.ts +7 -0
- package/lib/cjs/Question.js +1 -1
- package/lib/cjs/advertisement.js +1 -1
- package/lib/cjs/auth.js +1 -1
- package/lib/cjs/bet-pack.js +1 -1
- package/lib/cjs/feature.js +1 -0
- package/lib/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/cjs/index.js +1 -1
- package/lib/cjs/index10.js +1 -4
- package/lib/cjs/index11.js +4 -1
- package/lib/cjs/index12.js +1 -1
- package/lib/cjs/index13.js +1 -1
- package/lib/cjs/index14.js +1 -1
- package/lib/cjs/index15.js +1 -5
- package/lib/cjs/index16.js +5 -0
- package/lib/cjs/index2.js +1 -1
- package/lib/cjs/index3.js +1 -1
- package/lib/cjs/index4.js +1 -1
- package/lib/cjs/index7.js +1 -1
- package/lib/cjs/index8.js +1 -1
- package/lib/cjs/index9.js +1 -1
- package/lib/cjs/insight.js +1 -1
- package/lib/cjs/masters.js +1 -1
- package/lib/cjs/masters2.js +4 -4
- package/lib/cjs/notification.js +1 -1
- package/lib/cjs/pause-ad.js +1 -1
- package/lib/cjs/points.js +1 -1
- package/lib/cjs/polymarket.js +19 -0
- package/lib/cjs/storage.js +1 -1
- package/lib/cjs/useStreamLayerApp2.js +5 -5
- package/lib/classic/app/pause-ad.d.ts +2 -4
- package/lib/classic/app/polymarket.d.ts +7 -0
- package/lib/classic/cjs/Question.js +1 -1
- package/lib/classic/cjs/advertisement.js +1 -1
- package/lib/classic/cjs/analytics.js +1 -1
- package/lib/classic/cjs/auth.js +1 -1
- package/lib/classic/cjs/bet-pack.js +3 -3
- package/lib/classic/cjs/feature.js +1 -0
- package/lib/classic/cjs/hooks-WfHlJH12.js +1 -0
- package/lib/classic/cjs/index.js +1 -1
- package/lib/classic/cjs/index10.js +1 -1
- package/lib/classic/cjs/index11.js +1 -1
- package/lib/classic/cjs/index12.js +1 -4
- package/lib/classic/cjs/index13.js +4 -0
- package/lib/classic/cjs/index2.js +2 -2
- package/lib/classic/cjs/index5.js +1 -1
- package/lib/classic/cjs/index6.js +1 -1
- package/lib/classic/cjs/index7.js +1 -1
- package/lib/classic/cjs/index8.js +1 -1
- package/lib/classic/cjs/index9.js +1 -1
- package/lib/classic/cjs/insight.js +1 -1
- package/lib/classic/cjs/notification.js +1 -1
- package/lib/classic/cjs/notification2.js +1 -1
- package/lib/classic/cjs/pause-ad.js +1 -1
- package/lib/classic/cjs/points.js +1 -1
- package/lib/classic/cjs/polymarket.js +19 -0
- package/lib/classic/cjs/useStreamLayerApp2.js +5 -5
- package/lib/classic/es/Question.js +4 -4
- package/lib/classic/es/advertisement.js +6 -6
- package/lib/classic/es/analytics.js +1 -1
- package/lib/classic/es/auth.js +1 -1
- package/lib/classic/es/bet-pack.js +18 -17
- package/lib/classic/es/feature.js +63 -0
- package/lib/classic/es/hooks-WfHlJH12.js +98 -0
- package/lib/classic/es/index.js +2 -2
- package/lib/classic/es/index10.js +82 -2295
- package/lib/classic/es/index11.js +2351 -179
- package/lib/classic/es/index12.js +170 -822
- package/lib/classic/es/index13.js +835 -0
- package/lib/classic/es/index2.js +127 -126
- package/lib/classic/es/index5.js +4 -5
- package/lib/classic/es/index6.js +5 -11
- package/lib/classic/es/index7.js +5 -62
- package/lib/classic/es/index8.js +7 -315
- package/lib/classic/es/index9.js +313 -81
- package/lib/classic/es/insight.js +2 -2
- package/lib/classic/es/notification.js +2 -2
- package/lib/classic/es/notification2.js +14 -13
- package/lib/classic/es/pause-ad.js +20 -20
- package/lib/classic/es/points.js +15 -14
- package/lib/classic/es/polymarket.js +6670 -0
- package/lib/classic/es/useStreamLayerApp2.js +143 -119
- package/lib/dist/cjs/masters.js +23 -23
- package/lib/dist/es/masters.js +189 -165
- package/lib/dist/index.d.ts +17 -6
- package/lib/dist/style.css +1 -1
- package/lib/es/Question.js +2 -2
- package/lib/es/advertisement.js +5 -5
- package/lib/es/auth.js +1 -1
- package/lib/es/bet-pack.js +1 -1
- package/lib/es/feature.js +63 -0
- package/lib/es/hooks-WfHlJH12.js +98 -0
- package/lib/es/index.js +2 -2
- package/lib/es/index10.js +236 -804
- package/lib/es/index11.js +822 -170
- package/lib/es/index12.js +166 -302
- package/lib/es/index13.js +313 -81
- package/lib/es/index14.js +82 -2350
- package/lib/es/index15.js +2330 -1229
- package/lib/es/index16.js +1254 -0
- package/lib/es/index2.js +118 -117
- package/lib/es/index3.js +3 -61
- package/lib/es/index4.js +3 -3
- package/lib/es/index7.js +5 -7
- package/lib/es/index8.js +5 -9
- package/lib/es/index9.js +7 -263
- package/lib/es/insight.js +2 -2
- package/lib/es/masters.js +1 -1
- package/lib/es/masters2.js +25 -24
- package/lib/es/notification.js +8 -7
- package/lib/es/pause-ad.js +20 -20
- package/lib/es/points.js +6 -5
- package/lib/es/polymarket.js +6670 -0
- package/lib/es/storage.js +2 -2
- package/lib/es/useStreamLayerApp2.js +143 -119
- package/lib/style.css +1 -1
- package/package.json +24 -14
- package/lib/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/cjs/hooks-B0Qttldg.js +0 -1
- package/lib/classic/es/hooks-B0Qttldg.js +0 -98
- package/lib/es/hooks-B0Qttldg.js +0 -98
package/lib/classic/es/index9.js
CHANGED
|
@@ -1,87 +1,319 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
...s,
|
|
11
|
-
onEnterPress: () => {
|
|
12
|
-
var a;
|
|
13
|
-
return (a = i.onClick) == null ? void 0 : a.call(i, { currentTarget: e.ref.current, stopPropagation: () => {
|
|
14
|
-
} });
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return h(() => {
|
|
18
|
-
r && e.focusSelf();
|
|
19
|
-
}, []), /* @__PURE__ */ n(o, { ...l, ...e, "data-is-with-focus": "true" });
|
|
20
|
-
};
|
|
21
|
-
function B(i, o) {
|
|
22
|
-
return ({ webos: t, options: s, ...r }) => t ? /* @__PURE__ */ n(v, { Component: i, options: o, customOptions: s, ...r }) : /* @__PURE__ */ n(i, { ...r });
|
|
23
|
-
}
|
|
24
|
-
const w = [10, 10, 1, 0], I = /* @__PURE__ */ f("div")({
|
|
25
|
-
name: "RemainingTimeCircle",
|
|
26
|
-
class: "r165427",
|
|
1
|
+
import { jsxs as S, jsx as e, Fragment as re } from "react/jsx-runtime";
|
|
2
|
+
import { s as o, c as X } from "./sl-types.js";
|
|
3
|
+
import { useState as I, useEffect as b, useCallback as w, forwardRef as ce, useRef as L } from "react";
|
|
4
|
+
import { B as f } from "./index4.js";
|
|
5
|
+
import { G as ie, d as ue, O as de } from "./index10.js";
|
|
6
|
+
import { C as pe } from "./useStreamLayerApp2.js";
|
|
7
|
+
const me = /* @__PURE__ */ o("div")({
|
|
8
|
+
name: "CloseIconWrap",
|
|
9
|
+
class: "c3v6bv6",
|
|
27
10
|
propsAsIs: !1
|
|
28
|
-
}),
|
|
29
|
-
name: "
|
|
30
|
-
class: "
|
|
11
|
+
}), ye = /* @__PURE__ */ o("div")({
|
|
12
|
+
name: "TimerWrap",
|
|
13
|
+
class: "teuhmro",
|
|
31
14
|
propsAsIs: !1
|
|
32
|
-
}),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
children: ({
|
|
45
|
-
remainingTime: r
|
|
46
|
-
}) => /* @__PURE__ */ n(S, {
|
|
47
|
-
className: i,
|
|
48
|
-
children: o === 0 ? 0 : r
|
|
49
|
-
})
|
|
50
|
-
}), j = ({
|
|
51
|
-
isPlaying: i = !0,
|
|
52
|
-
duration: o = 30,
|
|
53
|
-
onTimerExpired: t
|
|
15
|
+
}), he = () => f, fe = /* @__PURE__ */ o(he())({
|
|
16
|
+
name: "Icon",
|
|
17
|
+
class: "i17rfxv5",
|
|
18
|
+
propsAsIs: !0
|
|
19
|
+
}), Ye = ({
|
|
20
|
+
close: n,
|
|
21
|
+
className: a,
|
|
22
|
+
timerClassName: s,
|
|
23
|
+
skipIcon: l,
|
|
24
|
+
isPlaying: u = !0,
|
|
25
|
+
duration: i = 0,
|
|
26
|
+
autoClose: d
|
|
54
27
|
}) => {
|
|
55
|
-
const [
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}, [
|
|
59
|
-
const
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
28
|
+
const [p, m] = I(i === 0);
|
|
29
|
+
b(() => {
|
|
30
|
+
m(!i);
|
|
31
|
+
}, [i]);
|
|
32
|
+
const P = w(() => {
|
|
33
|
+
d === pe.ENABLED ? n == null || n() : m(!0);
|
|
34
|
+
}, [d, n]);
|
|
35
|
+
return p ? /* @__PURE__ */ S(me, {
|
|
36
|
+
"data-a": "intr",
|
|
37
|
+
onClick: n,
|
|
38
|
+
className: a,
|
|
39
|
+
style: l ? {
|
|
40
|
+
width: "auto"
|
|
41
|
+
} : {},
|
|
42
|
+
children: [l && /* @__PURE__ */ e("span", {
|
|
43
|
+
"data-a": "intr",
|
|
44
|
+
children: "Skip"
|
|
45
|
+
}), /* @__PURE__ */ e(fe, {
|
|
46
|
+
"data-a": "intr",
|
|
47
|
+
name: l ? "iconSkip" : "icon-cross"
|
|
48
|
+
})]
|
|
49
|
+
}) : /* @__PURE__ */ e(ye, {
|
|
50
|
+
children: /* @__PURE__ */ e(ie, {
|
|
51
|
+
className: s,
|
|
52
|
+
isPlaying: u,
|
|
53
|
+
duration: i,
|
|
54
|
+
onTimerExpired: P
|
|
55
|
+
})
|
|
80
56
|
});
|
|
81
|
-
},
|
|
57
|
+
}, ge = /* @__PURE__ */ o("div")({
|
|
58
|
+
name: "Container",
|
|
59
|
+
class: "c1bgb86j",
|
|
60
|
+
propsAsIs: !1
|
|
61
|
+
}), Ie = /* @__PURE__ */ o("video")({
|
|
62
|
+
name: "Player",
|
|
63
|
+
class: "p6703cq",
|
|
64
|
+
propsAsIs: !1
|
|
65
|
+
}), be = /* @__PURE__ */ o("img")({
|
|
66
|
+
name: "Poster",
|
|
67
|
+
class: "p12ow7zo",
|
|
68
|
+
propsAsIs: !1
|
|
69
|
+
}), R = /* @__PURE__ */ o("div")({
|
|
70
|
+
name: "Control",
|
|
71
|
+
class: "cdpal9o",
|
|
72
|
+
propsAsIs: !1
|
|
73
|
+
}), Pe = "t1xke4ml", ve = "h1yzxv57", Ae = /* @__PURE__ */ o("div")({
|
|
74
|
+
name: "VideoControls",
|
|
75
|
+
class: "vxo8xch",
|
|
76
|
+
propsAsIs: !1
|
|
77
|
+
}), $ = /* @__PURE__ */ o("button")({
|
|
78
|
+
name: "ControlBtn",
|
|
79
|
+
class: "coyuzu0",
|
|
80
|
+
propsAsIs: !1
|
|
81
|
+
}), Ce = () => $, we = /* @__PURE__ */ o(Ce())({
|
|
82
|
+
name: "MuteIcon",
|
|
83
|
+
class: "musmi9a",
|
|
84
|
+
propsAsIs: !0
|
|
85
|
+
}), Me = () => $, ke = /* @__PURE__ */ o(Me())({
|
|
86
|
+
name: "PauseIcon",
|
|
87
|
+
class: "p1qe7rum",
|
|
88
|
+
propsAsIs: !0
|
|
89
|
+
}), Ee = () => $, xe = /* @__PURE__ */ o(Ee())({
|
|
90
|
+
name: "PlayIcon",
|
|
91
|
+
class: "psevery",
|
|
92
|
+
propsAsIs: !0
|
|
93
|
+
}), Y = /* @__PURE__ */ o("button")({
|
|
94
|
+
name: "WebOSIconButton",
|
|
95
|
+
class: "w1q3u7py",
|
|
96
|
+
propsAsIs: !1
|
|
97
|
+
}), Be = () => Y, T = /* @__PURE__ */ o(Be())({
|
|
98
|
+
name: "WebOSIconButtonAnimation",
|
|
99
|
+
class: "wdlqvum",
|
|
100
|
+
propsAsIs: !0
|
|
101
|
+
}), Oe = () => T, We = /* @__PURE__ */ o(Oe())({
|
|
102
|
+
name: "WebOSIconButtonPlay",
|
|
103
|
+
class: "w1ylz9ea",
|
|
104
|
+
propsAsIs: !0
|
|
105
|
+
}), Ne = () => T, Ve = /* @__PURE__ */ o(Ne())({
|
|
106
|
+
name: "WebOSIconButtonPause",
|
|
107
|
+
class: "w1iylt55",
|
|
108
|
+
propsAsIs: !0
|
|
109
|
+
}), Le = () => T, Re = /* @__PURE__ */ o(Le())({
|
|
110
|
+
name: "WebOSIconButtonMute",
|
|
111
|
+
class: "w8h4h7",
|
|
112
|
+
propsAsIs: !0
|
|
113
|
+
}), Se = () => T, Te = /* @__PURE__ */ o(Se())({
|
|
114
|
+
name: "WebOSIconButtonUnmute",
|
|
115
|
+
class: "w12l12kt",
|
|
116
|
+
propsAsIs: !0
|
|
117
|
+
}), Ue = (n) => {
|
|
118
|
+
for (const a of n)
|
|
119
|
+
a.isIntersecting ? a.target instanceof HTMLVideoElement && a.target.autoplay && a.target.play() : a.target instanceof HTMLVideoElement && !a.target.paused && a.target.pause();
|
|
120
|
+
}, Z = new IntersectionObserver(Ue, { threshold: 0.5 }), D = /* @__PURE__ */ new Set(), je = (n) => {
|
|
121
|
+
Z.observe(n), D.add(n);
|
|
122
|
+
}, qe = (n) => {
|
|
123
|
+
Z.unobserve(n), D.delete(n);
|
|
124
|
+
}, ze = () => {
|
|
125
|
+
for (const n of D)
|
|
126
|
+
n instanceof HTMLVideoElement && !n.paused && n.pause();
|
|
127
|
+
};
|
|
128
|
+
function He(...n) {
|
|
129
|
+
return w(
|
|
130
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
131
|
+
(a) => {
|
|
132
|
+
for (const s of n)
|
|
133
|
+
s !== null && (typeof s == "function" ? s(a) : s && (s.current = a));
|
|
134
|
+
},
|
|
135
|
+
// Re-run the callback if the array of refs changes
|
|
136
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
137
|
+
[...n]
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
const $e = de(ge), De = ({ loading: n, autoPlay: a, played: s, playing: l, isMuted: u, unmute: i, mute: d, togglePlaying: p }) => !n && !a && !s ? /* @__PURE__ */ e(R, { children: l ? /* @__PURE__ */ e(f, { name: "icon-pause" }) : /* @__PURE__ */ e(f, { name: "icon-play" }) }) : s ? /* @__PURE__ */ S(Ae, { children: [
|
|
141
|
+
l ? /* @__PURE__ */ e(ke, { onClick: p }) : /* @__PURE__ */ e(xe, { onClick: p }),
|
|
142
|
+
/* @__PURE__ */ e(we, { className: X(!u && "muted"), onClick: u ? i : d })
|
|
143
|
+
] }) : null, Fe = ({
|
|
144
|
+
loading: n,
|
|
145
|
+
autoPlay: a,
|
|
146
|
+
playMuted: s,
|
|
147
|
+
playing: l,
|
|
148
|
+
played: u,
|
|
149
|
+
unmute: i,
|
|
150
|
+
mute: d,
|
|
151
|
+
isMuted: p,
|
|
152
|
+
hasNotPausedVideo: m,
|
|
153
|
+
hasInteractedWithAudio: P
|
|
154
|
+
}) => /* @__PURE__ */ S(re, { children: [
|
|
155
|
+
!n && !(a && s) && /* @__PURE__ */ e(R, { "data-control-btn": "true", children: l ? m ? null : /* @__PURE__ */ e(We, { children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) : u ? /* @__PURE__ */ e(Ve, { children: /* @__PURE__ */ e(f, { name: "icon-pause" }) }) : /* @__PURE__ */ e(Y, { "data-control-icon": "true", children: /* @__PURE__ */ e(f, { name: "icon-play" }) }) }),
|
|
156
|
+
!n && a && s && P && /* @__PURE__ */ e(R, { children: p ? /* @__PURE__ */ e(Re, { onClick: i, children: /* @__PURE__ */ e(f, { name: "iconMute" }) }) : /* @__PURE__ */ e(Te, { onClick: d, children: /* @__PURE__ */ e(f, { name: "iconUnMute" }) }) })
|
|
157
|
+
] }), Ze = ce(
|
|
158
|
+
({
|
|
159
|
+
poster: n,
|
|
160
|
+
source: a,
|
|
161
|
+
aspectRatio: s,
|
|
162
|
+
controlVideo: l,
|
|
163
|
+
onReplay: u,
|
|
164
|
+
onPlay: i,
|
|
165
|
+
onPause: d,
|
|
166
|
+
onEnd: p,
|
|
167
|
+
onRender: m,
|
|
168
|
+
onMute: P,
|
|
169
|
+
onQuartile: v,
|
|
170
|
+
autoPlay: M,
|
|
171
|
+
playMuted: k,
|
|
172
|
+
className: ee,
|
|
173
|
+
muted: E,
|
|
174
|
+
webos: B,
|
|
175
|
+
hasNotPausedVideo: ne
|
|
176
|
+
}, te) => {
|
|
177
|
+
const c = L(null), ae = He(c, te), U = L(!1), j = L(!1), y = L(/* @__PURE__ */ new Set()), [F, G] = I(!1), [O, W] = I(!1), [q, Q] = I(!1), [_, N] = I(!0), [z, V] = I(k), [H, oe] = I(!1);
|
|
178
|
+
b(() => {
|
|
179
|
+
a && (V(k), G(!1));
|
|
180
|
+
}, [a]);
|
|
181
|
+
const A = w(() => {
|
|
182
|
+
l == null || l({ muted: !1 });
|
|
183
|
+
}, [l]), J = w(() => {
|
|
184
|
+
l == null || l({ muted: !0 });
|
|
185
|
+
}, [l]), C = w((t) => {
|
|
186
|
+
t == null || t.stopPropagation(), c.current && (c.current.muted = !0), V(!0);
|
|
187
|
+
}, []), x = w(
|
|
188
|
+
(t) => {
|
|
189
|
+
t == null || t.stopPropagation(), c.current && (c.current.muted = !1), V(!1), H || oe(!0);
|
|
190
|
+
},
|
|
191
|
+
[H]
|
|
192
|
+
);
|
|
193
|
+
b(() => {
|
|
194
|
+
E !== void 0 && (E ? C() : x());
|
|
195
|
+
}, [C, E, x]);
|
|
196
|
+
const K = (t) => {
|
|
197
|
+
var r;
|
|
198
|
+
(r = t.stopPropagation) == null || r.call(t);
|
|
199
|
+
const g = c == null ? void 0 : c.current;
|
|
200
|
+
if (g)
|
|
201
|
+
if (O)
|
|
202
|
+
g.pause();
|
|
203
|
+
else {
|
|
204
|
+
const h = c == null ? void 0 : c.current;
|
|
205
|
+
if (!h)
|
|
206
|
+
return;
|
|
207
|
+
ze(), h.play().catch((le) => console.log(le)), N(!1);
|
|
208
|
+
}
|
|
209
|
+
}, se = () => {
|
|
210
|
+
var t;
|
|
211
|
+
(t = c == null ? void 0 : c.current) == null || t.load(), N(!0);
|
|
212
|
+
};
|
|
213
|
+
return b(() => () => {
|
|
214
|
+
A();
|
|
215
|
+
}, [A]), b(() => {
|
|
216
|
+
const t = c.current;
|
|
217
|
+
return t ? (j.current = t.muted, V(t.muted), je(t), () => {
|
|
218
|
+
qe(t);
|
|
219
|
+
}) : () => {
|
|
220
|
+
};
|
|
221
|
+
}, []), b(() => {
|
|
222
|
+
m == null || m();
|
|
223
|
+
}, [m]), b(() => {
|
|
224
|
+
y.current.clear(), U.current = !1;
|
|
225
|
+
}, [a]), /* @__PURE__ */ S(
|
|
226
|
+
$e,
|
|
227
|
+
{
|
|
228
|
+
webos: B,
|
|
229
|
+
onClick: M && k ? z ? x : C : K,
|
|
230
|
+
"data-a": "intr",
|
|
231
|
+
autoFocus: !0,
|
|
232
|
+
options: { focusKey: "video-play-btn" },
|
|
233
|
+
className: X(O && !B && Pe, M && ve, ee),
|
|
234
|
+
style: s ? { aspectRatio: s } : {},
|
|
235
|
+
children: [
|
|
236
|
+
/* @__PURE__ */ e(
|
|
237
|
+
Ie,
|
|
238
|
+
{
|
|
239
|
+
ref: ae,
|
|
240
|
+
src: a,
|
|
241
|
+
autoPlay: M,
|
|
242
|
+
onPlay: () => {
|
|
243
|
+
G(!0), U.current && (u == null || u(), y.current.clear()), W(!0), N(!1), i == null || i(), k ? C() : J();
|
|
244
|
+
},
|
|
245
|
+
onTimeUpdate: (t) => {
|
|
246
|
+
const r = t.target.duration, g = t.target.currentTime;
|
|
247
|
+
if (r && g) {
|
|
248
|
+
const h = Math.floor(g / r * 100);
|
|
249
|
+
h >= 25 && h < 50 && !y.current.has(25) ? (v == null || v(25), y.current.add(25)) : h >= 50 && h < 75 && !y.current.has(50) ? (v == null || v(50), y.current.add(50)) : h >= 75 && !y.current.has(75) && (v == null || v(75), y.current.add(75));
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
onVolumeChange: (t) => {
|
|
253
|
+
const r = t.target.muted;
|
|
254
|
+
j.current !== r && (P == null || P(r), j.current = r, (r !== E || E === void 0) && (r ? A() : J()));
|
|
255
|
+
},
|
|
256
|
+
onError: async (t) => {
|
|
257
|
+
try {
|
|
258
|
+
if (t.target instanceof HTMLVideoElement) {
|
|
259
|
+
Q(!0);
|
|
260
|
+
const r = await (await fetch(t.target.src)).blob(), g = URL.createObjectURL(r);
|
|
261
|
+
t.target.src = g;
|
|
262
|
+
}
|
|
263
|
+
} catch (r) {
|
|
264
|
+
console.error("video fallback fetch failed", r), W(!0), N(!0);
|
|
265
|
+
} finally {
|
|
266
|
+
Q(!1), A();
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
onPause: () => {
|
|
270
|
+
W(!1), d == null || d(), A();
|
|
271
|
+
},
|
|
272
|
+
onEnded: () => {
|
|
273
|
+
W(!1), U.current = !0, se(), p == null || p(), A();
|
|
274
|
+
},
|
|
275
|
+
style: { visibility: _ ? "hidden" : "visible" },
|
|
276
|
+
controls: !1,
|
|
277
|
+
playsInline: !0
|
|
278
|
+
}
|
|
279
|
+
),
|
|
280
|
+
/* @__PURE__ */ e(be, { src: n, style: { visibility: _ ? "visible" : "hidden" } }),
|
|
281
|
+
!B && /* @__PURE__ */ e(
|
|
282
|
+
De,
|
|
283
|
+
{
|
|
284
|
+
loading: q,
|
|
285
|
+
autoPlay: M,
|
|
286
|
+
played: F,
|
|
287
|
+
playing: O,
|
|
288
|
+
isMuted: z,
|
|
289
|
+
unmute: x,
|
|
290
|
+
mute: C,
|
|
291
|
+
togglePlaying: K
|
|
292
|
+
}
|
|
293
|
+
),
|
|
294
|
+
B && /* @__PURE__ */ e(
|
|
295
|
+
Fe,
|
|
296
|
+
{
|
|
297
|
+
loading: q,
|
|
298
|
+
autoPlay: M,
|
|
299
|
+
playMuted: k,
|
|
300
|
+
playing: O,
|
|
301
|
+
played: F,
|
|
302
|
+
unmute: x,
|
|
303
|
+
mute: C,
|
|
304
|
+
isMuted: z,
|
|
305
|
+
hasNotPausedVideo: ne,
|
|
306
|
+
hasInteractedWithAudio: H
|
|
307
|
+
}
|
|
308
|
+
),
|
|
309
|
+
q && /* @__PURE__ */ e(R, { children: /* @__PURE__ */ e(ue, {}) })
|
|
310
|
+
]
|
|
311
|
+
}
|
|
312
|
+
);
|
|
313
|
+
}
|
|
314
|
+
);
|
|
82
315
|
export {
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
G as d
|
|
316
|
+
Ze as E,
|
|
317
|
+
ze as w,
|
|
318
|
+
Ye as y
|
|
87
319
|
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { h as p } from "./
|
|
2
|
+
import { h as p } from "./index7.js";
|
|
3
3
|
import { u as m, s as h } from "./sl-types.js";
|
|
4
4
|
import { useRef as f, useEffect as I } from "react";
|
|
5
5
|
import { h as g } from "./Question.js";
|
|
6
6
|
import { S } from "./useStreamLayerApp2.js";
|
|
7
|
-
import { B as k, z as v, j as Q } from "./hooks-
|
|
7
|
+
import { B as k, z as v, j as Q } from "./hooks-WfHlJH12.js";
|
|
8
8
|
const y = () => g, b = /* @__PURE__ */ h(y())({
|
|
9
9
|
name: "QuestionWrap",
|
|
10
10
|
class: "q10hhsxv",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
|
-
import "./
|
|
2
|
+
import "./index7.js";
|
|
3
3
|
import { a as e, K as p } from "./notification2.js";
|
|
4
4
|
import "react";
|
|
5
|
-
import "./hooks-
|
|
5
|
+
import "./hooks-WfHlJH12.js";
|
|
6
6
|
export {
|
|
7
7
|
e as StreamLayerSDKNotification,
|
|
8
8
|
p as StreamLayerSDKNotificationUI
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
2
|
-
import { h as ws } from "./
|
|
2
|
+
import { h as ws } from "./index7.js";
|
|
3
3
|
import { useState as w, useRef as es, useEffect as y, useCallback as ys, useMemo as Ts } from "react";
|
|
4
4
|
import { s as e, c as bs, u as Cs, a as Q } from "./sl-types.js";
|
|
5
|
-
import { e as Ns } from "./
|
|
6
|
-
import
|
|
7
|
-
import { e as
|
|
5
|
+
import { e as Ns } from "./index5.js";
|
|
6
|
+
import "./feature.js";
|
|
7
|
+
import { e as M, D as fs, a as ks, o as qs } from "./index12.js";
|
|
8
|
+
import { e as Ss, i as V } from "./index8.js";
|
|
8
9
|
import { B as I } from "./index4.js";
|
|
9
10
|
import { f as N, Q as h, c as R, a as v, N as x, S as Es, b as F } from "./useStreamLayerApp2.js";
|
|
10
|
-
import { O } from "./
|
|
11
|
-
import { E as Ls, y as xs } from "./
|
|
11
|
+
import { O } from "./index10.js";
|
|
12
|
+
import { E as Ls, y as xs } from "./index9.js";
|
|
12
13
|
import { d as Ds } from "./index3.js";
|
|
13
|
-
import { B as Ms, z as Rs, F as Os } from "./hooks-
|
|
14
|
+
import { B as Ms, z as Rs, F as Os } from "./hooks-WfHlJH12.js";
|
|
14
15
|
const Bs = /* @__PURE__ */ e("div")({
|
|
15
16
|
name: "QuestionItem",
|
|
16
17
|
class: "q1w97g3p",
|
|
@@ -64,7 +65,7 @@ const Bs = /* @__PURE__ */ e("div")({
|
|
|
64
65
|
[N.WON]: /* @__PURE__ */ s(Fs, { name: "icon-check" }),
|
|
65
66
|
[N.UNSET]: /* @__PURE__ */ s(f, { name: "icon-arrow" }),
|
|
66
67
|
[N.DNP]: /* @__PURE__ */ s(f, { name: "icon-arrow" })
|
|
67
|
-
},
|
|
68
|
+
}, li = () => /* @__PURE__ */ c(Gs, { children: [
|
|
68
69
|
/* @__PURE__ */ s(V, { loading: !0, style: { width: "35%" } }),
|
|
69
70
|
/* @__PURE__ */ s(V, { loading: !0, style: { width: "70%" } }),
|
|
70
71
|
/* @__PURE__ */ s(Xs, {})
|
|
@@ -83,7 +84,7 @@ const Bs = /* @__PURE__ */ e("div")({
|
|
|
83
84
|
n.label,
|
|
84
85
|
o === h.TRIVIA && t === R.RESOLVED && " • Expired"
|
|
85
86
|
] })
|
|
86
|
-
] }),
|
|
87
|
+
] }), di = ({
|
|
87
88
|
questionId: n,
|
|
88
89
|
questionType: o,
|
|
89
90
|
questionStatus: t,
|
|
@@ -1127,15 +1128,15 @@ const b = /* @__PURE__ */ e("div")({
|
|
|
1127
1128
|
webos: o
|
|
1128
1129
|
}
|
|
1129
1130
|
) : d && /* @__PURE__ */ s(be, { ...d.data, action: d.action });
|
|
1130
|
-
},
|
|
1131
|
+
}, pi = ({ theme: n }) => {
|
|
1131
1132
|
const o = Ms(), t = Rs(), i = Os();
|
|
1132
1133
|
return o && (i.appNotification || i.onboardingNotification) ? i.app && !i.onboardingNotification ? null : /* @__PURE__ */ s("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ s(ws, { customTheme: n ?? t.theme, themeMode: t.themeMode, children: /* @__PURE__ */ s(Ko, { sdk: o }) }) }) : null;
|
|
1133
1134
|
};
|
|
1134
1135
|
export {
|
|
1135
|
-
|
|
1136
|
+
li as D,
|
|
1136
1137
|
Ko as K,
|
|
1137
|
-
|
|
1138
|
+
di as R,
|
|
1138
1139
|
Ks as S,
|
|
1139
|
-
|
|
1140
|
+
pi as a,
|
|
1140
1141
|
Bs as r
|
|
1141
1142
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as s, jsxs as w } from "react/jsx-runtime";
|
|
2
|
-
import { h as N } from "./
|
|
3
|
-
import { s as d, u as
|
|
4
|
-
import { d as
|
|
5
|
-
import { useState as B, useRef as
|
|
6
|
-
import { e as
|
|
7
|
-
import { B as K, z as
|
|
8
|
-
const
|
|
2
|
+
import { h as N } from "./index7.js";
|
|
3
|
+
import { s as d, u as j, c as q } from "./sl-types.js";
|
|
4
|
+
import { d as V } from "./index11.js";
|
|
5
|
+
import { useState as B, useRef as E, useCallback as _, useEffect as c, Component as z } from "react";
|
|
6
|
+
import { e as C } from "./index5.js";
|
|
7
|
+
import { B as K, z as G } from "./hooks-WfHlJH12.js";
|
|
8
|
+
const O = /* @__PURE__ */ d("div")({
|
|
9
9
|
name: "PauseAdOverlay",
|
|
10
10
|
class: "pw9gih8",
|
|
11
11
|
propsAsIs: !1
|
|
@@ -54,7 +54,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
54
54
|
isDesktop: n,
|
|
55
55
|
content: e
|
|
56
56
|
}) => (c(() => {
|
|
57
|
-
e.imageSrc && e.id &&
|
|
57
|
+
e.imageSrc && e.id && C.emit("exposedPauseAd", {
|
|
58
58
|
action: "rendered",
|
|
59
59
|
payload: {
|
|
60
60
|
id: e.id,
|
|
@@ -65,7 +65,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
65
65
|
"a",
|
|
66
66
|
{
|
|
67
67
|
onClick: () => {
|
|
68
|
-
|
|
68
|
+
C.emit("exposedPauseAd", {
|
|
69
69
|
action: "navigated",
|
|
70
70
|
payload: {
|
|
71
71
|
id: e.id,
|
|
@@ -79,7 +79,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
79
79
|
children: /* @__PURE__ */ s(F, { src: e.imageSrc })
|
|
80
80
|
}
|
|
81
81
|
) : null), te = ({ isClosing: i, content: n, externalPauseAdStore: e, title: I, caption: v, onPlay: u, onClose: a, vastUrl: t, options: f, isDesktop: l }) => {
|
|
82
|
-
const
|
|
82
|
+
const b = (f == null ? void 0 : f.showPauseButton) ?? !0, { ref: p, focusSelf: g } = V.useFocusable({
|
|
83
83
|
focusKey: "sl-pause-ad-play",
|
|
84
84
|
onEnterRelease: u,
|
|
85
85
|
isFocusBoundary: !0,
|
|
@@ -101,12 +101,12 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
103
|
return window.addEventListener("keydown", T, { capture: !0 }), () => window.removeEventListener("keydown", T, { capture: !0 });
|
|
104
|
-
}, [a]), /* @__PURE__ */ s(
|
|
104
|
+
}, [a]), /* @__PURE__ */ s(O, { className: q("SL_PauseAd", i && "pause-ad-closing"), children: /* @__PURE__ */ w(W, { children: [
|
|
105
105
|
/* @__PURE__ */ w(X, { children: [
|
|
106
106
|
/* @__PURE__ */ s(H, { children: I }),
|
|
107
107
|
/* @__PURE__ */ s(J, { children: v })
|
|
108
108
|
] }),
|
|
109
|
-
|
|
109
|
+
b && /* @__PURE__ */ s(Q, { children: /* @__PURE__ */ s(
|
|
110
110
|
Y,
|
|
111
111
|
{
|
|
112
112
|
ref: p,
|
|
@@ -121,17 +121,17 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
121
121
|
] }) })
|
|
122
122
|
] }) });
|
|
123
123
|
}, se = ({ showPauseAd: i, vastUrls: n, title: e, caption: I, sdk: v, onClose: u, onRender: a, options: t, isDesktop: f }) => {
|
|
124
|
-
const l = (t == null ? void 0 : t.pauseAdDelay) ?? 0,
|
|
124
|
+
const l = (t == null ? void 0 : t.pauseAdDelay) ?? 0, b = (t == null ? void 0 : t.pauseAdRefetchInterval) ?? 1e3 * 60 * 50, [p, g] = B(!1), [T, A] = B(!1), o = E(), h = n == null ? void 0 : n[0].url, P = E(h), y = E(""), S = E("");
|
|
125
125
|
P.current = h;
|
|
126
126
|
const [m, R] = v.advertisement.getExternalPauseAd(h, {
|
|
127
|
-
refetchInterval:
|
|
127
|
+
refetchInterval: b,
|
|
128
128
|
$enabled: l === 0 || !!i,
|
|
129
|
-
prefetch: l === 0 &&
|
|
130
|
-
}), k =
|
|
129
|
+
prefetch: l === 0 && b > 0
|
|
130
|
+
}), k = j(m), x = _(() => {
|
|
131
131
|
if (u) {
|
|
132
132
|
S.current = P.current;
|
|
133
133
|
const r = m.get().data;
|
|
134
|
-
|
|
134
|
+
C.emit("exposedPauseAd", {
|
|
135
135
|
action: "closed",
|
|
136
136
|
payload: (r == null ? void 0 : r.url) === S.current ? {
|
|
137
137
|
id: r == null ? void 0 : r.id,
|
|
@@ -148,7 +148,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
148
148
|
if (i && h) {
|
|
149
149
|
y.current = P.current, S.current = "";
|
|
150
150
|
const r = m.get().data;
|
|
151
|
-
|
|
151
|
+
C.emit("exposedPauseAd", {
|
|
152
152
|
action: "enabled",
|
|
153
153
|
payload: (r == null ? void 0 : r.url) === y.current ? {
|
|
154
154
|
id: r == null ? void 0 : r.id,
|
|
@@ -167,7 +167,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
167
167
|
} else {
|
|
168
168
|
if (S.current !== P.current) {
|
|
169
169
|
const r = m.get().data;
|
|
170
|
-
S.current = "", y.current !== "" && (
|
|
170
|
+
S.current = "", y.current !== "" && (C.emit("exposedPauseAd", {
|
|
171
171
|
action: "disabled",
|
|
172
172
|
payload: y.current === (r == null ? void 0 : r.url) ? {
|
|
173
173
|
id: r == null ? void 0 : r.id,
|
|
@@ -210,7 +210,7 @@ const G = /* @__PURE__ */ d("div")({
|
|
|
210
210
|
children: u,
|
|
211
211
|
options: a
|
|
212
212
|
}) => {
|
|
213
|
-
const t = K(), f =
|
|
213
|
+
const t = K(), f = G(), l = E();
|
|
214
214
|
return c(() => t ? (e && (l.current = e, t.addVideoPlayerController(l.current)), () => {
|
|
215
215
|
l.current && t.removeVideoPlayerController(l.current);
|
|
216
216
|
}) : () => {
|
package/lib/classic/es/points.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { jsxs as p, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { m as u, h as d } from "./
|
|
2
|
+
import { m as u, h as d } from "./index7.js";
|
|
3
3
|
import { useState as f, useEffect as y } from "react";
|
|
4
4
|
import { s as o, u as h } from "./sl-types.js";
|
|
5
|
-
import {
|
|
5
|
+
import { e as a } from "./index5.js";
|
|
6
6
|
import { d as S } from "./index3.js";
|
|
7
7
|
import { B as v } from "./index4.js";
|
|
8
|
+
import { F as c } from "./feature.js";
|
|
8
9
|
import { S as g } from "./useStreamLayerApp2.js";
|
|
9
|
-
import { B as k, z as A } from "./hooks-
|
|
10
|
+
import { B as k, z as A } from "./hooks-WfHlJH12.js";
|
|
10
11
|
const I = /* @__PURE__ */ o("div")({
|
|
11
12
|
name: "PointsContainer",
|
|
12
13
|
class: "psiob9b",
|
|
@@ -38,24 +39,24 @@ const I = /* @__PURE__ */ o("div")({
|
|
|
38
39
|
/* @__PURE__ */ e(x, { children: /* @__PURE__ */ e(S, { value: s }) })
|
|
39
40
|
] })
|
|
40
41
|
] }), j = ({ gamification: s }) => {
|
|
41
|
-
const t = s.userSummary.$store, [
|
|
42
|
+
const t = s.userSummary.$store, [r, l] = f(0);
|
|
42
43
|
return y(() => {
|
|
43
|
-
const
|
|
44
|
+
const n = t.subscribe((i) => {
|
|
44
45
|
var m;
|
|
45
46
|
(m = i == null ? void 0 : i.summary) != null && m.points && l(i.summary.points);
|
|
46
47
|
});
|
|
47
48
|
return () => {
|
|
48
|
-
|
|
49
|
+
n();
|
|
49
50
|
};
|
|
50
|
-
}, [t]), /* @__PURE__ */ e(C, { points:
|
|
51
|
-
const
|
|
52
|
-
|
|
51
|
+
}, [t]), /* @__PURE__ */ e(C, { points: r, onClick: () => {
|
|
52
|
+
const n = s.status.get();
|
|
53
|
+
n === c.Suspended ? (s.openFeature(), a.emit("app", {
|
|
53
54
|
action: "open",
|
|
54
55
|
payload: {}
|
|
55
56
|
}), a.emit("interactions", {
|
|
56
57
|
action: "tap",
|
|
57
58
|
payload: {}
|
|
58
|
-
})) :
|
|
59
|
+
})) : n === c.Ready && (s.closeFeature(!1), a.emit("app", {
|
|
59
60
|
action: "close",
|
|
60
61
|
payload: {}
|
|
61
62
|
}), a.emit("interactions", {
|
|
@@ -68,10 +69,10 @@ const I = /* @__PURE__ */ o("div")({
|
|
|
68
69
|
return null;
|
|
69
70
|
const t = s.getFeature(g.GAMES);
|
|
70
71
|
return t ? /* @__PURE__ */ e(j, { gamification: t }) : null;
|
|
71
|
-
},
|
|
72
|
-
const t = k(),
|
|
73
|
-
return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(d, { customTheme: s ??
|
|
72
|
+
}, V = ({ theme: s }) => {
|
|
73
|
+
const t = k(), r = A();
|
|
74
|
+
return t ? /* @__PURE__ */ e("div", { className: "StreamLayerSDK", children: /* @__PURE__ */ e(d, { customTheme: s ?? r.theme, themeMode: r.themeMode, children: /* @__PURE__ */ e(L, { sdk: t }) }) }) : null;
|
|
74
75
|
};
|
|
75
76
|
export {
|
|
76
|
-
|
|
77
|
+
V as StreamLayerSDKPoints
|
|
77
78
|
};
|