markdown-flow-ui 0.2.25-dev.2 → 0.2.25-dev.4
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/dist/components/Slide/Player.cjs +1 -1
- package/dist/components/Slide/Player.cjs.map +1 -1
- package/dist/components/Slide/Player.d.ts +17 -1
- package/dist/components/Slide/Player.es.js +727 -623
- package/dist/components/Slide/Player.es.js.map +1 -1
- package/dist/components/Slide/Slide.cjs +1 -1
- package/dist/components/Slide/Slide.cjs.map +1 -1
- package/dist/components/Slide/Slide.d.ts +16 -5
- package/dist/components/Slide/Slide.es.js +819 -797
- package/dist/components/Slide/Slide.es.js.map +1 -1
- package/dist/components/Slide/index.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/dist/components/Slide/utils/requestedStepNavigation.cjs +0 -2
- package/dist/components/Slide/utils/requestedStepNavigation.cjs.map +0 -1
- package/dist/components/Slide/utils/requestedStepNavigation.d.ts +0 -9
- package/dist/components/Slide/utils/requestedStepNavigation.es.js +0 -18
- package/dist/components/Slide/utils/requestedStepNavigation.es.js.map +0 -1
- package/dist/components/Slide/utils/requestedStepNavigation.test.d.ts +0 -1
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { getMarkdownFlowDirection as
|
|
4
|
-
import { useDetachedLanguage as
|
|
5
|
-
import { useResolvedDirection as
|
|
6
|
-
import { cn as
|
|
7
|
-
import
|
|
8
|
-
import { getSlidePlayerTexts as
|
|
9
|
-
import { DEFAULT_MOBILE_VIEW_MODE as
|
|
10
|
-
import { hasReachedAudioEnd as
|
|
11
|
-
import { PlayerKeyboardShortcutContext as
|
|
12
|
-
import { activatePlayerKeyboardShortcutOwner as
|
|
13
|
-
import { resolveAudioPlaybackSourceType as
|
|
14
|
-
import { shouldKeepPlayingAfterNavigation as
|
|
15
|
-
import { toPlayerCustomActionList as
|
|
16
|
-
import { suppressPlayerControlsWakeAfterNavigation as
|
|
17
|
-
import { isPlaybackTimeCoveredBySegments as
|
|
18
|
-
import { getSortedAudioSegments as
|
|
19
|
-
import { getSubtitleCueJumpTarget as
|
|
1
|
+
import { jsxs as te, jsx as a, Fragment as $t } from "react/jsx-runtime";
|
|
2
|
+
import br, { memo as _r, useId as Mr, useContext as wr, useRef as s, useState as Ye, useMemo as ae, useCallback as u, useEffect as m } from "react";
|
|
3
|
+
import { getMarkdownFlowDirection as Tr, getMarkdownFlowLanguage as kr } from "../../lib/locale.es.js";
|
|
4
|
+
import { useDetachedLanguage as Lr } from "../../lib/useDetachedLanguage.es.js";
|
|
5
|
+
import { useResolvedDirection as vr } from "../../lib/useResolvedDirection.es.js";
|
|
6
|
+
import { cn as Ar } from "../../lib/utils.es.js";
|
|
7
|
+
import Cr from "./MobilePlayerSettingsSheet.es.js";
|
|
8
|
+
import { getSlidePlayerTexts as xr } from "./slideI18n.es.js";
|
|
9
|
+
import { DEFAULT_MOBILE_VIEW_MODE as Er } from "./utils/mobileScreenMode.es.js";
|
|
10
|
+
import { hasReachedAudioEnd as Nr } from "./utils/audioCompletion.es.js";
|
|
11
|
+
import { PlayerKeyboardShortcutContext as Kr } from "./utils/playerKeyboardShortcutContext.es.js";
|
|
12
|
+
import { activatePlayerKeyboardShortcutOwner as Fr, registerPlayerKeyboardShortcutOwner as Ur, isActivePlayerKeyboardShortcutOwner as Br, getPlayerKeyboardShortcutAction as Wr, shouldIgnorePlayerKeyboardShortcutEvent as Pr } from "./utils/playerKeyboardShortcuts.es.js";
|
|
13
|
+
import { resolveAudioPlaybackSourceType as Or } from "./utils/playbackSource.es.js";
|
|
14
|
+
import { shouldKeepPlayingAfterNavigation as Rr } from "./utils/playbackPreference.es.js";
|
|
15
|
+
import { toPlayerCustomActionList as Vr } from "./utils/playerCustomActions.es.js";
|
|
16
|
+
import { suppressPlayerControlsWakeAfterNavigation as Ge } from "./utils/playerNavigationContext.es.js";
|
|
17
|
+
import { isPlaybackTimeCoveredBySegments as Qe, resolveSegmentSeekTarget as Jt } from "./utils/segmentSeek.es.js";
|
|
18
|
+
import { getSortedAudioSegments as Zt } from "./utils/audioSegments.es.js";
|
|
19
|
+
import { getSubtitleCueJumpTarget as Hr, shouldClearSubtitleCueJumpTarget as Ir } from "./utils/subtitleCue.es.js";
|
|
20
20
|
/* empty css */
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
28
|
-
import
|
|
29
|
-
import
|
|
30
|
-
import
|
|
31
|
-
const
|
|
32
|
-
if (typeof window > "u" || !
|
|
21
|
+
import Dr from "../../node_modules/lucide-react/dist/esm/icons/ellipsis-vertical.es.js";
|
|
22
|
+
import $r from "../../node_modules/lucide-react/dist/esm/icons/volume-2.es.js";
|
|
23
|
+
import Jr from "../../node_modules/lucide-react/dist/esm/icons/skip-back.es.js";
|
|
24
|
+
import Zr from "../../node_modules/lucide-react/dist/esm/icons/skip-forward.es.js";
|
|
25
|
+
import jr from "../../node_modules/lucide-react/dist/esm/icons/rewind.es.js";
|
|
26
|
+
import zr from "../../node_modules/lucide-react/dist/esm/icons/fast-forward.es.js";
|
|
27
|
+
import Yr from "../../node_modules/lucide-react/dist/esm/icons/captions.es.js";
|
|
28
|
+
import Gr from "../../node_modules/lucide-react/dist/esm/icons/captions-off.es.js";
|
|
29
|
+
import Qr from "../../node_modules/lucide-react/dist/esm/icons/scan-line.es.js";
|
|
30
|
+
import Xr from "../../node_modules/lucide-react/dist/esm/icons/maximize.es.js";
|
|
31
|
+
const jt = /* @__PURE__ */ new Map(), zt = (d) => {
|
|
32
|
+
if (typeof window > "u" || !d || jt.has(d))
|
|
33
33
|
return;
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
const
|
|
38
|
-
return
|
|
39
|
-
}),
|
|
40
|
-
const
|
|
41
|
-
(
|
|
34
|
+
const p = window.document.createElement("audio");
|
|
35
|
+
p.preload = "auto", p.setAttribute("playsinline", "true"), p.src = d, p.load(), jt.set(d, p);
|
|
36
|
+
}, qr = (d, p) => p !== null && p.audioList === d && p.subtitleCueLists.length === d.length && d.every((l, w) => {
|
|
37
|
+
const T = l.element?.subtitle_cues;
|
|
38
|
+
return p.subtitleCueLists[w] === T && p.subtitleCueLengths[w] === (T?.length ?? 0);
|
|
39
|
+
}), en = (d) => {
|
|
40
|
+
const p = d.map(
|
|
41
|
+
(l) => l.element?.subtitle_cues
|
|
42
42
|
);
|
|
43
43
|
return {
|
|
44
|
-
audioList:
|
|
45
|
-
subtitleCueLists:
|
|
46
|
-
subtitleCueLengths:
|
|
47
|
-
(
|
|
44
|
+
audioList: d,
|
|
45
|
+
subtitleCueLists: p,
|
|
46
|
+
subtitleCueLengths: p.map(
|
|
47
|
+
(l) => l?.length ?? 0
|
|
48
48
|
),
|
|
49
|
-
tracks:
|
|
50
|
-
subtitleCues:
|
|
49
|
+
tracks: p.map((l) => ({
|
|
50
|
+
subtitleCues: l ?? []
|
|
51
51
|
}))
|
|
52
52
|
};
|
|
53
|
-
},
|
|
53
|
+
}, tn = () => /* @__PURE__ */ te(
|
|
54
54
|
"svg",
|
|
55
55
|
{
|
|
56
56
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -59,17 +59,17 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
59
59
|
viewBox: "0 0 34 34",
|
|
60
60
|
fill: "none",
|
|
61
61
|
children: [
|
|
62
|
-
/* @__PURE__ */
|
|
62
|
+
/* @__PURE__ */ a(
|
|
63
63
|
"path",
|
|
64
64
|
{
|
|
65
65
|
d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
|
|
66
66
|
fill: "#0A0A0A"
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
|
-
/* @__PURE__ */
|
|
69
|
+
/* @__PURE__ */ a("path", { d: "M12 10H16V24H12V10ZM18 10H22V24H18V10Z", fill: "white" })
|
|
70
70
|
]
|
|
71
71
|
}
|
|
72
|
-
),
|
|
72
|
+
), rn = () => /* @__PURE__ */ te(
|
|
73
73
|
"svg",
|
|
74
74
|
{
|
|
75
75
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -78,755 +78,859 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
78
78
|
viewBox: "0 0 34 34",
|
|
79
79
|
fill: "none",
|
|
80
80
|
children: [
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ a(
|
|
82
82
|
"path",
|
|
83
83
|
{
|
|
84
84
|
d: "M16.6667 33.3333C25.8714 33.3333 33.3333 25.8714 33.3333 16.6667C33.3333 7.46192 25.8714 0 16.6667 0C7.46192 0 0 7.46192 0 16.6667C0 25.8714 7.46192 33.3333 16.6667 33.3333Z",
|
|
85
85
|
fill: "#0A0A0A"
|
|
86
86
|
}
|
|
87
87
|
),
|
|
88
|
-
/* @__PURE__ */
|
|
88
|
+
/* @__PURE__ */ a("path", { d: "M13.3333 10L23.3333 16.6667L13.3333 23.3333V10Z", fill: "white" })
|
|
89
89
|
]
|
|
90
90
|
}
|
|
91
|
-
),
|
|
91
|
+
), J = {
|
|
92
92
|
fullscreen: "F",
|
|
93
93
|
next: "→",
|
|
94
94
|
nextSubtitle: "Shift+→",
|
|
95
95
|
previous: "←",
|
|
96
96
|
previousSubtitle: "Shift+←",
|
|
97
97
|
subtitle: "C"
|
|
98
|
-
},
|
|
99
|
-
audioList:
|
|
100
|
-
className:
|
|
101
|
-
currentAudioIndex:
|
|
102
|
-
defaultPlaying:
|
|
103
|
-
isPlaybackPaused:
|
|
104
|
-
isAutoAdvanceEnabled:
|
|
105
|
-
useAutoAdvanceToggle:
|
|
106
|
-
onLoadingChange:
|
|
107
|
-
onPlaybackPreferenceChange:
|
|
108
|
-
onPlaybackStarted:
|
|
109
|
-
onPlaybackTimeChange:
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
98
|
+
}, nn = 250, un = 15e3, ln = (d, p) => d ? `${d} (${p})` : p, sn = ({
|
|
99
|
+
audioList: d = [],
|
|
100
|
+
className: p,
|
|
101
|
+
currentAudioIndex: l = -1,
|
|
102
|
+
defaultPlaying: w = !0,
|
|
103
|
+
isPlaybackPaused: T = !1,
|
|
104
|
+
isAutoAdvanceEnabled: Z = !0,
|
|
105
|
+
useAutoAdvanceToggle: W = !1,
|
|
106
|
+
onLoadingChange: Xe,
|
|
107
|
+
onPlaybackPreferenceChange: qe,
|
|
108
|
+
onPlaybackStarted: et,
|
|
109
|
+
onPlaybackTimeChange: ye,
|
|
110
|
+
onPlaybackCheckpoint: re,
|
|
111
|
+
playbackRestoreRequest: _ = null,
|
|
112
|
+
onPlaybackRestoreComplete: ce,
|
|
113
|
+
onSubtitleToggle: oe,
|
|
114
|
+
onPrev: be,
|
|
115
|
+
onNext: _e,
|
|
116
|
+
onSubtitleJump: Me,
|
|
117
|
+
canJumpToSubtitleTarget: Ue,
|
|
118
|
+
onFullscreen: fe,
|
|
119
|
+
isFullscreen: tt = !1,
|
|
120
|
+
mobileViewMode: Yt = Er,
|
|
121
|
+
settingsPortalContainer: Gt,
|
|
122
|
+
onMobileViewModeChange: rt,
|
|
123
|
+
onEnded: nt,
|
|
124
|
+
onAutoAdvanceToggle: ut,
|
|
125
|
+
onInteractionToggle: cn,
|
|
126
|
+
hasInteraction: on,
|
|
127
|
+
isInteractionOpen: we = !1,
|
|
128
|
+
isSubtitleEnabled: Be = !0,
|
|
129
|
+
prevDisabled: We = !1,
|
|
130
|
+
nextDisabled: Pe = !1,
|
|
131
|
+
showControls: Oe = !0,
|
|
132
|
+
onControlsPointerEnter: Qt,
|
|
133
|
+
onControlsPointerLeave: Xt,
|
|
134
|
+
enableKeyboardShortcuts: qt = !0,
|
|
135
|
+
subtitleSeekRequest: H = null,
|
|
136
|
+
customActions: it,
|
|
137
|
+
customActionContext: lt,
|
|
138
|
+
locale: Te,
|
|
139
|
+
texts: st,
|
|
140
|
+
onFocusCapture: at,
|
|
141
|
+
onPointerDown: ct,
|
|
142
|
+
...Re
|
|
140
143
|
}) => {
|
|
141
|
-
const
|
|
142
|
-
|
|
143
|
-
),
|
|
144
|
-
}),
|
|
144
|
+
const Ve = Re.dir ?? Tr(Te), ot = Re.lang ?? kr(Te), er = Mr(), ft = wr(Kr), g = s(null), { resolvedDirection: dt, readDirection: mt } = vr(g, Ve), ke = dt === "rtl", tr = Lr(g, ot), pt = s(we), P = s(null), Le = s(null), K = s(0), h = s(null), de = s(void 0), k = s([]), me = s(
|
|
145
|
+
W ? Z : w
|
|
146
|
+
), pe = s(!1), ht = s(!1), L = s(!1), B = s(null), j = s(null), E = s(!1), c = s(!1), x = s(null), F = s(!1), z = s(null), ve = s(0), gt = s(() => {
|
|
147
|
+
}), Ae = s(null), he = s(null), St = s(null), Y = s(null), yt = s(0), He = s(!1), Ie = s(!1), bt = s(re), _t = s(() => 0), Mt = s(null), O = s("unknown"), [Ce, S] = Ye(w), [wt, ne] = Ye(!1), [ue, rr] = Ye({
|
|
145
148
|
next: !1,
|
|
146
149
|
previous: !1
|
|
147
|
-
}),
|
|
148
|
-
() =>
|
|
149
|
-
[
|
|
150
|
+
}), G = ft?.ownerId ?? er, R = qt && (ft?.enabled ?? !0), f = l >= 0 ? d[l] : void 0, A = f?.audioUrl, Tt = f?.audioSegments, nr = Tt?.length ?? 0, U = ae(
|
|
151
|
+
() => Zt(f),
|
|
152
|
+
[f, nr, Tt]
|
|
150
153
|
);
|
|
151
|
-
let
|
|
152
|
-
|
|
153
|
-
const
|
|
154
|
-
() =>
|
|
155
|
-
[
|
|
156
|
-
),
|
|
154
|
+
let xe = Mt.current;
|
|
155
|
+
qr(d, xe) || (xe = en(d), Mt.current = xe);
|
|
156
|
+
const kt = xe.tracks, De = ae(
|
|
157
|
+
() => Vr(it, lt),
|
|
158
|
+
[lt, it]
|
|
159
|
+
), Lt = De.length + 6, ur = ae(
|
|
157
160
|
() => ({
|
|
158
|
-
"--slide-player-mobile-control-count": String(
|
|
161
|
+
"--slide-player-mobile-control-count": String(Lt)
|
|
159
162
|
}),
|
|
160
|
-
[
|
|
161
|
-
),
|
|
163
|
+
[Lt]
|
|
164
|
+
), o = ae(
|
|
162
165
|
() => ({
|
|
163
|
-
...
|
|
164
|
-
...
|
|
166
|
+
...xr(Te),
|
|
167
|
+
...st
|
|
165
168
|
}),
|
|
166
|
-
[
|
|
167
|
-
),
|
|
168
|
-
(e, t,
|
|
169
|
-
ariaKeyShortcuts:
|
|
170
|
-
title:
|
|
169
|
+
[Te, st]
|
|
170
|
+
), $e = ae(() => f ? f.audioKey ?? `${String(f.sequenceNumber ?? "none")}:${String(f.audioUrl ?? "")}` : "none", [f]), ir = W ? Z : Ce, vt = W ? Z ? o.pauseAutoplayLabel : o.playAutoplayLabel : Ce ? o.pauseLabel : o.playLabel, At = tt ? o.exitFullscreenLabel : o.enterFullscreenLabel, Q = u(
|
|
171
|
+
(e, t, r) => ({
|
|
172
|
+
ariaKeyShortcuts: R ? r : void 0,
|
|
173
|
+
title: R ? ln(e, t) : e
|
|
171
174
|
}),
|
|
172
|
-
[
|
|
173
|
-
),
|
|
174
|
-
|
|
175
|
-
|
|
175
|
+
[R]
|
|
176
|
+
), Ct = Q(
|
|
177
|
+
o.subtitleToggleAriaLabel,
|
|
178
|
+
J.subtitle,
|
|
176
179
|
"c"
|
|
177
|
-
),
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
),
|
|
182
|
-
|
|
183
|
-
|
|
180
|
+
), xt = Q(
|
|
181
|
+
o.previousLabel,
|
|
182
|
+
ke ? J.next : J.previous,
|
|
183
|
+
ke ? "ArrowRight" : "ArrowLeft"
|
|
184
|
+
), Et = Q(
|
|
185
|
+
o.previousSubtitleLabel,
|
|
186
|
+
J.previousSubtitle,
|
|
184
187
|
"Shift+ArrowLeft"
|
|
185
|
-
),
|
|
186
|
-
|
|
187
|
-
|
|
188
|
+
), Nt = Q(
|
|
189
|
+
vt,
|
|
190
|
+
o.playbackShortcutLabel,
|
|
188
191
|
"Space"
|
|
189
|
-
),
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
),
|
|
194
|
-
|
|
195
|
-
|
|
192
|
+
), Kt = Q(
|
|
193
|
+
o.nextLabel,
|
|
194
|
+
ke ? J.previous : J.next,
|
|
195
|
+
ke ? "ArrowLeft" : "ArrowRight"
|
|
196
|
+
), Ft = Q(
|
|
197
|
+
o.nextSubtitleLabel,
|
|
198
|
+
J.nextSubtitle,
|
|
196
199
|
"Shift+ArrowRight"
|
|
197
|
-
),
|
|
198
|
-
|
|
199
|
-
|
|
200
|
+
), Ut = Q(
|
|
201
|
+
At,
|
|
202
|
+
J.fullscreen,
|
|
200
203
|
"f"
|
|
201
|
-
),
|
|
202
|
-
|
|
203
|
-
}, [
|
|
204
|
+
), Ee = u(() => {
|
|
205
|
+
R && Fr(G);
|
|
206
|
+
}, [G, R]), lr = u(
|
|
204
207
|
(e) => {
|
|
205
|
-
|
|
208
|
+
Ee(), ct?.(e);
|
|
206
209
|
},
|
|
207
|
-
[
|
|
208
|
-
),
|
|
210
|
+
[Ee, ct]
|
|
211
|
+
), sr = u(
|
|
209
212
|
(e) => {
|
|
210
|
-
|
|
213
|
+
Ee(), at?.(e);
|
|
211
214
|
},
|
|
212
|
-
[
|
|
215
|
+
[Ee, at]
|
|
213
216
|
);
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
}, [
|
|
217
|
-
|
|
218
|
-
}, [
|
|
219
|
-
|
|
220
|
-
}, [
|
|
221
|
-
!
|
|
222
|
-
}, [
|
|
223
|
-
|
|
224
|
-
}, [
|
|
225
|
-
const e =
|
|
226
|
-
|
|
227
|
-
}, [
|
|
228
|
-
const
|
|
217
|
+
m(() => {
|
|
218
|
+
de.current = f;
|
|
219
|
+
}, [f]), m(() => {
|
|
220
|
+
me.current = W ? Z : w;
|
|
221
|
+
}, [w, Z, W]), m(() => {
|
|
222
|
+
Oe || ne(!1);
|
|
223
|
+
}, [Oe]), m(() => {
|
|
224
|
+
!pt.current && we && ne(!1), pt.current = we;
|
|
225
|
+
}, [we]), m(() => {
|
|
226
|
+
k.current = U;
|
|
227
|
+
}, [U]), m(() => {
|
|
228
|
+
const e = f?.audioUrl, t = l >= 0 ? d[l + 1]?.audioUrl : void 0;
|
|
229
|
+
zt(e), zt(t);
|
|
230
|
+
}, [d, f?.audioUrl, l]);
|
|
231
|
+
const i = u(
|
|
229
232
|
(e, t = null) => {
|
|
230
|
-
|
|
233
|
+
ht.current === e && (!e || t === null) || (ht.current = e, Xe?.({
|
|
231
234
|
loading: e,
|
|
232
235
|
reason: e ? t : null
|
|
233
236
|
}));
|
|
234
237
|
},
|
|
235
|
-
[
|
|
236
|
-
),
|
|
238
|
+
[Xe]
|
|
239
|
+
), V = u(
|
|
237
240
|
(e) => {
|
|
238
|
-
|
|
241
|
+
me.current = e, qe?.(e);
|
|
239
242
|
},
|
|
240
|
-
[
|
|
241
|
-
),
|
|
242
|
-
shouldContinuePlayback:
|
|
243
|
+
[qe]
|
|
244
|
+
), X = u(() => W ? {
|
|
245
|
+
shouldContinuePlayback: me.current
|
|
243
246
|
} : {
|
|
244
|
-
shouldContinuePlayback:
|
|
245
|
-
defaultPlaying:
|
|
246
|
-
isPausedByUser:
|
|
247
|
+
shouldContinuePlayback: Rr({
|
|
248
|
+
defaultPlaying: me.current,
|
|
249
|
+
isPausedByUser: L.current
|
|
247
250
|
})
|
|
248
|
-
}, [
|
|
249
|
-
const e =
|
|
250
|
-
return e == null || e <= 0 ? 0 :
|
|
251
|
-
(t,
|
|
251
|
+
}, [W]), Bt = u((e) => e instanceof DOMException ? e.name === "NotAllowedError" || e.name === "SecurityError" : !1, []), I = u(() => w && !T && !L.current && O.current !== "blocked", [w, T]), Wt = u((e) => e ? e.startsWith("data:") ? e : `data:audio/mpeg;base64,${e}` : "", []), Pt = u(() => {
|
|
252
|
+
const e = h.current;
|
|
253
|
+
return e == null || e <= 0 ? 0 : k.current.slice(0, e).reduce(
|
|
254
|
+
(t, r) => t + Math.max(Number(r.duration_ms ?? 0), 0),
|
|
252
255
|
0
|
|
253
256
|
) / 1e3;
|
|
254
|
-
}, []),
|
|
255
|
-
(t,
|
|
257
|
+
}, []), q = u((e) => e <= 0 ? 0 : k.current.slice(0, e).reduce(
|
|
258
|
+
(t, r) => t + Math.max(Number(r.duration_ms ?? 0), 0),
|
|
256
259
|
0
|
|
257
|
-
), []),
|
|
258
|
-
(e, t) => !e ||
|
|
259
|
-
|
|
260
|
+
), []), Ne = u(
|
|
261
|
+
(e, t) => !e || T ? !1 : e.audioUrl ? !0 : Qe(
|
|
262
|
+
Zt(e),
|
|
260
263
|
t
|
|
261
264
|
),
|
|
262
|
-
[
|
|
263
|
-
),
|
|
264
|
-
(e, t,
|
|
265
|
-
const n =
|
|
266
|
-
currentAudioIndex:
|
|
265
|
+
[T]
|
|
266
|
+
), ge = u(
|
|
267
|
+
(e, t, r = {}) => {
|
|
268
|
+
const n = Hr({
|
|
269
|
+
currentAudioIndex: l,
|
|
267
270
|
currentTimeMs: t,
|
|
268
271
|
direction: e,
|
|
269
|
-
excludeTarget:
|
|
270
|
-
tracks:
|
|
272
|
+
excludeTarget: r.excludeTarget,
|
|
273
|
+
tracks: kt
|
|
271
274
|
});
|
|
272
|
-
return !n || !
|
|
273
|
-
|
|
275
|
+
return !n || !Ne(
|
|
276
|
+
d[n.audioIndex],
|
|
274
277
|
n.timeMs
|
|
275
|
-
) || n.audioIndex !==
|
|
278
|
+
) || n.audioIndex !== l && (!Me || Ue && !Ue(n)) ? null : n;
|
|
276
279
|
},
|
|
277
280
|
[
|
|
278
|
-
|
|
279
|
-
|
|
281
|
+
d,
|
|
282
|
+
Ue,
|
|
283
|
+
Ne,
|
|
284
|
+
l,
|
|
280
285
|
Me,
|
|
281
|
-
|
|
282
|
-
me,
|
|
283
|
-
dt
|
|
286
|
+
kt
|
|
284
287
|
]
|
|
285
|
-
),
|
|
288
|
+
), Je = u(
|
|
286
289
|
(e, t = !1) => {
|
|
287
|
-
const
|
|
288
|
-
if (!t &&
|
|
289
|
-
|
|
290
|
-
) <
|
|
290
|
+
const r = Math.max(Number(e), 0);
|
|
291
|
+
if (!t && Ae.current !== null && Math.abs(
|
|
292
|
+
r - Ae.current
|
|
293
|
+
) < nn)
|
|
291
294
|
return;
|
|
292
|
-
|
|
295
|
+
Ae.current = r;
|
|
293
296
|
const n = {
|
|
294
|
-
previous:
|
|
295
|
-
next:
|
|
297
|
+
previous: ge("previous", r) !== null,
|
|
298
|
+
next: ge("next", r) !== null
|
|
296
299
|
};
|
|
297
|
-
|
|
300
|
+
rr((b) => b.previous === n.previous && b.next === n.next ? b : n);
|
|
298
301
|
},
|
|
299
|
-
[
|
|
302
|
+
[ge]
|
|
300
303
|
);
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
}, [
|
|
304
|
-
const
|
|
305
|
-
const e =
|
|
306
|
-
return e ?
|
|
307
|
-
}, [
|
|
304
|
+
m(() => {
|
|
305
|
+
gt.current = Je, Je(ve.current, !0);
|
|
306
|
+
}, [Je]);
|
|
307
|
+
const D = u(() => {
|
|
308
|
+
const e = g.current;
|
|
309
|
+
return e ? B.current === "segment" ? q(K.current) + Math.max(e.currentTime, 0) * 1e3 : x.current !== null && e.readyState === 0 ? x.current * 1e3 : Math.max(e.currentTime, 0) * 1e3 : h.current != null ? q(h.current) : 0;
|
|
310
|
+
}, [q]);
|
|
311
|
+
m(() => {
|
|
312
|
+
bt.current = re;
|
|
313
|
+
}, [re]), m(() => {
|
|
314
|
+
_t.current = D;
|
|
315
|
+
}, [D]);
|
|
316
|
+
const N = u(
|
|
308
317
|
(e) => {
|
|
309
318
|
const t = Math.max(e, 0);
|
|
310
|
-
|
|
311
|
-
currentAudioIndex:
|
|
319
|
+
ve.current !== t && (ve.current = t, Ir({
|
|
320
|
+
currentAudioIndex: l,
|
|
312
321
|
currentTimeMs: t,
|
|
313
|
-
target:
|
|
314
|
-
}) && (
|
|
322
|
+
target: he.current
|
|
323
|
+
}) && (he.current = null), ye?.(t), gt.current(t));
|
|
315
324
|
},
|
|
316
|
-
[
|
|
317
|
-
), y =
|
|
318
|
-
|
|
319
|
-
}, [
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
325
|
+
[l, ye]
|
|
326
|
+
), y = u(() => {
|
|
327
|
+
N(D());
|
|
328
|
+
}, [D, N]), $ = u(
|
|
329
|
+
(e = !1, t = !1) => {
|
|
330
|
+
const r = Le.current;
|
|
331
|
+
if (!re || !r)
|
|
332
|
+
return;
|
|
333
|
+
const n = Date.now();
|
|
334
|
+
!e && n - yt.current < 5e3 || (yt.current = n, He.current = t, re({
|
|
335
|
+
audioKey: r,
|
|
336
|
+
isComplete: t,
|
|
337
|
+
timeMs: D()
|
|
338
|
+
}));
|
|
339
|
+
},
|
|
340
|
+
[D, re]
|
|
341
|
+
);
|
|
342
|
+
m(
|
|
343
|
+
() => () => {
|
|
344
|
+
He.current || bt.current?.({
|
|
345
|
+
audioKey: Le.current ?? "none",
|
|
346
|
+
isComplete: !1,
|
|
347
|
+
timeMs: _t.current()
|
|
348
|
+
});
|
|
349
|
+
},
|
|
350
|
+
[]
|
|
351
|
+
), m(() => {
|
|
352
|
+
He.current = !1;
|
|
353
|
+
}, [l]);
|
|
354
|
+
const M = u(() => {
|
|
355
|
+
typeof window > "u" || z.current === null || (window.cancelAnimationFrame(z.current), z.current = null);
|
|
356
|
+
}, []), Ot = u(() => {
|
|
357
|
+
if (typeof window > "u" || z.current !== null)
|
|
323
358
|
return;
|
|
324
359
|
const e = () => {
|
|
325
360
|
y();
|
|
326
|
-
const t =
|
|
361
|
+
const t = g.current;
|
|
327
362
|
if (!t || t.paused || t.ended) {
|
|
328
|
-
|
|
363
|
+
z.current = null;
|
|
329
364
|
return;
|
|
330
365
|
}
|
|
331
|
-
|
|
366
|
+
z.current = window.requestAnimationFrame(e);
|
|
332
367
|
};
|
|
333
|
-
|
|
334
|
-
}, [y]),
|
|
335
|
-
const e =
|
|
336
|
-
e && (
|
|
337
|
-
}, [
|
|
368
|
+
z.current = window.requestAnimationFrame(e);
|
|
369
|
+
}, [y]), ie = u(() => {
|
|
370
|
+
const e = g.current;
|
|
371
|
+
e && (M(), c.current = !1, L.current = !1, pe.current = !1, B.current = null, x.current = null, E.current = !1, F.current = !1, j.current = null, e.pause(), e.removeAttribute("src"), e.load(), P.current = null, K.current = 0, h.current = null, N(0), S(!1), i(!1));
|
|
372
|
+
}, [N, M, i]), v = u(
|
|
338
373
|
(e) => {
|
|
339
|
-
const t =
|
|
374
|
+
const t = g.current;
|
|
340
375
|
if (!t)
|
|
341
376
|
return !1;
|
|
342
|
-
const
|
|
343
|
-
return
|
|
344
|
-
|
|
377
|
+
const r = t.play();
|
|
378
|
+
return r && typeof r.then == "function" && r.then(() => {
|
|
379
|
+
O.current === "unknown" && (O.current = "auto"), c.current = !1, F.current = !1;
|
|
345
380
|
}).catch((n) => {
|
|
346
|
-
|
|
381
|
+
O.current === "unknown" && Bt(n) && (O.current = "blocked", c.current = !1, i(!1)), F.current = !1, S(!1);
|
|
347
382
|
}), !0;
|
|
348
383
|
},
|
|
349
|
-
[
|
|
350
|
-
),
|
|
351
|
-
(e, t,
|
|
352
|
-
const n =
|
|
353
|
-
if (!n || !
|
|
384
|
+
[Bt, i]
|
|
385
|
+
), C = u(
|
|
386
|
+
(e, t, r = {}) => {
|
|
387
|
+
const n = g.current, b = k.current[e];
|
|
388
|
+
if (!n || !b)
|
|
354
389
|
return !1;
|
|
355
|
-
const
|
|
356
|
-
Number(
|
|
390
|
+
const ee = Wt(b.audio_data), ze = Math.max(
|
|
391
|
+
Number(r.seekTimeSeconds ?? 0),
|
|
357
392
|
0
|
|
358
393
|
);
|
|
359
|
-
|
|
360
|
-
|
|
394
|
+
K.current = e, h.current = null, E.current = !1, F.current = !0, j.current = "segment", N(
|
|
395
|
+
q(e) + ze * 1e3
|
|
361
396
|
);
|
|
362
|
-
const
|
|
363
|
-
c.current =
|
|
364
|
-
const
|
|
365
|
-
return
|
|
397
|
+
const Dt = r.shouldResume ?? I();
|
|
398
|
+
c.current = Dt, i(!1);
|
|
399
|
+
const yr = P.current !== ee;
|
|
400
|
+
return B.current = "segment", yr && (n.pause(), n.removeAttribute("src"), n.load(), P.current = ee, n.src = ee, n.load()), x.current = ze, n.readyState > 0 && (n.currentTime = ze, x.current = null), Dt ? v(`start-segment:${t}`) : (c.current = !1, F.current = !1, n.pause(), S(!1), !0);
|
|
366
401
|
},
|
|
367
402
|
[
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
403
|
+
I,
|
|
404
|
+
Wt,
|
|
405
|
+
q,
|
|
406
|
+
N,
|
|
407
|
+
v,
|
|
408
|
+
i
|
|
374
409
|
]
|
|
375
|
-
),
|
|
410
|
+
), le = u(
|
|
411
|
+
(e, t) => {
|
|
412
|
+
const r = g.current;
|
|
413
|
+
if (!r)
|
|
414
|
+
return !1;
|
|
415
|
+
const n = Math.max(Number(t), 0) / 1e3;
|
|
416
|
+
return P.current !== e && (r.pause(), r.removeAttribute("src"), r.load(), P.current = e, B.current = "url", j.current = "url", r.src = e, r.load()), x.current = n, N(n * 1e3), r.readyState > 0 && (r.currentTime = n, x.current = null), !0;
|
|
417
|
+
},
|
|
418
|
+
[N]
|
|
419
|
+
), Ke = u(
|
|
376
420
|
(e) => {
|
|
377
|
-
const t =
|
|
378
|
-
if (!t || !
|
|
421
|
+
const t = g.current;
|
|
422
|
+
if (!t || !f || T)
|
|
379
423
|
return !1;
|
|
380
|
-
const
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
) ?
|
|
384
|
-
|
|
385
|
-
|
|
424
|
+
const r = Math.max(Number(e), 0), n = !t.paused && !t.ended || c.current || F.current || h.current !== null && me.current && !L.current, b = Qe(
|
|
425
|
+
k.current,
|
|
426
|
+
r
|
|
427
|
+
) ? Jt(
|
|
428
|
+
k.current,
|
|
429
|
+
r
|
|
386
430
|
) : null;
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
);
|
|
396
|
-
if (v) {
|
|
397
|
-
const I = u / 1e3;
|
|
398
|
-
return K.current !== v && (t.pause(), t.removeAttribute("src"), t.load(), K.current = v, F.current = "url", J.current = "url", t.src = v, t.load()), T.current = I, C(u), t.readyState > 0 && (t.currentTime = I, T.current = null), n ? L("subtitle-seek-url") : (c.current = !1, t.pause(), h(!1), !0);
|
|
399
|
-
}
|
|
400
|
-
return !1;
|
|
431
|
+
return Ae.current = null, M(), c.current = n, i(!1), n && (O.current = "manual", L.current = !1, V(!0)), b && (B.current === "segment" || !A) ? C(
|
|
432
|
+
b.segmentIndex,
|
|
433
|
+
"subtitle-seek-segment",
|
|
434
|
+
{
|
|
435
|
+
seekTimeSeconds: b.segmentTimeSeconds,
|
|
436
|
+
shouldResume: n
|
|
437
|
+
}
|
|
438
|
+
) : A && le(A, r) ? n ? v("subtitle-seek-url") : (c.current = !1, t.pause(), S(!1), !0) : !1;
|
|
401
439
|
},
|
|
402
440
|
[
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
441
|
+
f,
|
|
442
|
+
A,
|
|
443
|
+
T,
|
|
444
|
+
le,
|
|
406
445
|
C,
|
|
446
|
+
M,
|
|
447
|
+
v,
|
|
448
|
+
i,
|
|
449
|
+
V
|
|
450
|
+
]
|
|
451
|
+
), Rt = u(
|
|
452
|
+
(e) => {
|
|
453
|
+
if (!g.current || !f)
|
|
454
|
+
return !1;
|
|
455
|
+
const r = Math.max(Number(e), 0), n = Qe(
|
|
456
|
+
k.current,
|
|
457
|
+
r
|
|
458
|
+
) ? Jt(
|
|
459
|
+
k.current,
|
|
460
|
+
r
|
|
461
|
+
) : null;
|
|
462
|
+
return c.current = !0, i(!1), n && (B.current === "segment" || !A) ? C(n.segmentIndex, "restore", {
|
|
463
|
+
seekTimeSeconds: n.segmentTimeSeconds,
|
|
464
|
+
shouldResume: !0
|
|
465
|
+
}) : !A || !le(A, r) ? !1 : (v("restore"), !0);
|
|
466
|
+
},
|
|
467
|
+
[
|
|
468
|
+
f,
|
|
407
469
|
A,
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
470
|
+
le,
|
|
471
|
+
C,
|
|
472
|
+
v,
|
|
473
|
+
i
|
|
412
474
|
]
|
|
413
|
-
),
|
|
475
|
+
), Se = u(
|
|
414
476
|
(e) => {
|
|
415
|
-
const t =
|
|
477
|
+
const t = ge(
|
|
416
478
|
e,
|
|
417
|
-
|
|
479
|
+
D(),
|
|
418
480
|
{
|
|
419
|
-
excludeTarget: e === "previous" ?
|
|
481
|
+
excludeTarget: e === "previous" ? he.current : null
|
|
420
482
|
}
|
|
421
483
|
);
|
|
422
484
|
if (t === null)
|
|
423
485
|
return !1;
|
|
424
|
-
if (t.audioIndex ===
|
|
425
|
-
const n =
|
|
426
|
-
return n && (
|
|
486
|
+
if (t.audioIndex === l) {
|
|
487
|
+
const n = Ke(t.timeMs);
|
|
488
|
+
return n && (he.current = t), n;
|
|
427
489
|
}
|
|
428
|
-
const
|
|
490
|
+
const r = !!Me?.(
|
|
429
491
|
t,
|
|
430
|
-
|
|
492
|
+
Ge(X())
|
|
431
493
|
);
|
|
432
|
-
return
|
|
494
|
+
return r && (he.current = t), r;
|
|
433
495
|
},
|
|
434
496
|
[
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
497
|
+
l,
|
|
498
|
+
D,
|
|
499
|
+
X,
|
|
500
|
+
ge,
|
|
501
|
+
Me,
|
|
502
|
+
Ke
|
|
441
503
|
]
|
|
442
|
-
),
|
|
504
|
+
), se = u(
|
|
443
505
|
(e) => {
|
|
444
|
-
|
|
506
|
+
M(), c.current = !1, E.current = !1, F.current = !1, y(), S(!1), i(!1), l >= 0 && nt?.(l);
|
|
445
507
|
},
|
|
446
508
|
[
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
509
|
+
l,
|
|
510
|
+
nt,
|
|
511
|
+
M,
|
|
450
512
|
y,
|
|
451
|
-
|
|
513
|
+
i
|
|
452
514
|
]
|
|
453
|
-
),
|
|
515
|
+
), Fe = u(
|
|
454
516
|
(e) => {
|
|
455
|
-
const t =
|
|
456
|
-
return !t ||
|
|
517
|
+
const t = g.current;
|
|
518
|
+
return !t || B.current !== "url" || !Nr({
|
|
457
519
|
currentTimeSeconds: Math.max(t.currentTime, 0),
|
|
458
520
|
durationSeconds: t.duration
|
|
459
|
-
}) ? !1 : (c.current = !1, t.pause(),
|
|
521
|
+
}) ? !1 : (c.current = !1, t.pause(), se(e), !0);
|
|
460
522
|
},
|
|
461
|
-
[
|
|
462
|
-
),
|
|
463
|
-
const e =
|
|
464
|
-
if (
|
|
465
|
-
|
|
523
|
+
[se]
|
|
524
|
+
), Vt = u(() => {
|
|
525
|
+
const e = K.current + 1, t = k.current, r = t[e], n = de.current, b = t.some((ee) => ee.is_final);
|
|
526
|
+
if (r) {
|
|
527
|
+
C(e, "ended");
|
|
466
528
|
return;
|
|
467
529
|
}
|
|
468
|
-
if (n?.isAudioStreaming || !
|
|
469
|
-
|
|
530
|
+
if (n?.isAudioStreaming || !b) {
|
|
531
|
+
K.current = e, h.current = e, E.current = !0, c.current = w, N(q(e)), S(!1), i(!0, "waitingForMoreAudio");
|
|
470
532
|
return;
|
|
471
533
|
}
|
|
472
|
-
|
|
534
|
+
se("segments-completed");
|
|
473
535
|
}, [
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
536
|
+
w,
|
|
537
|
+
se,
|
|
538
|
+
q,
|
|
539
|
+
N,
|
|
477
540
|
C,
|
|
478
|
-
|
|
479
|
-
l
|
|
541
|
+
i
|
|
480
542
|
]);
|
|
481
|
-
|
|
482
|
-
if (
|
|
543
|
+
m(() => {
|
|
544
|
+
if (Le.current === $e)
|
|
483
545
|
return;
|
|
484
|
-
|
|
485
|
-
const e =
|
|
486
|
-
e && (e.pause(), e.removeAttribute("src"), e.load(),
|
|
546
|
+
$(!0), Le.current = $e, K.current = 0, h.current = null, E.current = !1, L.current = !1, pe.current = !1, c.current = !1, F.current = !1, B.current = null, j.current = null, P.current = null, M(), N(0), i(!1);
|
|
547
|
+
const e = g.current;
|
|
548
|
+
e && (Ie.current = !0, e.pause(), e.removeAttribute("src"), e.load(), Ie.current = !1, S(!1));
|
|
487
549
|
}, [
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
550
|
+
l,
|
|
551
|
+
$e,
|
|
552
|
+
U.length,
|
|
553
|
+
A,
|
|
554
|
+
$,
|
|
555
|
+
N,
|
|
556
|
+
M,
|
|
557
|
+
i
|
|
558
|
+
]), m(() => {
|
|
559
|
+
const e = g.current;
|
|
497
560
|
if (e) {
|
|
498
|
-
if (
|
|
499
|
-
|
|
561
|
+
if (T) {
|
|
562
|
+
pe.current = !!(de.current && !L.current && (!e.paused || c.current || h.current !== null)), c.current = !1, i(!1), e.pause(), S(!1);
|
|
500
563
|
return;
|
|
501
564
|
}
|
|
502
|
-
if (!(!
|
|
503
|
-
if (
|
|
504
|
-
if (
|
|
505
|
-
|
|
565
|
+
if (!(!pe.current || !de.current || L.current)) {
|
|
566
|
+
if (pe.current = !1, h.current !== null) {
|
|
567
|
+
if (h.current < k.current.length) {
|
|
568
|
+
C(h.current, "external-resume");
|
|
506
569
|
return;
|
|
507
570
|
}
|
|
508
|
-
c.current = !0,
|
|
571
|
+
c.current = !0, i(!0, "waitingForMoreAudio");
|
|
509
572
|
return;
|
|
510
573
|
}
|
|
511
|
-
if (!
|
|
512
|
-
|
|
574
|
+
if (!P.current && k.current.length > 0) {
|
|
575
|
+
C(
|
|
513
576
|
Math.min(
|
|
514
|
-
|
|
515
|
-
|
|
577
|
+
K.current,
|
|
578
|
+
k.current.length - 1
|
|
516
579
|
),
|
|
517
580
|
"external-resume-init"
|
|
518
581
|
);
|
|
519
582
|
return;
|
|
520
583
|
}
|
|
521
|
-
e.paused && (c.current = !0,
|
|
584
|
+
e.paused && (c.current = !0, v("external-resume"));
|
|
522
585
|
}
|
|
523
586
|
}
|
|
524
587
|
}, [
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
]),
|
|
530
|
-
const e =
|
|
588
|
+
T,
|
|
589
|
+
C,
|
|
590
|
+
v,
|
|
591
|
+
i
|
|
592
|
+
]), m(() => {
|
|
593
|
+
const e = g.current;
|
|
531
594
|
if (!e)
|
|
532
595
|
return;
|
|
533
|
-
if (!
|
|
534
|
-
|
|
596
|
+
if (!f) {
|
|
597
|
+
ie();
|
|
535
598
|
return;
|
|
536
599
|
}
|
|
537
|
-
if (
|
|
538
|
-
|
|
600
|
+
if (_ && _.id !== Y.current)
|
|
601
|
+
return;
|
|
602
|
+
if (T) {
|
|
603
|
+
c.current = !1, i(!1), e.pause(), S(!1);
|
|
539
604
|
return;
|
|
540
605
|
}
|
|
541
|
-
const t =
|
|
542
|
-
activeSourceType:
|
|
543
|
-
hasAudioUrl: !!
|
|
544
|
-
segmentCount:
|
|
545
|
-
preferredSourceType:
|
|
546
|
-
waitingSegmentIndex:
|
|
606
|
+
const t = Or({
|
|
607
|
+
activeSourceType: B.current,
|
|
608
|
+
hasAudioUrl: !!A,
|
|
609
|
+
segmentCount: U.length,
|
|
610
|
+
preferredSourceType: j.current,
|
|
611
|
+
waitingSegmentIndex: h.current
|
|
547
612
|
});
|
|
548
|
-
if (t &&
|
|
549
|
-
const
|
|
550
|
-
if (
|
|
551
|
-
const
|
|
552
|
-
|
|
613
|
+
if (t && j.current !== t && (j.current = t), t === "url" && A) {
|
|
614
|
+
const r = P.current !== A, n = I();
|
|
615
|
+
if (r) {
|
|
616
|
+
const b = h.current !== null ? Pt() : 0;
|
|
617
|
+
le(A, b * 1e3);
|
|
553
618
|
}
|
|
554
|
-
if (c.current = n,
|
|
555
|
-
c.current = !1, e.pause(),
|
|
619
|
+
if (c.current = n, E.current = !1, F.current = !1, i(!1), !n) {
|
|
620
|
+
c.current = !1, e.pause(), S(!1);
|
|
556
621
|
return;
|
|
557
622
|
}
|
|
558
|
-
|
|
623
|
+
v(r ? "sync-url-init" : "sync-url");
|
|
559
624
|
return;
|
|
560
625
|
}
|
|
561
|
-
if (t === "segment" &&
|
|
562
|
-
if (
|
|
563
|
-
if (
|
|
564
|
-
|
|
626
|
+
if (t === "segment" && h.current !== null) {
|
|
627
|
+
if (h.current < U.length) {
|
|
628
|
+
if (L.current) {
|
|
629
|
+
S(!1), i(!1);
|
|
565
630
|
return;
|
|
566
631
|
}
|
|
567
|
-
|
|
632
|
+
C(h.current, "wait-resume");
|
|
568
633
|
return;
|
|
569
634
|
}
|
|
570
|
-
|
|
635
|
+
E.current = !0, c.current = I(), S(!1), i(I());
|
|
571
636
|
return;
|
|
572
637
|
}
|
|
573
|
-
if (t === "segment" && !
|
|
574
|
-
if (
|
|
575
|
-
|
|
638
|
+
if (t === "segment" && !U.length) {
|
|
639
|
+
if (f.isAudioStreaming) {
|
|
640
|
+
h.current = K.current, E.current = !0, c.current = I(), S(!1), i(I());
|
|
576
641
|
return;
|
|
577
642
|
}
|
|
578
|
-
|
|
643
|
+
ie();
|
|
579
644
|
return;
|
|
580
645
|
}
|
|
581
|
-
if (t === "segment" && !
|
|
582
|
-
|
|
646
|
+
if (t === "segment" && !P.current) {
|
|
647
|
+
C(
|
|
583
648
|
Math.min(
|
|
584
|
-
|
|
585
|
-
|
|
649
|
+
K.current,
|
|
650
|
+
U.length - 1
|
|
586
651
|
),
|
|
587
652
|
"effect-init"
|
|
588
653
|
);
|
|
589
654
|
return;
|
|
590
655
|
}
|
|
591
656
|
if (t !== "segment") {
|
|
592
|
-
|
|
657
|
+
ie();
|
|
593
658
|
return;
|
|
594
659
|
}
|
|
595
|
-
if (!
|
|
596
|
-
c.current = !1, e.pause(),
|
|
660
|
+
if (!w || L.current) {
|
|
661
|
+
c.current = !1, e.pause(), S(!1);
|
|
597
662
|
return;
|
|
598
663
|
}
|
|
599
|
-
e.paused && (c.current = !0,
|
|
664
|
+
e.paused && (c.current = !0, v("sync-paused-retry"));
|
|
600
665
|
}, [
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
k,
|
|
666
|
+
f,
|
|
667
|
+
l,
|
|
668
|
+
U,
|
|
669
|
+
A,
|
|
606
670
|
w,
|
|
607
|
-
|
|
671
|
+
T,
|
|
672
|
+
_,
|
|
673
|
+
I,
|
|
674
|
+
ie,
|
|
675
|
+
le,
|
|
608
676
|
C,
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
l
|
|
614
|
-
]), b(() => {
|
|
615
|
-
if (!V || V.id === ct.current || V.audioIndex !== a)
|
|
677
|
+
v,
|
|
678
|
+
Pt,
|
|
679
|
+
i
|
|
680
|
+
]), m(() => {
|
|
681
|
+
if (!H || H.id === St.current || H.audioIndex !== l)
|
|
616
682
|
return;
|
|
617
|
-
const e =
|
|
618
|
-
|
|
683
|
+
const e = d[H.audioIndex];
|
|
684
|
+
Ne(e, H.timeMs) && (St.current = H.id, Ke(H.timeMs));
|
|
619
685
|
}, [
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
]),
|
|
626
|
-
|
|
627
|
-
|
|
686
|
+
d,
|
|
687
|
+
Ne,
|
|
688
|
+
l,
|
|
689
|
+
Ke,
|
|
690
|
+
H
|
|
691
|
+
]), m(() => {
|
|
692
|
+
if (!(!_ || _.id === Y.current || l < 0)) {
|
|
693
|
+
if (Rt(_.timeMs)) {
|
|
694
|
+
Y.current = _.id, ce?.(_.id);
|
|
695
|
+
return;
|
|
696
|
+
}
|
|
697
|
+
f?.isAudioStreaming || (Y.current = _.id, ce?.(_.id));
|
|
698
|
+
}
|
|
628
699
|
}, [
|
|
629
|
-
|
|
630
|
-
|
|
700
|
+
f?.isAudioStreaming,
|
|
701
|
+
l,
|
|
702
|
+
ce,
|
|
703
|
+
_,
|
|
704
|
+
Rt
|
|
705
|
+
]), m(() => {
|
|
706
|
+
if (!_ || _.id === Y.current || l < 0 || !f?.isAudioStreaming)
|
|
707
|
+
return;
|
|
708
|
+
const e = window.setTimeout(() => {
|
|
709
|
+
_.id !== Y.current && (Y.current = _.id, ce?.(_.id));
|
|
710
|
+
}, un);
|
|
711
|
+
return () => {
|
|
712
|
+
window.clearTimeout(e);
|
|
713
|
+
};
|
|
714
|
+
}, [
|
|
715
|
+
f?.isAudioStreaming,
|
|
716
|
+
l,
|
|
717
|
+
ce,
|
|
718
|
+
_
|
|
719
|
+
]), m(() => ie, [ie]), m(() => M, [M]);
|
|
720
|
+
const ar = u(() => {
|
|
721
|
+
y(), Ot(), S(!0), i(!1), et?.();
|
|
722
|
+
}, [
|
|
723
|
+
et,
|
|
724
|
+
Ot,
|
|
631
725
|
y,
|
|
632
|
-
|
|
633
|
-
]),
|
|
634
|
-
|
|
635
|
-
}, [
|
|
636
|
-
const e =
|
|
637
|
-
e &&
|
|
726
|
+
i
|
|
727
|
+
]), cr = u(() => {
|
|
728
|
+
Ie.current || E.current || F.current || (M(), y(), $(!0), S(!1));
|
|
729
|
+
}, [$, M, y]), or = u(() => {
|
|
730
|
+
const e = g.current;
|
|
731
|
+
e && x.current !== null && (e.currentTime = x.current, x.current = null), y(), !Fe("canplay-seek-finished") && (!c.current || !w || v("canplay"));
|
|
638
732
|
}, [
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
733
|
+
l,
|
|
734
|
+
w,
|
|
735
|
+
Fe,
|
|
642
736
|
y,
|
|
643
|
-
|
|
644
|
-
]),
|
|
645
|
-
const e =
|
|
646
|
-
e &&
|
|
647
|
-
}, [
|
|
648
|
-
y();
|
|
649
|
-
}, [y]),
|
|
650
|
-
|
|
651
|
-
}, [
|
|
652
|
-
if (
|
|
653
|
-
|
|
737
|
+
v
|
|
738
|
+
]), fr = u(() => {
|
|
739
|
+
const e = g.current;
|
|
740
|
+
e && x.current !== null && (e.currentTime = x.current, x.current = null), y(), Fe("metadata-seek-finished");
|
|
741
|
+
}, [l, Fe, y]), dr = u(() => {
|
|
742
|
+
y(), $();
|
|
743
|
+
}, [$, y]), mr = u(() => {
|
|
744
|
+
E.current || i(!0, "loadingAudio");
|
|
745
|
+
}, [i]), pr = u(() => {
|
|
746
|
+
if (E.current) {
|
|
747
|
+
i(!0, "waitingForMoreAudio");
|
|
654
748
|
return;
|
|
655
749
|
}
|
|
656
|
-
|
|
657
|
-
}, [
|
|
750
|
+
i(!0, "loadingAudio");
|
|
751
|
+
}, [i]), Ht = u(() => {
|
|
658
752
|
y();
|
|
659
|
-
}, [y]),
|
|
660
|
-
const e =
|
|
661
|
-
|
|
662
|
-
|
|
753
|
+
}, [y]), hr = u(() => {
|
|
754
|
+
const e = de.current, t = B.current === "url" || k.current.length === 0, r = !!k.current[K.current + 1], n = k.current.some(
|
|
755
|
+
(ee) => ee.is_final
|
|
756
|
+
), b = !!e?.isAudioStreaming;
|
|
757
|
+
if ($(
|
|
758
|
+
!0,
|
|
759
|
+
t || !b && !r && n
|
|
760
|
+
), M(), F.current = !1, t) {
|
|
761
|
+
se("url-ended");
|
|
663
762
|
return;
|
|
664
763
|
}
|
|
665
|
-
|
|
666
|
-
}, [
|
|
667
|
-
|
|
668
|
-
|
|
764
|
+
Vt();
|
|
765
|
+
}, [
|
|
766
|
+
$,
|
|
767
|
+
se,
|
|
768
|
+
Vt,
|
|
769
|
+
M
|
|
770
|
+
]), gr = u(() => {
|
|
771
|
+
M(), y(), S(!1), i(!1);
|
|
772
|
+
}, [M, y, i]), Sr = u(
|
|
669
773
|
(e) => {
|
|
670
|
-
|
|
774
|
+
rt?.(e), ne(!1);
|
|
671
775
|
},
|
|
672
|
-
[
|
|
673
|
-
),
|
|
674
|
-
if (
|
|
675
|
-
const t = !
|
|
676
|
-
return
|
|
776
|
+
[rt]
|
|
777
|
+
), Ze = u(() => {
|
|
778
|
+
if (W) {
|
|
779
|
+
const t = !Z;
|
|
780
|
+
return V(t), ut?.(t), !0;
|
|
677
781
|
}
|
|
678
|
-
const e =
|
|
679
|
-
return
|
|
782
|
+
const e = g.current;
|
|
783
|
+
return T || !e || !f ? !1 : h.current !== null ? Ce ? (V(!1), c.current = !1, L.current = !0, h.current = null, E.current = !1, S(!1), i(!1), e.pause(), !0) : (V(!0), O.current = "manual", L.current = !1, c.current = !0, i(!0, "waitingForMoreAudio"), !0) : !e.src && U.length > 0 ? (V(!0), O.current = "manual", L.current = !1, C(
|
|
680
784
|
Math.min(
|
|
681
|
-
|
|
682
|
-
|
|
785
|
+
K.current,
|
|
786
|
+
U.length - 1
|
|
683
787
|
),
|
|
684
788
|
"toggle"
|
|
685
|
-
), !0) : e.paused ? (
|
|
789
|
+
), !0) : e.paused ? (V(!0), O.current = "manual", L.current = !1, c.current = !0, v("toggle-resume"), !0) : (V(!1), c.current = !1, L.current = !0, e.pause(), !0);
|
|
686
790
|
}, [
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
791
|
+
f,
|
|
792
|
+
U.length,
|
|
793
|
+
Z,
|
|
794
|
+
T,
|
|
795
|
+
Ce,
|
|
796
|
+
ut,
|
|
797
|
+
C,
|
|
798
|
+
v,
|
|
799
|
+
i,
|
|
800
|
+
V,
|
|
801
|
+
W
|
|
698
802
|
]);
|
|
699
|
-
|
|
700
|
-
if (
|
|
701
|
-
return
|
|
702
|
-
}, [
|
|
703
|
-
const
|
|
803
|
+
m(() => {
|
|
804
|
+
if (R)
|
|
805
|
+
return Ur(G);
|
|
806
|
+
}, [G, R]);
|
|
807
|
+
const je = ae(
|
|
704
808
|
() => ({
|
|
705
|
-
fullscreen: () =>
|
|
706
|
-
next: () =>
|
|
707
|
-
|
|
809
|
+
fullscreen: () => fe ? (fe(), !0) : !1,
|
|
810
|
+
next: () => _e ? (Pe || _e(
|
|
811
|
+
Ge(X())
|
|
708
812
|
), !0) : !1,
|
|
709
|
-
nextSubtitle: () =>
|
|
710
|
-
previous: () =>
|
|
711
|
-
|
|
813
|
+
nextSubtitle: () => ue.next ? Se("next") : !0,
|
|
814
|
+
previous: () => be ? (We || be(
|
|
815
|
+
Ge(X())
|
|
712
816
|
), !0) : !1,
|
|
713
|
-
previousSubtitle: () =>
|
|
714
|
-
subtitle: () =>
|
|
715
|
-
togglePlayback: () => (
|
|
817
|
+
previousSubtitle: () => ue.previous ? Se("previous") : !0,
|
|
818
|
+
subtitle: () => oe ? (oe(), !0) : !1,
|
|
819
|
+
togglePlayback: () => (Ze(), !0)
|
|
716
820
|
}),
|
|
717
821
|
[
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
ue,
|
|
722
|
-
de,
|
|
822
|
+
X,
|
|
823
|
+
Se,
|
|
824
|
+
Pe,
|
|
723
825
|
fe,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
826
|
+
_e,
|
|
827
|
+
be,
|
|
828
|
+
oe,
|
|
829
|
+
We,
|
|
830
|
+
ue.next,
|
|
831
|
+
ue.previous,
|
|
832
|
+
Ze
|
|
729
833
|
]
|
|
730
|
-
),
|
|
731
|
-
return
|
|
732
|
-
|
|
733
|
-
}, [
|
|
734
|
-
if (!
|
|
834
|
+
), It = s(je);
|
|
835
|
+
return m(() => {
|
|
836
|
+
It.current = je;
|
|
837
|
+
}, [je]), m(() => {
|
|
838
|
+
if (!R || typeof document > "u")
|
|
735
839
|
return;
|
|
736
840
|
const e = (t) => {
|
|
737
|
-
if (!
|
|
841
|
+
if (!Br(G))
|
|
738
842
|
return;
|
|
739
|
-
const
|
|
740
|
-
if (!
|
|
843
|
+
const r = Wr(t, mt());
|
|
844
|
+
if (!r || Pr(t, r))
|
|
741
845
|
return;
|
|
742
846
|
let n = !1;
|
|
743
|
-
const
|
|
744
|
-
n =
|
|
847
|
+
const b = It.current[r];
|
|
848
|
+
n = b(), n && t.preventDefault();
|
|
745
849
|
};
|
|
746
850
|
return document.addEventListener("keydown", e), () => {
|
|
747
851
|
document.removeEventListener("keydown", e);
|
|
748
852
|
};
|
|
749
|
-
}, [
|
|
750
|
-
|
|
751
|
-
}, [
|
|
853
|
+
}, [G, mt, R]), m(() => {
|
|
854
|
+
ye?.(ve.current);
|
|
855
|
+
}, [ye]), /* @__PURE__ */ te(
|
|
752
856
|
"div",
|
|
753
857
|
{
|
|
754
|
-
...
|
|
755
|
-
dir:
|
|
756
|
-
lang:
|
|
757
|
-
"data-slide-player-shortcut-owner":
|
|
758
|
-
className:
|
|
759
|
-
onFocusCapture:
|
|
760
|
-
onPointerDown:
|
|
858
|
+
...Re,
|
|
859
|
+
dir: Ve,
|
|
860
|
+
lang: ot,
|
|
861
|
+
"data-slide-player-shortcut-owner": G,
|
|
862
|
+
className: Ar("slide-player", p),
|
|
863
|
+
onFocusCapture: sr,
|
|
864
|
+
onPointerDown: lr,
|
|
761
865
|
children: [
|
|
762
|
-
/* @__PURE__ */
|
|
866
|
+
/* @__PURE__ */ a(
|
|
763
867
|
"audio",
|
|
764
868
|
{
|
|
765
|
-
ref:
|
|
869
|
+
ref: g,
|
|
766
870
|
preload: "auto",
|
|
767
871
|
playsInline: !0,
|
|
768
|
-
onLoadStart:
|
|
769
|
-
onLoadedMetadata:
|
|
770
|
-
onCanPlay:
|
|
771
|
-
onPlay:
|
|
772
|
-
onPause:
|
|
773
|
-
onWaiting:
|
|
774
|
-
onSeeking:
|
|
775
|
-
onSeeked:
|
|
776
|
-
onTimeUpdate:
|
|
777
|
-
onEnded:
|
|
778
|
-
onError:
|
|
872
|
+
onLoadStart: mr,
|
|
873
|
+
onLoadedMetadata: fr,
|
|
874
|
+
onCanPlay: or,
|
|
875
|
+
onPlay: ar,
|
|
876
|
+
onPause: cr,
|
|
877
|
+
onWaiting: pr,
|
|
878
|
+
onSeeking: Ht,
|
|
879
|
+
onSeeked: Ht,
|
|
880
|
+
onTimeUpdate: dr,
|
|
881
|
+
onEnded: hr,
|
|
882
|
+
onError: gr
|
|
779
883
|
}
|
|
780
884
|
),
|
|
781
|
-
|
|
782
|
-
/* @__PURE__ */
|
|
783
|
-
|
|
885
|
+
Oe ? /* @__PURE__ */ te($t, { children: [
|
|
886
|
+
/* @__PURE__ */ a(
|
|
887
|
+
Cr,
|
|
784
888
|
{
|
|
785
|
-
container:
|
|
786
|
-
dir:
|
|
787
|
-
lang:
|
|
889
|
+
container: Gt,
|
|
890
|
+
dir: Ve ?? dt,
|
|
891
|
+
lang: tr,
|
|
788
892
|
labels: {
|
|
789
|
-
closeSettings:
|
|
790
|
-
fullscreen:
|
|
791
|
-
nonFullscreen:
|
|
792
|
-
screen:
|
|
793
|
-
screenMode:
|
|
794
|
-
subtitle:
|
|
795
|
-
subtitleToggle:
|
|
796
|
-
title:
|
|
893
|
+
closeSettings: o.closeSettingsLabel,
|
|
894
|
+
fullscreen: o.fullscreenLabel,
|
|
895
|
+
nonFullscreen: o.nonFullscreenLabel,
|
|
896
|
+
screen: o.screenLabel,
|
|
897
|
+
screenMode: o.screenModeLabel,
|
|
898
|
+
subtitle: o.subtitleLabel,
|
|
899
|
+
subtitleToggle: o.subtitleToggleAriaLabel,
|
|
900
|
+
title: o.settingsTitle
|
|
797
901
|
},
|
|
798
|
-
isSubtitleEnabled:
|
|
799
|
-
onClose: () =>
|
|
800
|
-
onOpenChange:
|
|
801
|
-
onSubtitleToggle:
|
|
902
|
+
isSubtitleEnabled: Be,
|
|
903
|
+
onClose: () => ne(!1),
|
|
904
|
+
onOpenChange: ne,
|
|
905
|
+
onSubtitleToggle: oe ?? (() => {
|
|
802
906
|
}),
|
|
803
|
-
onViewModeChange:
|
|
804
|
-
open:
|
|
805
|
-
viewMode:
|
|
907
|
+
onViewModeChange: Sr,
|
|
908
|
+
open: wt,
|
|
909
|
+
viewMode: Yt
|
|
806
910
|
}
|
|
807
911
|
),
|
|
808
|
-
/* @__PURE__ */
|
|
912
|
+
/* @__PURE__ */ te(
|
|
809
913
|
"div",
|
|
810
914
|
{
|
|
811
915
|
className: "slide-player__controls",
|
|
812
|
-
onPointerEnter:
|
|
813
|
-
onPointerLeave:
|
|
814
|
-
style:
|
|
916
|
+
onPointerEnter: Qt,
|
|
917
|
+
onPointerLeave: Xt,
|
|
918
|
+
style: ur,
|
|
815
919
|
children: [
|
|
816
|
-
/* @__PURE__ */
|
|
817
|
-
/* @__PURE__ */
|
|
920
|
+
/* @__PURE__ */ te("div", { className: "slide-player__group", children: [
|
|
921
|
+
/* @__PURE__ */ a(
|
|
818
922
|
"button",
|
|
819
923
|
{
|
|
820
|
-
"aria-expanded":
|
|
924
|
+
"aria-expanded": wt,
|
|
821
925
|
"aria-haspopup": "dialog",
|
|
822
|
-
"aria-label":
|
|
926
|
+
"aria-label": o.moreOptionsAriaLabel,
|
|
823
927
|
className: "slide-player__action slide-player__action--mobile-more",
|
|
824
928
|
onClick: () => {
|
|
825
|
-
|
|
929
|
+
ne((e) => !e);
|
|
826
930
|
},
|
|
827
931
|
type: "button",
|
|
828
|
-
children: /* @__PURE__ */
|
|
829
|
-
|
|
932
|
+
children: /* @__PURE__ */ a(
|
|
933
|
+
Dr,
|
|
830
934
|
{
|
|
831
935
|
className: "slide-player__icon",
|
|
832
936
|
strokeWidth: 2.25
|
|
@@ -834,58 +938,58 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
834
938
|
)
|
|
835
939
|
}
|
|
836
940
|
),
|
|
837
|
-
/* @__PURE__ */
|
|
941
|
+
/* @__PURE__ */ a(
|
|
838
942
|
"button",
|
|
839
943
|
{
|
|
840
|
-
"aria-label":
|
|
944
|
+
"aria-label": o.volumeAriaLabel,
|
|
841
945
|
className: "hidden",
|
|
842
946
|
type: "button",
|
|
843
|
-
children: /* @__PURE__ */
|
|
947
|
+
children: /* @__PURE__ */ a($r, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
844
948
|
}
|
|
845
949
|
),
|
|
846
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ a(
|
|
847
951
|
"button",
|
|
848
952
|
{
|
|
849
|
-
"aria-label":
|
|
850
|
-
"aria-keyshortcuts":
|
|
953
|
+
"aria-label": vt,
|
|
954
|
+
"aria-keyshortcuts": Nt.ariaKeyShortcuts,
|
|
851
955
|
className: "slide-player__toggle slide-player__toggle--playback",
|
|
852
956
|
onClick: () => {
|
|
853
|
-
|
|
957
|
+
Ze();
|
|
854
958
|
},
|
|
855
|
-
title:
|
|
959
|
+
title: Nt.title,
|
|
856
960
|
type: "button",
|
|
857
|
-
children:
|
|
961
|
+
children: ir ? /* @__PURE__ */ a(tn, {}) : /* @__PURE__ */ a(rn, {})
|
|
858
962
|
}
|
|
859
963
|
),
|
|
860
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ a(
|
|
861
965
|
"button",
|
|
862
966
|
{
|
|
863
|
-
"aria-keyshortcuts":
|
|
864
|
-
"aria-label":
|
|
967
|
+
"aria-keyshortcuts": xt.ariaKeyShortcuts,
|
|
968
|
+
"aria-label": o.previousLabel,
|
|
865
969
|
className: "slide-player__action slide-player__action--prev",
|
|
866
|
-
disabled:
|
|
970
|
+
disabled: We,
|
|
867
971
|
onClick: () => {
|
|
868
|
-
|
|
972
|
+
be?.(X());
|
|
869
973
|
},
|
|
870
|
-
title:
|
|
974
|
+
title: xt.title,
|
|
871
975
|
type: "button",
|
|
872
|
-
children: /* @__PURE__ */
|
|
976
|
+
children: /* @__PURE__ */ a(Jr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
873
977
|
}
|
|
874
978
|
),
|
|
875
|
-
/* @__PURE__ */
|
|
979
|
+
/* @__PURE__ */ a(
|
|
876
980
|
"button",
|
|
877
981
|
{
|
|
878
|
-
"aria-keyshortcuts":
|
|
879
|
-
"aria-label":
|
|
982
|
+
"aria-keyshortcuts": Kt.ariaKeyShortcuts,
|
|
983
|
+
"aria-label": o.nextLabel,
|
|
880
984
|
className: "slide-player__action slide-player__action--next",
|
|
881
|
-
disabled:
|
|
985
|
+
disabled: Pe,
|
|
882
986
|
onClick: () => {
|
|
883
|
-
|
|
987
|
+
_e?.(X());
|
|
884
988
|
},
|
|
885
|
-
title:
|
|
989
|
+
title: Kt.title,
|
|
886
990
|
type: "button",
|
|
887
|
-
children: /* @__PURE__ */
|
|
888
|
-
|
|
991
|
+
children: /* @__PURE__ */ a(
|
|
992
|
+
Zr,
|
|
889
993
|
{
|
|
890
994
|
className: "slide-player__icon",
|
|
891
995
|
strokeWidth: 2.25
|
|
@@ -893,35 +997,35 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
893
997
|
)
|
|
894
998
|
}
|
|
895
999
|
),
|
|
896
|
-
/* @__PURE__ */
|
|
1000
|
+
/* @__PURE__ */ a(
|
|
897
1001
|
"button",
|
|
898
1002
|
{
|
|
899
|
-
"aria-keyshortcuts":
|
|
900
|
-
"aria-label":
|
|
1003
|
+
"aria-keyshortcuts": Et.ariaKeyShortcuts,
|
|
1004
|
+
"aria-label": o.previousSubtitleLabel,
|
|
901
1005
|
className: "slide-player__action slide-player__action--prev-subtitle",
|
|
902
|
-
disabled: !
|
|
1006
|
+
disabled: !ue.previous,
|
|
903
1007
|
onClick: () => {
|
|
904
|
-
|
|
1008
|
+
Se("previous");
|
|
905
1009
|
},
|
|
906
|
-
title:
|
|
1010
|
+
title: Et.title,
|
|
907
1011
|
type: "button",
|
|
908
|
-
children: /* @__PURE__ */
|
|
1012
|
+
children: /* @__PURE__ */ a(jr, { className: "slide-player__icon", strokeWidth: 2.25 })
|
|
909
1013
|
}
|
|
910
1014
|
),
|
|
911
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ a(
|
|
912
1016
|
"button",
|
|
913
1017
|
{
|
|
914
|
-
"aria-keyshortcuts":
|
|
915
|
-
"aria-label":
|
|
1018
|
+
"aria-keyshortcuts": Ft.ariaKeyShortcuts,
|
|
1019
|
+
"aria-label": o.nextSubtitleLabel,
|
|
916
1020
|
className: "slide-player__action slide-player__action--next-subtitle",
|
|
917
|
-
disabled: !
|
|
1021
|
+
disabled: !ue.next,
|
|
918
1022
|
onClick: () => {
|
|
919
|
-
|
|
1023
|
+
Se("next");
|
|
920
1024
|
},
|
|
921
|
-
title:
|
|
1025
|
+
title: Ft.title,
|
|
922
1026
|
type: "button",
|
|
923
|
-
children: /* @__PURE__ */
|
|
924
|
-
|
|
1027
|
+
children: /* @__PURE__ */ a(
|
|
1028
|
+
zr,
|
|
925
1029
|
{
|
|
926
1030
|
className: "slide-player__icon",
|
|
927
1031
|
strokeWidth: 2.25
|
|
@@ -929,18 +1033,18 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
929
1033
|
)
|
|
930
1034
|
}
|
|
931
1035
|
),
|
|
932
|
-
/* @__PURE__ */
|
|
1036
|
+
/* @__PURE__ */ a(
|
|
933
1037
|
"button",
|
|
934
1038
|
{
|
|
935
|
-
"aria-label":
|
|
936
|
-
"aria-keyshortcuts":
|
|
937
|
-
"aria-pressed":
|
|
1039
|
+
"aria-label": o.subtitleToggleAriaLabel,
|
|
1040
|
+
"aria-keyshortcuts": Ct.ariaKeyShortcuts,
|
|
1041
|
+
"aria-pressed": Be,
|
|
938
1042
|
className: "slide-player__action slide-player__action--subtitle",
|
|
939
|
-
onClick:
|
|
940
|
-
title:
|
|
1043
|
+
onClick: oe,
|
|
1044
|
+
title: Ct.title,
|
|
941
1045
|
type: "button",
|
|
942
|
-
children:
|
|
943
|
-
|
|
1046
|
+
children: Be ? /* @__PURE__ */ a(Yr, { className: "slide-player__icon", strokeWidth: 2.25 }) : /* @__PURE__ */ a(
|
|
1047
|
+
Gr,
|
|
944
1048
|
{
|
|
945
1049
|
className: "slide-player__icon",
|
|
946
1050
|
strokeWidth: 2.25
|
|
@@ -948,23 +1052,23 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
948
1052
|
)
|
|
949
1053
|
}
|
|
950
1054
|
),
|
|
951
|
-
|
|
1055
|
+
fe ? /* @__PURE__ */ a(
|
|
952
1056
|
"button",
|
|
953
1057
|
{
|
|
954
|
-
"aria-label":
|
|
955
|
-
"aria-keyshortcuts":
|
|
1058
|
+
"aria-label": At,
|
|
1059
|
+
"aria-keyshortcuts": Ut.ariaKeyShortcuts,
|
|
956
1060
|
className: "slide-player__action slide-player__action--fullscreen",
|
|
957
|
-
onClick:
|
|
958
|
-
title:
|
|
1061
|
+
onClick: fe,
|
|
1062
|
+
title: Ut.title,
|
|
959
1063
|
type: "button",
|
|
960
|
-
children:
|
|
961
|
-
|
|
1064
|
+
children: tt ? /* @__PURE__ */ a(
|
|
1065
|
+
Qr,
|
|
962
1066
|
{
|
|
963
1067
|
className: "slide-player__icon",
|
|
964
1068
|
strokeWidth: 2.25
|
|
965
1069
|
}
|
|
966
|
-
) : /* @__PURE__ */
|
|
967
|
-
|
|
1070
|
+
) : /* @__PURE__ */ a(
|
|
1071
|
+
Xr,
|
|
968
1072
|
{
|
|
969
1073
|
className: "slide-player__icon",
|
|
970
1074
|
strokeWidth: 2.25
|
|
@@ -973,9 +1077,9 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
973
1077
|
}
|
|
974
1078
|
) : null
|
|
975
1079
|
] }),
|
|
976
|
-
|
|
977
|
-
/* @__PURE__ */
|
|
978
|
-
/* @__PURE__ */
|
|
1080
|
+
De.length > 0 ? /* @__PURE__ */ te($t, { children: [
|
|
1081
|
+
/* @__PURE__ */ a("div", { className: "slide-player__separator" }),
|
|
1082
|
+
/* @__PURE__ */ a("div", { className: "slide-player__group slide-player__group--custom-actions", children: De.map((e, t) => /* @__PURE__ */ a(br.Fragment, { children: e }, `custom-action-${t}`)) })
|
|
979
1083
|
] }) : null
|
|
980
1084
|
]
|
|
981
1085
|
}
|
|
@@ -984,9 +1088,9 @@ const Ut = /* @__PURE__ */ new Map(), Ft = (f) => {
|
|
|
984
1088
|
]
|
|
985
1089
|
}
|
|
986
1090
|
);
|
|
987
|
-
},
|
|
988
|
-
|
|
1091
|
+
}, an = _r(sn);
|
|
1092
|
+
an.displayName = "Player";
|
|
989
1093
|
export {
|
|
990
|
-
|
|
1094
|
+
an as default
|
|
991
1095
|
};
|
|
992
1096
|
//# sourceMappingURL=Player.es.js.map
|