@djangocfg/ui-tools 2.1.334 → 2.1.336
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/README.md +68 -2
- package/dist/ChatRoot-IIYQEWUU.mjs +5 -0
- package/dist/ChatRoot-IIYQEWUU.mjs.map +1 -0
- package/dist/ChatRoot-PNNGQCYF.css +7 -0
- package/dist/ChatRoot-PNNGQCYF.css.map +1 -0
- package/dist/ChatRoot-UUKTYM4N.cjs +14 -0
- package/dist/ChatRoot-UUKTYM4N.cjs.map +1 -0
- package/dist/{CronScheduler.client-3O3VU4CI.mjs → CronScheduler.client-DLMXCPAJ.mjs} +4 -4
- package/dist/{CronScheduler.client-3O3VU4CI.mjs.map → CronScheduler.client-DLMXCPAJ.mjs.map} +1 -1
- package/dist/{CronScheduler.client-A4GO6YBY.cjs → CronScheduler.client-WEJF4PWQ.cjs} +14 -14
- package/dist/{CronScheduler.client-A4GO6YBY.cjs.map → CronScheduler.client-WEJF4PWQ.cjs.map} +1 -1
- package/dist/{DocsLayout-XLDB6CJ2.cjs → DocsLayout-N5ZJZPBY.cjs} +200 -199
- package/dist/DocsLayout-N5ZJZPBY.cjs.map +1 -0
- package/dist/{DocsLayout-CTJINVBM.mjs → DocsLayout-VFPPNKSQ.mjs} +7 -6
- package/dist/DocsLayout-VFPPNKSQ.mjs.map +1 -0
- package/dist/JsonSchemaForm-DD7CLRIG.cjs +13 -0
- package/dist/{JsonSchemaForm-OSPUUUHM.cjs.map → JsonSchemaForm-DD7CLRIG.cjs.map} +1 -1
- package/dist/JsonSchemaForm-XKUIVELK.mjs +4 -0
- package/dist/{JsonSchemaForm-TSLX2GRO.mjs.map → JsonSchemaForm-XKUIVELK.mjs.map} +1 -1
- package/dist/JsonTree-55625VVH.mjs +5 -0
- package/dist/{JsonTree-F27RMYSI.cjs.map → JsonTree-55625VVH.mjs.map} +1 -1
- package/dist/JsonTree-DCM5QGWF.cjs +11 -0
- package/dist/{JsonTree-QTJYSHCV.mjs.map → JsonTree-DCM5QGWF.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-6WVWDO75.cjs → LottiePlayer.client-2S7ISJ2S.cjs} +6 -6
- package/dist/{LottiePlayer.client-6WVWDO75.cjs.map → LottiePlayer.client-2S7ISJ2S.cjs.map} +1 -1
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs → LottiePlayer.client-5LDSSJWS.mjs} +4 -4
- package/dist/{LottiePlayer.client-B4I6WNZM.mjs.map → LottiePlayer.client-5LDSSJWS.mjs.map} +1 -1
- package/dist/{MapContainer-RYG4HPH4.cjs → MapContainer-76YL2JXL.cjs} +8 -8
- package/dist/{MapContainer-RYG4HPH4.cjs.map → MapContainer-76YL2JXL.cjs.map} +1 -1
- package/dist/{MapContainer-GXQLP5WY.mjs → MapContainer-7HXBI3OH.mjs} +3 -3
- package/dist/{MapContainer-GXQLP5WY.mjs.map → MapContainer-7HXBI3OH.mjs.map} +1 -1
- package/dist/{Mermaid.client-SXRRI2YW.mjs → Mermaid.client-NL4SVR7F.mjs} +4 -4
- package/dist/{Mermaid.client-SXRRI2YW.mjs.map → Mermaid.client-NL4SVR7F.mjs.map} +1 -1
- package/dist/{Mermaid.client-W76R5AKJ.cjs → Mermaid.client-NNTI6DFX.cjs} +26 -26
- package/dist/{Mermaid.client-W76R5AKJ.cjs.map → Mermaid.client-NNTI6DFX.cjs.map} +1 -1
- package/dist/Player-BRV7XTWR.mjs +4 -0
- package/dist/{Player-M3GC3VPE.mjs.map → Player-BRV7XTWR.mjs.map} +1 -1
- package/dist/Player-PM7F7DD7.cjs +13 -0
- package/dist/{Player-ZL2X5LGG.cjs.map → Player-PM7F7DD7.cjs.map} +1 -1
- package/dist/{PrettyCode.client-RPDIE5CH.cjs → PrettyCode.client-KOHDVPPN.cjs} +13 -13
- package/dist/{PrettyCode.client-RPDIE5CH.cjs.map → PrettyCode.client-KOHDVPPN.cjs.map} +1 -1
- package/dist/{PrettyCode.client-SPMTQEG4.mjs → PrettyCode.client-ZGYGKE7G.mjs} +4 -4
- package/dist/{PrettyCode.client-SPMTQEG4.mjs.map → PrettyCode.client-ZGYGKE7G.mjs.map} +1 -1
- package/dist/TreeRoot-N72OYKXU.cjs +19 -0
- package/dist/{TreeRoot-A3J65L6F.mjs.map → TreeRoot-N72OYKXU.cjs.map} +1 -1
- package/dist/TreeRoot-VGAIXCUA.mjs +4 -0
- package/dist/{TreeRoot-DSK5JILT.cjs.map → TreeRoot-VGAIXCUA.mjs.map} +1 -1
- package/dist/chunk-2ZLKZ5VR.mjs +631 -0
- package/dist/chunk-2ZLKZ5VR.mjs.map +1 -0
- package/dist/{chunk-LFWQ36LJ.mjs → chunk-5G5YBFS6.mjs} +4 -4
- package/dist/{chunk-LFWQ36LJ.mjs.map → chunk-5G5YBFS6.mjs.map} +1 -1
- package/dist/{chunk-IHAY6FO6.cjs → chunk-5I5QNGUG.cjs} +17 -17
- package/dist/{chunk-IHAY6FO6.cjs.map → chunk-5I5QNGUG.cjs.map} +1 -1
- package/dist/{chunk-F2CMIIOH.cjs → chunk-76NNDZH6.cjs} +42 -42
- package/dist/{chunk-F2CMIIOH.cjs.map → chunk-76NNDZH6.cjs.map} +1 -1
- package/dist/chunk-B5AWZOHJ.cjs +649 -0
- package/dist/chunk-B5AWZOHJ.cjs.map +1 -0
- package/dist/{chunk-KR6B3LVY.mjs → chunk-B6IR5KSC.mjs} +3 -3
- package/dist/{chunk-KR6B3LVY.mjs.map → chunk-B6IR5KSC.mjs.map} +1 -1
- package/dist/{chunk-5LBDYFWH.mjs → chunk-C6GXVH5J.mjs} +3 -3
- package/dist/{chunk-5LBDYFWH.mjs.map → chunk-C6GXVH5J.mjs.map} +1 -1
- package/dist/{chunk-4IW7GZFQ.cjs → chunk-FEN5S772.cjs} +74 -48
- package/dist/chunk-FEN5S772.cjs.map +1 -0
- package/dist/{chunk-2SMCH62O.cjs → chunk-FP2RLYQZ.cjs} +11 -11
- package/dist/{chunk-2SMCH62O.cjs.map → chunk-FP2RLYQZ.cjs.map} +1 -1
- package/dist/{chunk-MOME6KYD.mjs → chunk-G5IEC7SR.mjs} +3 -3
- package/dist/{chunk-MOME6KYD.mjs.map → chunk-G5IEC7SR.mjs.map} +1 -1
- package/dist/{chunk-EXGXUK2N.mjs → chunk-GYIO7W7M.mjs} +41 -15
- package/dist/chunk-GYIO7W7M.mjs.map +1 -0
- package/dist/{chunk-3Z3A7FHA.cjs → chunk-IEEAENLX.cjs} +48 -48
- package/dist/{chunk-3Z3A7FHA.cjs.map → chunk-IEEAENLX.cjs.map} +1 -1
- package/dist/{chunk-DFTVB66S.cjs → chunk-KNDLV4PI.cjs} +85 -85
- package/dist/{chunk-DFTVB66S.cjs.map → chunk-KNDLV4PI.cjs.map} +1 -1
- package/dist/{chunk-SSUOENAZ.mjs → chunk-KNEQRUBA.mjs} +3 -3
- package/dist/{chunk-SSUOENAZ.mjs.map → chunk-KNEQRUBA.mjs.map} +1 -1
- package/dist/chunk-KRETIZU6.mjs +2218 -0
- package/dist/chunk-KRETIZU6.mjs.map +1 -0
- package/dist/{chunk-CGILA3WO.mjs → chunk-N2XQF2OL.mjs} +5 -3
- package/dist/{chunk-CGILA3WO.mjs.map → chunk-N2XQF2OL.mjs.map} +1 -1
- package/dist/{chunk-EUADAUBQ.mjs → chunk-N4MZYNR4.mjs} +4 -4
- package/dist/{chunk-EUADAUBQ.mjs.map → chunk-N4MZYNR4.mjs.map} +1 -1
- package/dist/chunk-NRXYYO5V.cjs +2257 -0
- package/dist/chunk-NRXYYO5V.cjs.map +1 -0
- package/dist/{chunk-GGKGH5PM.mjs → chunk-OBRSGM64.mjs} +4 -4
- package/dist/{chunk-GGKGH5PM.mjs.map → chunk-OBRSGM64.mjs.map} +1 -1
- package/dist/{chunk-6JTB2X72.mjs → chunk-ODO4GMW7.mjs} +3 -3
- package/dist/{chunk-6JTB2X72.mjs.map → chunk-ODO4GMW7.mjs.map} +1 -1
- package/dist/{chunk-WGEGR3DF.cjs → chunk-OLISEQHS.cjs} +5 -2
- package/dist/{chunk-WGEGR3DF.cjs.map → chunk-OLISEQHS.cjs.map} +1 -1
- package/dist/{chunk-PZKAH7WQ.mjs → chunk-PVAX67JG.mjs} +3 -3
- package/dist/{chunk-PZKAH7WQ.mjs.map → chunk-PVAX67JG.mjs.map} +1 -1
- package/dist/{chunk-PRPG2T2E.cjs → chunk-QJ6GTUCO.cjs} +6 -6
- package/dist/{chunk-PRPG2T2E.cjs.map → chunk-QJ6GTUCO.cjs.map} +1 -1
- package/dist/chunk-QW4RBGHN.cjs +961 -0
- package/dist/chunk-QW4RBGHN.cjs.map +1 -0
- package/dist/{chunk-33AMWFBZ.cjs → chunk-SGP7V2UW.cjs} +15 -15
- package/dist/{chunk-33AMWFBZ.cjs.map → chunk-SGP7V2UW.cjs.map} +1 -1
- package/dist/{chunk-FX2QFYWF.mjs → chunk-VWQ5WOIL.mjs} +3 -3
- package/dist/{chunk-FX2QFYWF.mjs.map → chunk-VWQ5WOIL.mjs.map} +1 -1
- package/dist/{chunk-ZLQHUZDU.cjs → chunk-YDPDTOSP.cjs} +139 -139
- package/dist/{chunk-ZLQHUZDU.cjs.map → chunk-YDPDTOSP.cjs.map} +1 -1
- package/dist/{chunk-77HQWEQ6.cjs → chunk-YW5IVWHQ.cjs} +33 -33
- package/dist/{chunk-77HQWEQ6.cjs.map → chunk-YW5IVWHQ.cjs.map} +1 -1
- package/dist/{chunk-YXBOAGIM.cjs → chunk-YXZ6GU7H.cjs} +7 -7
- package/dist/{chunk-YXBOAGIM.cjs.map → chunk-YXZ6GU7H.cjs.map} +1 -1
- package/dist/{chunk-62Y65TGK.mjs → chunk-ZUFTH5IR.mjs} +8 -631
- package/dist/chunk-ZUFTH5IR.mjs.map +1 -0
- package/dist/components-EHOGXATG.cjs +22 -0
- package/dist/{components-5UXYNAKR.cjs.map → components-EHOGXATG.cjs.map} +1 -1
- package/dist/components-MQ6DR7TX.cjs +26 -0
- package/dist/{components-CFXOEVPN.mjs.map → components-MQ6DR7TX.cjs.map} +1 -1
- package/dist/components-XRX7QGLB.mjs +5 -0
- package/dist/{components-WYEZL5TE.cjs.map → components-XRX7QGLB.mjs.map} +1 -1
- package/dist/components-YATKRWLH.mjs +5 -0
- package/dist/{components-ZAGG2PBO.mjs.map → components-YATKRWLH.mjs.map} +1 -1
- package/dist/file-icon/index.cjs +6 -6
- package/dist/file-icon/index.mjs +1 -1
- package/dist/index.cjs +735 -215
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +972 -39
- package/dist/index.d.ts +972 -39
- package/dist/index.mjs +387 -31
- package/dist/index.mjs.map +1 -1
- package/dist/tree/index.cjs +38 -38
- package/dist/tree/index.d.cts +2 -2
- package/dist/tree/index.d.ts +2 -2
- package/dist/tree/index.mjs +3 -3
- package/package.json +6 -6
- package/src/index.ts +5 -0
- package/src/stories/index.ts +3 -1
- package/src/tools/Chat/Chat.story.tsx +1006 -0
- package/src/tools/Chat/README.md +528 -0
- package/src/tools/Chat/components/Attachments.tsx +192 -0
- package/src/tools/Chat/components/ChatRoot.tsx +201 -0
- package/src/tools/Chat/components/Composer.tsx +134 -0
- package/src/tools/Chat/components/EmptyState.tsx +47 -0
- package/src/tools/Chat/components/ErrorBanner.tsx +47 -0
- package/src/tools/Chat/components/JumpToLatest.tsx +30 -0
- package/src/tools/Chat/components/MessageActions.tsx +72 -0
- package/src/tools/Chat/components/MessageBubble.tsx +228 -0
- package/src/tools/Chat/components/MessageList.tsx +82 -0
- package/src/tools/Chat/components/Sources.tsx +55 -0
- package/src/tools/Chat/components/StreamingIndicator.tsx +29 -0
- package/src/tools/Chat/components/ToolCalls.tsx +172 -0
- package/src/tools/Chat/components/index.ts +24 -0
- package/src/tools/Chat/config.ts +55 -0
- package/src/tools/Chat/context/ChatProvider.tsx +122 -0
- package/src/tools/Chat/context/index.ts +9 -0
- package/src/tools/Chat/core/audio/audioBus.ts +172 -0
- package/src/tools/Chat/core/audio/index.ts +8 -0
- package/src/tools/Chat/core/audio/preferences.ts +68 -0
- package/src/tools/Chat/core/audio/types.ts +49 -0
- package/src/tools/Chat/core/ids.ts +16 -0
- package/src/tools/Chat/core/index.ts +5 -0
- package/src/tools/Chat/core/markdown.ts +56 -0
- package/src/tools/Chat/core/payload-dispatch.ts +54 -0
- package/src/tools/Chat/core/persona.ts +35 -0
- package/src/tools/Chat/core/reducer.ts +335 -0
- package/src/tools/Chat/core/transport/http.ts +167 -0
- package/src/tools/Chat/core/transport/index.ts +13 -0
- package/src/tools/Chat/core/transport/mock.ts +134 -0
- package/src/tools/Chat/core/transport/sse.ts +116 -0
- package/src/tools/Chat/core/transport/types.ts +24 -0
- package/src/tools/Chat/hooks/index.ts +26 -0
- package/src/tools/Chat/hooks/useChat.ts +440 -0
- package/src/tools/Chat/hooks/useChatAudio.ts +191 -0
- package/src/tools/Chat/hooks/useChatComposer.ts +227 -0
- package/src/tools/Chat/hooks/useChatHistory.ts +59 -0
- package/src/tools/Chat/hooks/useChatLayout.ts +111 -0
- package/src/tools/Chat/hooks/useChatLightbox.ts +34 -0
- package/src/tools/Chat/hooks/useChatScroll.ts +132 -0
- package/src/tools/Chat/index.ts +158 -0
- package/src/tools/Chat/lazy.tsx +14 -0
- package/src/tools/Chat/types.ts +237 -0
- package/src/tools/Chat/utils/collectImageAttachments.ts +13 -0
- package/src/tools/JsonForm/JsonSchemaForm.tsx +32 -1
- package/src/tools/Map/README.md +384 -0
- package/dist/DocsLayout-CTJINVBM.mjs.map +0 -1
- package/dist/DocsLayout-XLDB6CJ2.cjs.map +0 -1
- package/dist/JsonSchemaForm-OSPUUUHM.cjs +0 -13
- package/dist/JsonSchemaForm-TSLX2GRO.mjs +0 -4
- package/dist/JsonTree-F27RMYSI.cjs +0 -11
- package/dist/JsonTree-QTJYSHCV.mjs +0 -5
- package/dist/Player-M3GC3VPE.mjs +0 -4
- package/dist/Player-ZL2X5LGG.cjs +0 -13
- package/dist/TreeRoot-A3J65L6F.mjs +0 -4
- package/dist/TreeRoot-DSK5JILT.cjs +0 -19
- package/dist/chunk-4IW7GZFQ.cjs.map +0 -1
- package/dist/chunk-62Y65TGK.mjs.map +0 -1
- package/dist/chunk-EXGXUK2N.mjs.map +0 -1
- package/dist/chunk-TKSFZHCG.cjs +0 -1597
- package/dist/chunk-TKSFZHCG.cjs.map +0 -1
- package/dist/components-5UXYNAKR.cjs +0 -22
- package/dist/components-CFXOEVPN.mjs +0 -5
- package/dist/components-WYEZL5TE.cjs +0 -26
- package/dist/components-ZAGG2PBO.mjs +0 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkYW5IVWHQ_cjs = require('./chunk-YW5IVWHQ.cjs');
|
|
4
|
+
var chunkOLISEQHS_cjs = require('./chunk-OLISEQHS.cjs');
|
|
5
5
|
var react = require('react');
|
|
6
6
|
require('@vidstack/react/player/styles/base.css');
|
|
7
7
|
require('@vidstack/react/player/styles/default/theme.css');
|
|
@@ -32,7 +32,7 @@ function getVidstackSrc(source) {
|
|
|
32
32
|
return "";
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
|
-
|
|
35
|
+
chunkOLISEQHS_cjs.__name(getVidstackSrc, "getVidstackSrc");
|
|
36
36
|
function DefaultErrorFallback({ error }) {
|
|
37
37
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 flex flex-col items-center justify-center gap-4 text-white bg-black", children: [
|
|
38
38
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -56,7 +56,7 @@ function DefaultErrorFallback({ error }) {
|
|
|
56
56
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg", children: error || "Video cannot be played" })
|
|
57
57
|
] });
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
chunkOLISEQHS_cjs.__name(DefaultErrorFallback, "DefaultErrorFallback");
|
|
60
60
|
var VidstackProvider = react.forwardRef(
|
|
61
61
|
({
|
|
62
62
|
source,
|
|
@@ -88,7 +88,7 @@ var VidstackProvider = react.forwardRef(
|
|
|
88
88
|
cachePosterUrl,
|
|
89
89
|
saveVideoPosition,
|
|
90
90
|
getVideoPosition
|
|
91
|
-
} =
|
|
91
|
+
} = chunkYW5IVWHQ_cjs.useVideoCache();
|
|
92
92
|
const sourceKey = react.useMemo(() => {
|
|
93
93
|
switch (source.type) {
|
|
94
94
|
case "youtube":
|
|
@@ -129,24 +129,24 @@ var VidstackProvider = react.forwardRef(
|
|
|
129
129
|
() => {
|
|
130
130
|
const player = playerRef.current;
|
|
131
131
|
return {
|
|
132
|
-
play: /* @__PURE__ */
|
|
133
|
-
pause: /* @__PURE__ */
|
|
134
|
-
togglePlay: /* @__PURE__ */
|
|
132
|
+
play: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => player?.play(), "play"),
|
|
133
|
+
pause: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => player?.pause(), "pause"),
|
|
134
|
+
togglePlay: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
135
135
|
if (player) {
|
|
136
136
|
player.paused ? player.play() : player.pause();
|
|
137
137
|
}
|
|
138
138
|
}, "togglePlay"),
|
|
139
|
-
seekTo: /* @__PURE__ */
|
|
139
|
+
seekTo: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((time) => {
|
|
140
140
|
if (player) player.currentTime = time;
|
|
141
141
|
}, "seekTo"),
|
|
142
|
-
setVolume: /* @__PURE__ */
|
|
142
|
+
setVolume: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((volume) => {
|
|
143
143
|
if (player) player.volume = Math.max(0, Math.min(1, volume));
|
|
144
144
|
}, "setVolume"),
|
|
145
|
-
toggleMute: /* @__PURE__ */
|
|
145
|
+
toggleMute: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
146
146
|
if (player) player.muted = !player.muted;
|
|
147
147
|
}, "toggleMute"),
|
|
148
|
-
enterFullscreen: /* @__PURE__ */
|
|
149
|
-
exitFullscreen: /* @__PURE__ */
|
|
148
|
+
enterFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => player?.enterFullscreen(), "enterFullscreen"),
|
|
149
|
+
exitFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => player?.exitFullscreen(), "exitFullscreen"),
|
|
150
150
|
get currentTime() {
|
|
151
151
|
return player?.currentTime ?? 0;
|
|
152
152
|
},
|
|
@@ -160,7 +160,7 @@ var VidstackProvider = react.forwardRef(
|
|
|
160
160
|
},
|
|
161
161
|
[]
|
|
162
162
|
);
|
|
163
|
-
const handlePlay = /* @__PURE__ */
|
|
163
|
+
const handlePlay = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => onPlay?.(), "handlePlay");
|
|
164
164
|
const handlePause = react.useCallback(() => {
|
|
165
165
|
const player = playerRef.current;
|
|
166
166
|
if (sourceKey && player && player.currentTime > 0) {
|
|
@@ -169,8 +169,8 @@ var VidstackProvider = react.forwardRef(
|
|
|
169
169
|
}
|
|
170
170
|
onPause?.();
|
|
171
171
|
}, [sourceKey, saveVideoPosition, onPause]);
|
|
172
|
-
const handleEnded = /* @__PURE__ */
|
|
173
|
-
const handleError = /* @__PURE__ */
|
|
172
|
+
const handleEnded = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => onEnded?.(), "handleEnded");
|
|
173
|
+
const handleError = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((detail) => {
|
|
174
174
|
const error = detail;
|
|
175
175
|
const msg = error?.message || "Video playback error";
|
|
176
176
|
videoDebug.error("Vidstack error", { message: msg });
|
|
@@ -178,7 +178,7 @@ var VidstackProvider = react.forwardRef(
|
|
|
178
178
|
setErrorMessage(msg);
|
|
179
179
|
onError?.(msg);
|
|
180
180
|
}, "handleError");
|
|
181
|
-
const handleLoadStart = /* @__PURE__ */
|
|
181
|
+
const handleLoadStart = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => onLoadStart?.(), "handleLoadStart");
|
|
182
182
|
const handleCanPlay = react.useCallback(() => {
|
|
183
183
|
const player = playerRef.current;
|
|
184
184
|
if (player) {
|
|
@@ -221,24 +221,24 @@ var VidstackProvider = react.forwardRef(
|
|
|
221
221
|
react.useEffect(() => {
|
|
222
222
|
const player = playerRef.current;
|
|
223
223
|
if (!player) return;
|
|
224
|
-
const handleSeeking = /* @__PURE__ */
|
|
224
|
+
const handleSeeking = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
225
225
|
videoDebug.event("seeking", { currentTime: player.currentTime });
|
|
226
226
|
}, "handleSeeking");
|
|
227
|
-
const handleSeeked = /* @__PURE__ */
|
|
227
|
+
const handleSeeked = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
228
228
|
videoDebug.event("seeked", { currentTime: player.currentTime });
|
|
229
229
|
const mediaEl = player.provider?.media;
|
|
230
230
|
if (mediaEl?.buffered) {
|
|
231
231
|
videoDebug.buffer(mediaEl.buffered, player.duration);
|
|
232
232
|
}
|
|
233
233
|
}, "handleSeeked");
|
|
234
|
-
const handleWaiting = /* @__PURE__ */
|
|
234
|
+
const handleWaiting = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
235
235
|
videoDebug.warn("WAITING - buffering...");
|
|
236
236
|
const mediaEl = player.provider?.media;
|
|
237
237
|
if (mediaEl?.buffered) {
|
|
238
238
|
videoDebug.buffer(mediaEl.buffered, player.duration);
|
|
239
239
|
}
|
|
240
240
|
}, "handleWaiting");
|
|
241
|
-
const handleStalled = /* @__PURE__ */
|
|
241
|
+
const handleStalled = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
242
242
|
videoDebug.warn("STALLED - network issue");
|
|
243
243
|
const mediaEl = player.provider?.media;
|
|
244
244
|
if (mediaEl?.buffered) {
|
|
@@ -258,7 +258,7 @@ var VidstackProvider = react.forwardRef(
|
|
|
258
258
|
}, [vidstackSrc]);
|
|
259
259
|
const isFillMode = aspectRatio === "fill";
|
|
260
260
|
const computedAspectRatio = aspectRatio === "auto" || aspectRatio === "fill" ? void 0 : aspectRatio;
|
|
261
|
-
const renderErrorFallback = /* @__PURE__ */
|
|
261
|
+
const renderErrorFallback = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
262
262
|
const fallbackProps = { error: errorMessage, retry };
|
|
263
263
|
if (typeof errorFallback === "function") {
|
|
264
264
|
return errorFallback(fallbackProps);
|
|
@@ -321,7 +321,7 @@ var VidstackProvider = react.forwardRef(
|
|
|
321
321
|
);
|
|
322
322
|
VidstackProvider.displayName = "VidstackProvider";
|
|
323
323
|
function useVideoPlayerSettings2() {
|
|
324
|
-
const { settings, saveSettings } =
|
|
324
|
+
const { settings, saveSettings } = chunkYW5IVWHQ_cjs.useVideoPlayerSettings();
|
|
325
325
|
const updateVolume = react.useCallback(
|
|
326
326
|
(volume) => {
|
|
327
327
|
saveSettings({ volume: Math.max(0, Math.min(1, volume)) });
|
|
@@ -347,7 +347,7 @@ function useVideoPlayerSettings2() {
|
|
|
347
347
|
updateSettings
|
|
348
348
|
};
|
|
349
349
|
}
|
|
350
|
-
|
|
350
|
+
chunkOLISEQHS_cjs.__name(useVideoPlayerSettings2, "useVideoPlayerSettings");
|
|
351
351
|
function getVideoUrl(source) {
|
|
352
352
|
switch (source.type) {
|
|
353
353
|
case "url":
|
|
@@ -358,7 +358,7 @@ function getVideoUrl(source) {
|
|
|
358
358
|
return "";
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
|
|
361
|
+
chunkOLISEQHS_cjs.__name(getVideoUrl, "getVideoUrl");
|
|
362
362
|
var NativeProvider = react.forwardRef(
|
|
363
363
|
({
|
|
364
364
|
source,
|
|
@@ -392,25 +392,25 @@ var NativeProvider = react.forwardRef(
|
|
|
392
392
|
react.useImperativeHandle(
|
|
393
393
|
ref,
|
|
394
394
|
() => ({
|
|
395
|
-
play: /* @__PURE__ */
|
|
396
|
-
pause: /* @__PURE__ */
|
|
397
|
-
togglePlay: /* @__PURE__ */
|
|
395
|
+
play: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.play(), "play"),
|
|
396
|
+
pause: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.pause(), "pause"),
|
|
397
|
+
togglePlay: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
398
398
|
const video = videoRef.current;
|
|
399
399
|
if (video) {
|
|
400
400
|
video.paused ? video.play() : video.pause();
|
|
401
401
|
}
|
|
402
402
|
}, "togglePlay"),
|
|
403
|
-
seekTo: /* @__PURE__ */
|
|
403
|
+
seekTo: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((time) => {
|
|
404
404
|
if (videoRef.current) videoRef.current.currentTime = time;
|
|
405
405
|
}, "seekTo"),
|
|
406
|
-
setVolume: /* @__PURE__ */
|
|
406
|
+
setVolume: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((volume) => {
|
|
407
407
|
if (videoRef.current) videoRef.current.volume = Math.max(0, Math.min(1, volume));
|
|
408
408
|
}, "setVolume"),
|
|
409
|
-
toggleMute: /* @__PURE__ */
|
|
409
|
+
toggleMute: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
410
410
|
if (videoRef.current) videoRef.current.muted = !videoRef.current.muted;
|
|
411
411
|
}, "toggleMute"),
|
|
412
|
-
enterFullscreen: /* @__PURE__ */
|
|
413
|
-
exitFullscreen: /* @__PURE__ */
|
|
412
|
+
enterFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.requestFullscreen(), "enterFullscreen"),
|
|
413
|
+
exitFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => document.exitFullscreen(), "exitFullscreen"),
|
|
414
414
|
get currentTime() {
|
|
415
415
|
return videoRef.current?.currentTime ?? 0;
|
|
416
416
|
},
|
|
@@ -431,7 +431,7 @@ var NativeProvider = react.forwardRef(
|
|
|
431
431
|
setIsLoading(false);
|
|
432
432
|
return;
|
|
433
433
|
}
|
|
434
|
-
const hideLoader = /* @__PURE__ */
|
|
434
|
+
const hideLoader = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => setIsLoading(false), "hideLoader");
|
|
435
435
|
video.addEventListener("canplay", hideLoader);
|
|
436
436
|
video.addEventListener("loadeddata", hideLoader);
|
|
437
437
|
video.addEventListener("playing", hideLoader);
|
|
@@ -446,26 +446,26 @@ var NativeProvider = react.forwardRef(
|
|
|
446
446
|
react.useEffect(() => {
|
|
447
447
|
const video = videoRef.current;
|
|
448
448
|
if (!video) return;
|
|
449
|
-
const handleLoadedMetadata = /* @__PURE__ */
|
|
449
|
+
const handleLoadedMetadata = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
450
450
|
videoDebug.state("loadedmetadata", { duration: video.duration });
|
|
451
451
|
}, "handleLoadedMetadata");
|
|
452
|
-
const handleCanPlayDebug = /* @__PURE__ */
|
|
452
|
+
const handleCanPlayDebug = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
453
453
|
videoDebug.state("canplay", { duration: video.duration, buffered: video.buffered.length });
|
|
454
454
|
videoDebug.buffer(video.buffered, video.duration);
|
|
455
455
|
video.volume = savedSettings.volume;
|
|
456
456
|
}, "handleCanPlayDebug");
|
|
457
|
-
const handleSeeking = /* @__PURE__ */
|
|
457
|
+
const handleSeeking = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
458
458
|
videoDebug.event("seeking", { currentTime: video.currentTime });
|
|
459
459
|
}, "handleSeeking");
|
|
460
|
-
const handleSeeked = /* @__PURE__ */
|
|
460
|
+
const handleSeeked = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
461
461
|
videoDebug.event("seeked", { currentTime: video.currentTime });
|
|
462
462
|
videoDebug.buffer(video.buffered, video.duration);
|
|
463
463
|
}, "handleSeeked");
|
|
464
|
-
const handleWaiting = /* @__PURE__ */
|
|
464
|
+
const handleWaiting = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
465
465
|
videoDebug.warn("WAITING - buffering...");
|
|
466
466
|
videoDebug.buffer(video.buffered, video.duration);
|
|
467
467
|
}, "handleWaiting");
|
|
468
|
-
const handleStalled = /* @__PURE__ */
|
|
468
|
+
const handleStalled = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
469
469
|
videoDebug.warn("STALLED - network issue");
|
|
470
470
|
videoDebug.buffer(video.buffered, video.duration);
|
|
471
471
|
}, "handleStalled");
|
|
@@ -487,25 +487,25 @@ var NativeProvider = react.forwardRef(
|
|
|
487
487
|
react.useEffect(() => {
|
|
488
488
|
const video = videoRef.current;
|
|
489
489
|
if (!video) return;
|
|
490
|
-
const handleVolumeChange = /* @__PURE__ */
|
|
490
|
+
const handleVolumeChange = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
491
491
|
updateVolume(video.volume);
|
|
492
492
|
}, "handleVolumeChange");
|
|
493
493
|
video.addEventListener("volumechange", handleVolumeChange);
|
|
494
494
|
return () => video.removeEventListener("volumechange", handleVolumeChange);
|
|
495
495
|
}, [updateVolume]);
|
|
496
|
-
const handleContextMenu = /* @__PURE__ */
|
|
496
|
+
const handleContextMenu = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
|
|
497
497
|
if (disableContextMenu) {
|
|
498
498
|
e.preventDefault();
|
|
499
499
|
}
|
|
500
500
|
}, "handleContextMenu");
|
|
501
|
-
const handleError = /* @__PURE__ */
|
|
501
|
+
const handleError = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
|
|
502
502
|
const video = e.currentTarget;
|
|
503
503
|
const errorMsg = video.error?.message || "Video playback error";
|
|
504
504
|
videoDebug.error("Video error", { code: video.error?.code, message: errorMsg });
|
|
505
505
|
setIsLoading(false);
|
|
506
506
|
onError?.(errorMsg);
|
|
507
507
|
}, "handleError");
|
|
508
|
-
const handleTimeUpdate = /* @__PURE__ */
|
|
508
|
+
const handleTimeUpdate = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
509
509
|
const video = videoRef.current;
|
|
510
510
|
if (video && onTimeUpdate) {
|
|
511
511
|
onTimeUpdate(video.currentTime, video.duration);
|
|
@@ -578,7 +578,7 @@ function DefaultErrorFallback2({ error }) {
|
|
|
578
578
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-lg", children: error || "Video cannot be previewed" })
|
|
579
579
|
] });
|
|
580
580
|
}
|
|
581
|
-
|
|
581
|
+
chunkOLISEQHS_cjs.__name(DefaultErrorFallback2, "DefaultErrorFallback");
|
|
582
582
|
var StreamProvider = react.forwardRef(
|
|
583
583
|
({
|
|
584
584
|
source,
|
|
@@ -611,11 +611,11 @@ var StreamProvider = react.forwardRef(
|
|
|
611
611
|
const videoRef = react.useRef(null);
|
|
612
612
|
const contentKeyRef = react.useRef(null);
|
|
613
613
|
const lastSavedTimeRef = react.useRef(0);
|
|
614
|
-
const getOrCreateBlobUrl =
|
|
615
|
-
const releaseBlobUrl =
|
|
616
|
-
const getOrCreateStreamUrl =
|
|
617
|
-
const saveVideoPosition =
|
|
618
|
-
const getVideoPosition =
|
|
614
|
+
const getOrCreateBlobUrl = chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().getOrCreateBlobUrl;
|
|
615
|
+
const releaseBlobUrl = chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().releaseBlobUrl;
|
|
616
|
+
const getOrCreateStreamUrl = chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().getOrCreateStreamUrl;
|
|
617
|
+
const saveVideoPosition = chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().saveVideoPosition;
|
|
618
|
+
const getVideoPosition = chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().getVideoPosition;
|
|
619
619
|
const { settings: savedSettings, updateVolume } = useVideoPlayerSettings2();
|
|
620
620
|
const retry = react.useCallback(() => {
|
|
621
621
|
setHasError(false);
|
|
@@ -634,25 +634,25 @@ var StreamProvider = react.forwardRef(
|
|
|
634
634
|
react.useImperativeHandle(
|
|
635
635
|
ref,
|
|
636
636
|
() => ({
|
|
637
|
-
play: /* @__PURE__ */
|
|
638
|
-
pause: /* @__PURE__ */
|
|
639
|
-
togglePlay: /* @__PURE__ */
|
|
637
|
+
play: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.play(), "play"),
|
|
638
|
+
pause: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.pause(), "pause"),
|
|
639
|
+
togglePlay: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
640
640
|
const video = videoRef.current;
|
|
641
641
|
if (video) {
|
|
642
642
|
video.paused ? video.play() : video.pause();
|
|
643
643
|
}
|
|
644
644
|
}, "togglePlay"),
|
|
645
|
-
seekTo: /* @__PURE__ */
|
|
645
|
+
seekTo: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((time) => {
|
|
646
646
|
if (videoRef.current) videoRef.current.currentTime = time;
|
|
647
647
|
}, "seekTo"),
|
|
648
|
-
setVolume: /* @__PURE__ */
|
|
648
|
+
setVolume: /* @__PURE__ */ chunkOLISEQHS_cjs.__name((volume) => {
|
|
649
649
|
if (videoRef.current) videoRef.current.volume = Math.max(0, Math.min(1, volume));
|
|
650
650
|
}, "setVolume"),
|
|
651
|
-
toggleMute: /* @__PURE__ */
|
|
651
|
+
toggleMute: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
652
652
|
if (videoRef.current) videoRef.current.muted = !videoRef.current.muted;
|
|
653
653
|
}, "toggleMute"),
|
|
654
|
-
enterFullscreen: /* @__PURE__ */
|
|
655
|
-
exitFullscreen: /* @__PURE__ */
|
|
654
|
+
enterFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => videoRef.current?.requestFullscreen(), "enterFullscreen"),
|
|
655
|
+
exitFullscreen: /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => document.exitFullscreen(), "exitFullscreen"),
|
|
656
656
|
get currentTime() {
|
|
657
657
|
return videoRef.current?.currentTime ?? 0;
|
|
658
658
|
},
|
|
@@ -671,14 +671,14 @@ var StreamProvider = react.forwardRef(
|
|
|
671
671
|
return () => {
|
|
672
672
|
isMountedRef.current = false;
|
|
673
673
|
if (contentKeyRef.current) {
|
|
674
|
-
|
|
674
|
+
chunkYW5IVWHQ_cjs.useMediaCacheStore.getState().releaseBlobUrl(contentKeyRef.current);
|
|
675
675
|
contentKeyRef.current = null;
|
|
676
676
|
}
|
|
677
677
|
};
|
|
678
678
|
}, []);
|
|
679
679
|
react.useEffect(() => {
|
|
680
680
|
if (contentKeyRef.current) {
|
|
681
|
-
const newKey = source.type === "blob" ?
|
|
681
|
+
const newKey = source.type === "blob" ? chunkYW5IVWHQ_cjs.generateContentKey(source.data) : null;
|
|
682
682
|
if (newKey !== contentKeyRef.current) {
|
|
683
683
|
releaseBlobUrl(contentKeyRef.current);
|
|
684
684
|
contentKeyRef.current = null;
|
|
@@ -700,7 +700,7 @@ var StreamProvider = react.forwardRef(
|
|
|
700
700
|
}
|
|
701
701
|
case "blob": {
|
|
702
702
|
const blobSource = source;
|
|
703
|
-
const contentKey =
|
|
703
|
+
const contentKey = chunkYW5IVWHQ_cjs.generateContentKey(blobSource.data);
|
|
704
704
|
contentKeyRef.current = contentKey;
|
|
705
705
|
const url = getOrCreateBlobUrl(
|
|
706
706
|
contentKey,
|
|
@@ -797,15 +797,15 @@ var StreamProvider = react.forwardRef(
|
|
|
797
797
|
}, preloaderTimeout);
|
|
798
798
|
return () => clearTimeout(timeout);
|
|
799
799
|
}, [showPreloader, isLoading, preloaderTimeout]);
|
|
800
|
-
const handleContextMenu = /* @__PURE__ */
|
|
800
|
+
const handleContextMenu = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
|
|
801
801
|
if (disableContextMenu) {
|
|
802
802
|
e.preventDefault();
|
|
803
803
|
}
|
|
804
804
|
}, "handleContextMenu");
|
|
805
|
-
const handleLoadedData = /* @__PURE__ */
|
|
805
|
+
const handleLoadedData = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
806
806
|
setIsLoading(false);
|
|
807
807
|
}, "handleLoadedData");
|
|
808
|
-
const handleError = /* @__PURE__ */
|
|
808
|
+
const handleError = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
809
809
|
const video = videoRef.current;
|
|
810
810
|
if (video) {
|
|
811
811
|
videoDebug.error("Video error", { code: video.error?.code, message: video.error?.message });
|
|
@@ -818,21 +818,21 @@ var StreamProvider = react.forwardRef(
|
|
|
818
818
|
react.useEffect(() => {
|
|
819
819
|
const video = videoRef.current;
|
|
820
820
|
if (!video) return;
|
|
821
|
-
const handleLoadedMetadata = /* @__PURE__ */
|
|
821
|
+
const handleLoadedMetadata = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
822
822
|
videoDebug.state("loadedmetadata", { duration: video.duration });
|
|
823
823
|
}, "handleLoadedMetadata");
|
|
824
|
-
const handleSeeking = /* @__PURE__ */
|
|
824
|
+
const handleSeeking = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
825
825
|
videoDebug.event("seeking", { currentTime: video.currentTime });
|
|
826
826
|
}, "handleSeeking");
|
|
827
|
-
const handleSeeked = /* @__PURE__ */
|
|
827
|
+
const handleSeeked = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
828
828
|
videoDebug.event("seeked", { currentTime: video.currentTime });
|
|
829
829
|
videoDebug.buffer(video.buffered, video.duration);
|
|
830
830
|
}, "handleSeeked");
|
|
831
|
-
const handleWaiting = /* @__PURE__ */
|
|
831
|
+
const handleWaiting = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
832
832
|
videoDebug.warn("WAITING - buffering...");
|
|
833
833
|
videoDebug.buffer(video.buffered, video.duration);
|
|
834
834
|
}, "handleWaiting");
|
|
835
|
-
const handleStalled = /* @__PURE__ */
|
|
835
|
+
const handleStalled = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
836
836
|
videoDebug.warn("STALLED - network issue");
|
|
837
837
|
videoDebug.buffer(video.buffered, video.duration);
|
|
838
838
|
}, "handleStalled");
|
|
@@ -852,7 +852,7 @@ var StreamProvider = react.forwardRef(
|
|
|
852
852
|
react.useEffect(() => {
|
|
853
853
|
const video = videoRef.current;
|
|
854
854
|
if (!video) return;
|
|
855
|
-
const handleVolumeChange = /* @__PURE__ */
|
|
855
|
+
const handleVolumeChange = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
856
856
|
updateVolume(video.volume);
|
|
857
857
|
}, "handleVolumeChange");
|
|
858
858
|
video.addEventListener("volumechange", handleVolumeChange);
|
|
@@ -860,7 +860,7 @@ var StreamProvider = react.forwardRef(
|
|
|
860
860
|
}, [videoUrl, updateVolume]);
|
|
861
861
|
const isFillMode = aspectRatio === "fill";
|
|
862
862
|
const computedAspectRatio = aspectRatio === "auto" || aspectRatio === "fill" ? void 0 : aspectRatio;
|
|
863
|
-
const renderErrorFallback = /* @__PURE__ */
|
|
863
|
+
const renderErrorFallback = /* @__PURE__ */ chunkOLISEQHS_cjs.__name(() => {
|
|
864
864
|
const fallbackProps = { error: errorMessage, retry };
|
|
865
865
|
if (typeof errorFallback === "function") {
|
|
866
866
|
return errorFallback(fallbackProps);
|
|
@@ -928,11 +928,11 @@ function VideoPlayerProvider({
|
|
|
928
928
|
);
|
|
929
929
|
return /* @__PURE__ */ jsxRuntime.jsx(VideoPlayerContext.Provider, { value, children });
|
|
930
930
|
}
|
|
931
|
-
|
|
931
|
+
chunkOLISEQHS_cjs.__name(VideoPlayerProvider, "VideoPlayerProvider");
|
|
932
932
|
function useVideoPlayerContext() {
|
|
933
933
|
return react.useContext(VideoPlayerContext);
|
|
934
934
|
}
|
|
935
|
-
|
|
935
|
+
chunkOLISEQHS_cjs.__name(useVideoPlayerContext, "useVideoPlayerContext");
|
|
936
936
|
|
|
937
937
|
// src/tools/VideoPlayer/utils/resolvers.ts
|
|
938
938
|
function resolvePlayerMode(source, mode = "auto") {
|
|
@@ -954,11 +954,11 @@ function resolvePlayerMode(source, mode = "auto") {
|
|
|
954
954
|
return "native";
|
|
955
955
|
}
|
|
956
956
|
}
|
|
957
|
-
|
|
957
|
+
chunkOLISEQHS_cjs.__name(resolvePlayerMode, "resolvePlayerMode");
|
|
958
958
|
function isSimpleStreamSource(source) {
|
|
959
959
|
return source != null && source.type === "stream" && !("getStreamUrl" in source);
|
|
960
960
|
}
|
|
961
|
-
|
|
961
|
+
chunkOLISEQHS_cjs.__name(isSimpleStreamSource, "isSimpleStreamSource");
|
|
962
962
|
function resolveStreamSource(source, context) {
|
|
963
963
|
if (!context?.getStreamUrl) {
|
|
964
964
|
console.warn(
|
|
@@ -981,7 +981,7 @@ function resolveStreamSource(source, context) {
|
|
|
981
981
|
poster: source.poster
|
|
982
982
|
};
|
|
983
983
|
}
|
|
984
|
-
|
|
984
|
+
chunkOLISEQHS_cjs.__name(resolveStreamSource, "resolveStreamSource");
|
|
985
985
|
|
|
986
986
|
// src/tools/VideoPlayer/utils/fileSource.ts
|
|
987
987
|
function resolveFileSource(options) {
|
|
@@ -1027,7 +1027,7 @@ function resolveFileSource(options) {
|
|
|
1027
1027
|
}
|
|
1028
1028
|
return null;
|
|
1029
1029
|
}
|
|
1030
|
-
|
|
1030
|
+
chunkOLISEQHS_cjs.__name(resolveFileSource, "resolveFileSource");
|
|
1031
1031
|
var VideoPlayer = react.forwardRef(
|
|
1032
1032
|
({
|
|
1033
1033
|
source: rawSource,
|
|
@@ -1162,13 +1162,13 @@ function VideoControls({ player, className }) {
|
|
|
1162
1162
|
const currentTime = store.currentTime;
|
|
1163
1163
|
const duration = store.duration;
|
|
1164
1164
|
const volume = store.volume;
|
|
1165
|
-
const formatTime = /* @__PURE__ */
|
|
1165
|
+
const formatTime = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((seconds) => {
|
|
1166
1166
|
if (!seconds || seconds < 0) return "0:00";
|
|
1167
1167
|
const minutes = Math.floor(seconds / 60);
|
|
1168
1168
|
const secs = Math.floor(seconds % 60);
|
|
1169
1169
|
return `${minutes}:${secs.toString().padStart(2, "0")}`;
|
|
1170
1170
|
}, "formatTime");
|
|
1171
|
-
const handleProgressClick = /* @__PURE__ */
|
|
1171
|
+
const handleProgressClick = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
|
|
1172
1172
|
if (!duration) return;
|
|
1173
1173
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
1174
1174
|
const clickX = e.clientX - rect.left;
|
|
@@ -1176,7 +1176,7 @@ function VideoControls({ player, className }) {
|
|
|
1176
1176
|
const newTime = percentage * duration;
|
|
1177
1177
|
remote.seek(newTime);
|
|
1178
1178
|
}, "handleProgressClick");
|
|
1179
|
-
const handleVolumeChange = /* @__PURE__ */
|
|
1179
|
+
const handleVolumeChange = /* @__PURE__ */ chunkOLISEQHS_cjs.__name((e) => {
|
|
1180
1180
|
const rect = e.currentTarget.getBoundingClientRect();
|
|
1181
1181
|
const clickX = e.clientX - rect.left;
|
|
1182
1182
|
const percentage = Math.max(0, Math.min(1, clickX / rect.width));
|
|
@@ -1270,7 +1270,7 @@ function VideoControls({ player, className }) {
|
|
|
1270
1270
|
}
|
|
1271
1271
|
);
|
|
1272
1272
|
}
|
|
1273
|
-
|
|
1273
|
+
chunkOLISEQHS_cjs.__name(VideoControls, "VideoControls");
|
|
1274
1274
|
function VideoErrorFallback({
|
|
1275
1275
|
error,
|
|
1276
1276
|
retry,
|
|
@@ -1324,7 +1324,7 @@ function VideoErrorFallback({
|
|
|
1324
1324
|
}
|
|
1325
1325
|
);
|
|
1326
1326
|
}
|
|
1327
|
-
|
|
1327
|
+
chunkOLISEQHS_cjs.__name(VideoErrorFallback, "VideoErrorFallback");
|
|
1328
1328
|
function createVideoErrorFallback(options) {
|
|
1329
1329
|
return (props, source) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1330
1330
|
VideoErrorFallback,
|
|
@@ -1337,7 +1337,7 @@ function createVideoErrorFallback(options) {
|
|
|
1337
1337
|
}
|
|
1338
1338
|
);
|
|
1339
1339
|
}
|
|
1340
|
-
|
|
1340
|
+
chunkOLISEQHS_cjs.__name(createVideoErrorFallback, "createVideoErrorFallback");
|
|
1341
1341
|
|
|
1342
1342
|
exports.NativeProvider = NativeProvider;
|
|
1343
1343
|
exports.StreamProvider = StreamProvider;
|
|
@@ -1352,5 +1352,5 @@ exports.resolveFileSource = resolveFileSource;
|
|
|
1352
1352
|
exports.resolvePlayerMode = resolvePlayerMode;
|
|
1353
1353
|
exports.resolveStreamSource = resolveStreamSource;
|
|
1354
1354
|
exports.useVideoPlayerContext = useVideoPlayerContext;
|
|
1355
|
-
//# sourceMappingURL=chunk-
|
|
1356
|
-
//# sourceMappingURL=chunk-
|
|
1355
|
+
//# sourceMappingURL=chunk-KNDLV4PI.cjs.map
|
|
1356
|
+
//# sourceMappingURL=chunk-KNDLV4PI.cjs.map
|