highsoft-ui 1.0.164 → 1.0.166
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/CLAUDE.md +38 -2
- package/dist/{BrowserFrame-BSM0R7PQ.js → BrowserFrame-BWKH-jYq.js} +2 -2
- package/dist/{Button-BCbWIPg1.js → Button-Ckhn8DSF.js} +1 -1
- package/dist/{ButtonGroup-DGEDf4ic.js → ButtonGroup-DJ9-E38n.js} +1 -1
- package/dist/{Checkbox-CO0SRaAZ.js → Checkbox-D1mlWTmw.js} +1 -1
- package/dist/{CodeBlock-Ugik4xMM.js → CodeBlock-C2W0T4RT.js} +5 -5
- package/dist/{CookiePolicyModal-TdrVbP_E.js → CookiePolicyModal-CPNTKMHc.js} +2 -2
- package/dist/{CopyCode-_sKjpGqB.js → CopyCode-BOehQAZN.js} +3 -3
- package/dist/{Dropdown-LiG-JAoo.js → Dropdown-Cjl8RQ5Y.js} +1 -1
- package/dist/{Footer-DzIGLnEz.js → Footer-DLMNyBXC.js} +7 -7
- package/dist/{FooterBottom-CRe2Mvjd.js → FooterBottom-ZK9F7wLx.js} +1 -1
- package/dist/{FooterHelp-CTSvficW.js → FooterHelp-Csfq-quf.js} +1 -1
- package/dist/{FooterLinks-BoDdQUWb.js → FooterLinks-CGoBeReu.js} +2 -2
- package/dist/{Header-CTO6Y6oH.js → Header-Pe6siDNx.js} +20 -20
- package/dist/{InputGrouped-y0JyshpR.js → InputGrouped-BLtnqxWc.js} +2 -2
- package/dist/{Label-k6e4Rqb-.js → Label-KDdBAgyD.js} +1 -1
- package/dist/{LogoCarousel-pRYdmphl.js → LogoCarousel-CJShpLJo.js} +2 -2
- package/dist/{NewsletterSignup-BrmQ7pXZ.js → NewsletterSignup-g8wPQ7NZ.js} +4 -4
- package/dist/{Notification-BFLAktZo.js → Notification-DQostuW6.js} +3 -3
- package/dist/{PrefPanel-CHkc6r6b.js → PrefPanel-Cf-xZ261.js} +7 -7
- package/dist/PrevNextNav-Cd6_IdPd.js +62 -0
- package/dist/{RoadmapDetails-BWt0J4Pn.js → RoadmapDetails-DMrLLty1.js} +5 -5
- package/dist/{Search-D29JM1a_.js → Search-Cy79c2sN.js} +5 -5
- package/dist/{SearchDropdown-BSUAlaMY.js → SearchDropdown-BA7CPuRf.js} +1 -1
- package/dist/{VideoCover-C18NhQcY.js → VideoCover-DlhRqr4Q.js} +1 -1
- package/dist/{VideoPlayer-UM4M4C5b.js → VideoPlayer-De_ejf8u.js} +5 -5
- package/dist/{VideoPlayerModal-IRwjMLoy.js → VideoPlayerModal-DNUIn0jM.js} +2 -2
- package/dist/{YoutubeModal-BOnH866s.js → YoutubeModal-D_pHHwxa.js} +2 -2
- package/dist/components/BrowserFrame/index.js +1 -1
- package/dist/components/Button/index.js +1 -1
- package/dist/components/ButtonGroup/index.js +1 -1
- package/dist/components/Checkbox/index.js +1 -1
- package/dist/components/CodeBlock/index.js +1 -1
- package/dist/components/CopyCode/index.js +1 -1
- package/dist/components/Dropdown/index.js +1 -1
- package/dist/components/Footer/CookiePolicyModal.js +1 -1
- package/dist/components/Footer/FooterBottom.js +1 -1
- package/dist/components/Footer/FooterHelp.js +1 -1
- package/dist/components/Footer/FooterLinks.js +1 -1
- package/dist/components/Footer/YoutubeModal.js +1 -1
- package/dist/components/Footer/index.js +1 -1
- package/dist/components/Header/index.js +1 -1
- package/dist/components/InputGrouped/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/LogoCarousel/index.js +1 -1
- package/dist/components/Modal/ModalContactFooter.js +2 -2
- package/dist/components/Modal/index.js +2 -2
- package/dist/components/NewsletterSignup/index.js +1 -1
- package/dist/components/Notification/index.js +1 -1
- package/dist/components/PrefPanel/index.js +1 -1
- package/dist/components/PrevNextNav/index.js +2 -0
- package/dist/components/RoadmapDetails/index.js +1 -1
- package/dist/components/Search/index.js +1 -1
- package/dist/components/SearchDropdown/index.js +1 -1
- package/dist/components/Sidebar/NavDisclosure.js +1 -1
- package/dist/components/Sidebar/NavGroup.js +1 -1
- package/dist/components/Sidebar/Sidebar.js +4 -4
- package/dist/components/Sidebar/SidebarLayout.js +1 -1
- package/dist/components/Sidebar/SidebarSwitcher.js +1 -1
- package/dist/components/VideoCover/index.js +1 -1
- package/dist/components/VideoPlayer/VideoPlayerModal.js +1 -1
- package/dist/components/VideoPlayer/index.js +1 -1
- package/dist/components/VideoPlayer/useMediaEngine.js +92 -88
- package/dist/{create-element-DxkdwAGs.js → create-element-BNkLOXrc.js} +1 -1
- package/dist/{esm-CUgR2iUX.js → esm-u0DqOC56.js} +65 -51
- package/dist/highsoft-ui.css +1 -1
- package/dist/lib/components/PrevNextNav/index.d.ts +44 -0
- package/dist/lib/components/VideoPlayer/useMediaEngine.d.ts +6 -0
- package/dist/lib/main.d.ts +2 -0
- package/dist/main.js +23 -22
- package/dist/{prism-light-Czk1yGD_.js → prism-light-CAkriFcS.js} +1 -1
- package/package.json +1 -1
|
@@ -2,40 +2,43 @@ import { useCallback as e, useEffect as t, useRef as n, useState as r } from "re
|
|
|
2
2
|
//#region lib/components/VideoPlayer/useMediaEngine.ts
|
|
3
3
|
var i = (e) => Math.max(0, Math.min(1, e));
|
|
4
4
|
function a(e, t) {
|
|
5
|
-
return !e || t ? "file" : /(?:youtube
|
|
5
|
+
return !e || t ? "file" : /(?:youtube(?:-nocookie)?\.com|youtu\.be)/i.test(e) ? "youtube" : /vimeo\.com/i.test(e) ? "vimeo" : "file";
|
|
6
6
|
}
|
|
7
7
|
function o(e) {
|
|
8
|
+
return e && /youtube-nocookie\.com/i.test(e) ? "https://www.youtube-nocookie.com" : void 0;
|
|
9
|
+
}
|
|
10
|
+
function s(e) {
|
|
8
11
|
let t = e.match(/(?:youtu\.be\/|[?&]v=|\/embed\/|\/shorts\/)([\w-]{11})/);
|
|
9
12
|
return t ? t[1] : e;
|
|
10
13
|
}
|
|
11
|
-
function
|
|
14
|
+
function c(e) {
|
|
12
15
|
let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
|
|
13
16
|
return t ? t[1] : e;
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
if (e === "youtube" && t) return `https://i.ytimg.com/vi/${
|
|
18
|
+
function l(e, t) {
|
|
19
|
+
if (e === "youtube" && t) return `https://i.ytimg.com/vi/${s(t)}/hqdefault.jpg`;
|
|
17
20
|
}
|
|
18
|
-
var
|
|
19
|
-
function
|
|
21
|
+
var u = null;
|
|
22
|
+
function d() {
|
|
20
23
|
let e = window;
|
|
21
|
-
return e.YT?.Player ? Promise.resolve(e.YT) :
|
|
24
|
+
return e.YT?.Player ? Promise.resolve(e.YT) : u || (u = new Promise((t) => {
|
|
22
25
|
let n = e.onYouTubeIframeAPIReady;
|
|
23
26
|
e.onYouTubeIframeAPIReady = () => {
|
|
24
27
|
n?.(), t(e.YT);
|
|
25
28
|
};
|
|
26
29
|
let r = document.createElement("script");
|
|
27
30
|
r.src = "https://www.youtube.com/iframe_api", document.head.appendChild(r);
|
|
28
|
-
}),
|
|
31
|
+
}), u);
|
|
29
32
|
}
|
|
30
|
-
var
|
|
31
|
-
function
|
|
33
|
+
var f = null;
|
|
34
|
+
function p() {
|
|
32
35
|
let e = window;
|
|
33
|
-
return e.Vimeo?.Player ? Promise.resolve(e.Vimeo) :
|
|
36
|
+
return e.Vimeo?.Player ? Promise.resolve(e.Vimeo) : f || (f = new Promise((e, t) => {
|
|
34
37
|
let n = document.createElement("script");
|
|
35
38
|
n.src = "https://player.vimeo.com/api/player.js", n.onload = () => e(window.Vimeo), n.onerror = t, document.head.appendChild(n);
|
|
36
|
-
}),
|
|
39
|
+
}), f);
|
|
37
40
|
}
|
|
38
|
-
var
|
|
41
|
+
var m = (e) => ({
|
|
39
42
|
ready: !1,
|
|
40
43
|
playing: !1,
|
|
41
44
|
ended: !1,
|
|
@@ -45,34 +48,34 @@ var p = (e) => ({
|
|
|
45
48
|
volume: +!e,
|
|
46
49
|
muted: e
|
|
47
50
|
});
|
|
48
|
-
function
|
|
49
|
-
let [
|
|
50
|
-
e.volume != null && e.volume > 0 && (
|
|
51
|
+
function h({ provider: a, src: l, muted: u, autoPlay: f, loop: h }) {
|
|
52
|
+
let [g, _] = r(() => m(u)), v = n(1), y = e((e) => {
|
|
53
|
+
e.volume != null && e.volume > 0 && (v.current = e.volume), _((t) => ({
|
|
51
54
|
...t,
|
|
52
55
|
...e
|
|
53
56
|
}));
|
|
54
|
-
}, []),
|
|
55
|
-
|
|
56
|
-
let
|
|
57
|
-
muted:
|
|
58
|
-
autoPlay:
|
|
59
|
-
loop:
|
|
57
|
+
}, []), b = n(g);
|
|
58
|
+
b.current = g;
|
|
59
|
+
let x = n({
|
|
60
|
+
muted: u,
|
|
61
|
+
autoPlay: f,
|
|
62
|
+
loop: h
|
|
60
63
|
});
|
|
61
|
-
|
|
62
|
-
muted:
|
|
63
|
-
autoPlay:
|
|
64
|
-
loop:
|
|
64
|
+
x.current = {
|
|
65
|
+
muted: u,
|
|
66
|
+
autoPlay: f,
|
|
67
|
+
loop: h
|
|
65
68
|
};
|
|
66
|
-
let
|
|
67
|
-
C.current = e;
|
|
68
|
-
}, []), E = e((e) => {
|
|
69
|
+
let S = n(!1), C = n(null), w = n(null), T = n(null), E = e((e) => {
|
|
69
70
|
w.current = e;
|
|
71
|
+
}, []), D = e((e) => {
|
|
72
|
+
T.current = e;
|
|
70
73
|
}, []);
|
|
71
74
|
return t(() => {
|
|
72
75
|
if (a !== "file") return;
|
|
73
|
-
let e =
|
|
76
|
+
let e = w.current;
|
|
74
77
|
if (!e) return;
|
|
75
|
-
|
|
78
|
+
C.current = {
|
|
76
79
|
play: () => void e.play().catch(() => {}),
|
|
77
80
|
pause: () => e.pause(),
|
|
78
81
|
seek: (t) => {
|
|
@@ -85,41 +88,42 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
85
88
|
e.muted = t, !t && e.volume === 0 && (e.volume = 1);
|
|
86
89
|
}
|
|
87
90
|
};
|
|
88
|
-
let t = () =>
|
|
91
|
+
let t = () => y({
|
|
89
92
|
playing: !0,
|
|
90
93
|
ended: !1
|
|
91
|
-
}), n = () =>
|
|
94
|
+
}), n = () => y({ playing: !1 }), r = () => y({
|
|
92
95
|
playing: !1,
|
|
93
96
|
ended: !0
|
|
94
97
|
}), o = () => {
|
|
95
98
|
let t = e.buffered;
|
|
96
|
-
|
|
97
|
-
...
|
|
99
|
+
y({
|
|
100
|
+
...S.current ? {} : { currentTime: e.currentTime },
|
|
98
101
|
buffered: t.length && e.duration ? i(t.end(t.length - 1) / e.duration) : 0
|
|
99
102
|
});
|
|
100
|
-
}, s = () =>
|
|
103
|
+
}, s = () => y({ duration: Number.isFinite(e.duration) ? e.duration : 0 }), c = () => y({
|
|
101
104
|
volume: e.muted ? 0 : e.volume,
|
|
102
105
|
muted: e.muted || e.volume === 0
|
|
103
106
|
});
|
|
104
|
-
return e.addEventListener("play", t), e.addEventListener("pause", n), e.addEventListener("ended", r), e.addEventListener("timeupdate", o), e.addEventListener("progress", o), e.addEventListener("durationchange", s), e.addEventListener("loadedmetadata", s), e.addEventListener("volumechange", c),
|
|
107
|
+
return e.addEventListener("play", t), e.addEventListener("pause", n), e.addEventListener("ended", r), e.addEventListener("timeupdate", o), e.addEventListener("progress", o), e.addEventListener("durationchange", s), e.addEventListener("loadedmetadata", s), e.addEventListener("volumechange", c), y({
|
|
105
108
|
ready: !0,
|
|
106
109
|
muted: e.muted,
|
|
107
110
|
volume: e.muted ? 0 : e.volume
|
|
108
111
|
}), () => {
|
|
109
|
-
e.removeEventListener("play", t), e.removeEventListener("pause", n), e.removeEventListener("ended", r), e.removeEventListener("timeupdate", o), e.removeEventListener("progress", o), e.removeEventListener("durationchange", s), e.removeEventListener("loadedmetadata", s), e.removeEventListener("volumechange", c),
|
|
112
|
+
e.removeEventListener("play", t), e.removeEventListener("pause", n), e.removeEventListener("ended", r), e.removeEventListener("timeupdate", o), e.removeEventListener("progress", o), e.removeEventListener("durationchange", s), e.removeEventListener("loadedmetadata", s), e.removeEventListener("volumechange", c), C.current = null;
|
|
110
113
|
};
|
|
111
|
-
}, [a,
|
|
112
|
-
if (a !== "youtube" || !
|
|
113
|
-
let e =
|
|
114
|
+
}, [a, y]), t(() => {
|
|
115
|
+
if (a !== "youtube" || !l) return;
|
|
116
|
+
let e = T.current;
|
|
114
117
|
if (!e) return;
|
|
115
|
-
let t = null, n, r = !1, { muted: i, autoPlay:
|
|
116
|
-
return
|
|
118
|
+
let t = null, n, r = !1, { muted: i, autoPlay: c, loop: u } = x.current, f = s(l), p = o(l);
|
|
119
|
+
return d().then((a) => {
|
|
117
120
|
if (r) return;
|
|
118
121
|
let o = document.createElement("div");
|
|
119
122
|
e.appendChild(o), t = new a.Player(o, {
|
|
120
|
-
videoId:
|
|
123
|
+
videoId: f,
|
|
121
124
|
width: "100%",
|
|
122
125
|
height: "100%",
|
|
126
|
+
...p ? { host: p } : {},
|
|
123
127
|
playerVars: {
|
|
124
128
|
controls: 0,
|
|
125
129
|
modestbranding: 1,
|
|
@@ -127,15 +131,15 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
127
131
|
playsinline: 1,
|
|
128
132
|
iv_load_policy: 3,
|
|
129
133
|
fs: 0,
|
|
130
|
-
autoplay: +!!
|
|
134
|
+
autoplay: +!!c,
|
|
131
135
|
mute: +!!i,
|
|
132
|
-
loop: +!!
|
|
133
|
-
...
|
|
136
|
+
loop: +!!u,
|
|
137
|
+
...u ? { playlist: f } : {}
|
|
134
138
|
},
|
|
135
139
|
events: {
|
|
136
140
|
onReady: (e) => {
|
|
137
141
|
let r = e.target;
|
|
138
|
-
i && r.mute(),
|
|
142
|
+
i && r.mute(), C.current = {
|
|
139
143
|
play: () => r.playVideo(),
|
|
140
144
|
pause: () => r.pauseVideo(),
|
|
141
145
|
seek: (e) => r.seekTo(e, !0),
|
|
@@ -143,14 +147,14 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
143
147
|
e === 0 ? r.mute() : (r.unMute(), r.setVolume(e * 100));
|
|
144
148
|
},
|
|
145
149
|
setMuted: (e) => e ? r.mute() : r.unMute()
|
|
146
|
-
},
|
|
150
|
+
}, y({
|
|
147
151
|
ready: !0,
|
|
148
152
|
duration: r.getDuration() || 0,
|
|
149
153
|
muted: r.isMuted(),
|
|
150
154
|
volume: r.isMuted() ? 0 : r.getVolume() / 100
|
|
151
155
|
}), n = window.setInterval(() => {
|
|
152
|
-
t &&
|
|
153
|
-
...
|
|
156
|
+
t && y({
|
|
157
|
+
...S.current ? {} : { currentTime: t.getCurrentTime() || 0 },
|
|
154
158
|
duration: t.getDuration() || 0,
|
|
155
159
|
buffered: t.getVideoLoadedFraction() || 0,
|
|
156
160
|
muted: t.isMuted(),
|
|
@@ -159,10 +163,10 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
159
163
|
}, 250);
|
|
160
164
|
},
|
|
161
165
|
onStateChange: (e) => {
|
|
162
|
-
e.data === 1 ?
|
|
166
|
+
e.data === 1 ? y({
|
|
163
167
|
playing: !0,
|
|
164
168
|
ended: !1
|
|
165
|
-
}) : e.data === 2 ?
|
|
169
|
+
}) : e.data === 2 ? y({ playing: !1 }) : e.data === 0 && y({
|
|
166
170
|
playing: !1,
|
|
167
171
|
ended: !0
|
|
168
172
|
});
|
|
@@ -170,7 +174,7 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
170
174
|
}
|
|
171
175
|
});
|
|
172
176
|
}), () => {
|
|
173
|
-
r = !0, window.clearInterval(n),
|
|
177
|
+
r = !0, window.clearInterval(n), C.current = null;
|
|
174
178
|
try {
|
|
175
179
|
t?.destroy();
|
|
176
180
|
} catch {}
|
|
@@ -178,27 +182,27 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
178
182
|
};
|
|
179
183
|
}, [
|
|
180
184
|
a,
|
|
181
|
-
|
|
182
|
-
|
|
185
|
+
l,
|
|
186
|
+
y
|
|
183
187
|
]), t(() => {
|
|
184
|
-
if (a !== "vimeo" || !
|
|
185
|
-
let e =
|
|
188
|
+
if (a !== "vimeo" || !l) return;
|
|
189
|
+
let e = T.current;
|
|
186
190
|
if (!e) return;
|
|
187
|
-
let t = null, n = !1, { muted: r, autoPlay: o, loop:
|
|
188
|
-
return
|
|
191
|
+
let t = null, n = !1, { muted: r, autoPlay: o, loop: s } = x.current;
|
|
192
|
+
return p().then((a) => {
|
|
189
193
|
if (n) return;
|
|
190
194
|
t = new a.Player(e, {
|
|
191
|
-
id:
|
|
195
|
+
id: c(l),
|
|
192
196
|
controls: !1,
|
|
193
197
|
autoplay: o,
|
|
194
198
|
muted: r,
|
|
195
|
-
loop:
|
|
199
|
+
loop: s,
|
|
196
200
|
playsinline: !0,
|
|
197
201
|
responsive: !1,
|
|
198
202
|
width: e.clientWidth || void 0
|
|
199
203
|
});
|
|
200
204
|
let u = t;
|
|
201
|
-
|
|
205
|
+
C.current = {
|
|
202
206
|
play: () => void u.play().catch(() => {}),
|
|
203
207
|
pause: () => void u.pause().catch(() => {}),
|
|
204
208
|
seek: (e) => void u.setCurrentTime(e).catch(() => {}),
|
|
@@ -207,29 +211,29 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
207
211
|
},
|
|
208
212
|
setMuted: (e) => void u.setMuted(e)
|
|
209
213
|
}, u.ready().then(async () => {
|
|
210
|
-
|
|
214
|
+
y({
|
|
211
215
|
ready: !0,
|
|
212
216
|
duration: await u.getDuration().catch(() => 0),
|
|
213
217
|
muted: r,
|
|
214
218
|
volume: +!r
|
|
215
219
|
});
|
|
216
|
-
}), u.on("play", () =>
|
|
220
|
+
}), u.on("play", () => y({
|
|
217
221
|
playing: !0,
|
|
218
222
|
ended: !1
|
|
219
|
-
})), u.on("pause", () =>
|
|
223
|
+
})), u.on("pause", () => y({ playing: !1 })), u.on("ended", () => y({
|
|
220
224
|
playing: !1,
|
|
221
225
|
ended: !0
|
|
222
226
|
})), u.on("timeupdate", (e) => {
|
|
223
|
-
|
|
224
|
-
...
|
|
227
|
+
y({
|
|
228
|
+
...S.current ? {} : { currentTime: e.seconds },
|
|
225
229
|
duration: e.duration
|
|
226
230
|
});
|
|
227
|
-
}), u.on("progress", (e) =>
|
|
231
|
+
}), u.on("progress", (e) => y({ buffered: i(e.percent) })), u.on("volumechange", (e) => y({
|
|
228
232
|
volume: e.volume,
|
|
229
233
|
muted: e.volume === 0
|
|
230
234
|
}));
|
|
231
235
|
}), () => {
|
|
232
|
-
n = !0,
|
|
236
|
+
n = !0, C.current = null;
|
|
233
237
|
try {
|
|
234
238
|
t?.destroy();
|
|
235
239
|
} catch {}
|
|
@@ -237,42 +241,42 @@ function m({ provider: a, src: c, muted: l, autoPlay: d, loop: m }) {
|
|
|
237
241
|
};
|
|
238
242
|
}, [
|
|
239
243
|
a,
|
|
240
|
-
|
|
241
|
-
|
|
244
|
+
l,
|
|
245
|
+
y
|
|
242
246
|
]), {
|
|
243
|
-
state:
|
|
244
|
-
videoRef:
|
|
245
|
-
mountRef:
|
|
247
|
+
state: g,
|
|
248
|
+
videoRef: E,
|
|
249
|
+
mountRef: D,
|
|
246
250
|
toggle: e(() => {
|
|
247
|
-
|
|
251
|
+
b.current.playing ? C.current?.pause() : C.current?.play();
|
|
248
252
|
}, []),
|
|
249
253
|
seekFraction: e((e) => {
|
|
250
|
-
let t =
|
|
254
|
+
let t = b.current.duration;
|
|
251
255
|
if (!t) return;
|
|
252
256
|
let n = i(e) * t;
|
|
253
|
-
|
|
254
|
-
}, [
|
|
257
|
+
y({ currentTime: n }), C.current?.seek(n);
|
|
258
|
+
}, [y]),
|
|
255
259
|
seekBy: e((e) => {
|
|
256
|
-
let { currentTime: t, duration: n } =
|
|
260
|
+
let { currentTime: t, duration: n } = b.current;
|
|
257
261
|
if (!n) return;
|
|
258
262
|
let r = Math.max(0, Math.min(n, t + e));
|
|
259
|
-
|
|
260
|
-
}, [
|
|
263
|
+
y({ currentTime: r }), C.current?.seek(r);
|
|
264
|
+
}, [y]),
|
|
261
265
|
setVolume: e((e) => {
|
|
262
266
|
let t = i(e);
|
|
263
|
-
t > 0 && (
|
|
267
|
+
t > 0 && (v.current = t), C.current?.setVolume(t);
|
|
264
268
|
}, []),
|
|
265
269
|
toggleMute: e(() => {
|
|
266
|
-
let e =
|
|
267
|
-
t && e.volume === 0 &&
|
|
270
|
+
let e = b.current, t = e.muted || e.volume === 0;
|
|
271
|
+
t && e.volume === 0 && C.current?.setVolume(v.current), C.current?.setMuted(!t);
|
|
268
272
|
}, []),
|
|
269
273
|
beginSeek: e(() => {
|
|
270
|
-
|
|
274
|
+
S.current = !0;
|
|
271
275
|
}, []),
|
|
272
276
|
endSeek: e(() => {
|
|
273
|
-
|
|
277
|
+
S.current = !1;
|
|
274
278
|
}, [])
|
|
275
279
|
};
|
|
276
280
|
}
|
|
277
281
|
//#endregion
|
|
278
|
-
export { a as detectProvider,
|
|
282
|
+
export { a as detectProvider, l as providerPosterUrl, h as useMediaEngine, o as youtubeEmbedHost };
|