@geekapps/silo-elements-nextjs 0.2.29 → 0.2.31
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/VideoPlayer.d.ts +3 -1
- package/dist/VideoPlayer.js +3 -2
- package/dist/VideoPlayer.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1235,7 +1235,8 @@ function Video({
|
|
|
1235
1235
|
className,
|
|
1236
1236
|
autoHideControls = true,
|
|
1237
1237
|
defaultVolume = 0.72,
|
|
1238
|
-
maxHeight
|
|
1238
|
+
maxHeight,
|
|
1239
|
+
fixedHeight
|
|
1239
1240
|
}) {
|
|
1240
1241
|
const parsed = useMemo(() => parseVideoChildren(children), [children]);
|
|
1241
1242
|
const initialSourceIndex = useMemo(() => {
|
|
@@ -1891,7 +1892,7 @@ function Video({
|
|
|
1891
1892
|
}
|
|
1892
1893
|
},
|
|
1893
1894
|
className: "relative w-full overflow-hidden rounded-[14px] bg-black shadow-[0_30px_90px_rgba(15,15,15,0.22)] outline-none ring-1 ring-black/5",
|
|
1894
|
-
style: maxHeight ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight, aspectRatio: "16/9" } : { aspectRatio: "16/9" },
|
|
1895
|
+
style: fixedHeight ? { height: typeof fixedHeight === "number" ? `${fixedHeight}px` : fixedHeight } : maxHeight ? { maxHeight: typeof maxHeight === "number" ? `${maxHeight}px` : maxHeight, aspectRatio: "16/9" } : { aspectRatio: "16/9" },
|
|
1895
1896
|
children: [
|
|
1896
1897
|
/* @__PURE__ */ jsxs(
|
|
1897
1898
|
"video",
|
|
@@ -2503,6 +2504,7 @@ function Thumbnail({
|
|
|
2503
2504
|
fileKey,
|
|
2504
2505
|
bucket,
|
|
2505
2506
|
mimeType,
|
|
2507
|
+
src,
|
|
2506
2508
|
width = "100%",
|
|
2507
2509
|
height = 160,
|
|
2508
2510
|
fit = "cover",
|
|
@@ -2512,7 +2514,9 @@ function Thumbnail({
|
|
|
2512
2514
|
style,
|
|
2513
2515
|
alt = "thumbnail"
|
|
2514
2516
|
}) {
|
|
2515
|
-
const { url, loading } = useSignedUrl(fileKey);
|
|
2517
|
+
const { url: signedUrl, loading: signedLoading } = useSignedUrl(src != null ? null : fileKey);
|
|
2518
|
+
const url = src ?? signedUrl;
|
|
2519
|
+
const loading = src != null ? false : signedLoading;
|
|
2516
2520
|
const [error, setError] = useState(false);
|
|
2517
2521
|
const isVideo = mimeType?.startsWith("video/");
|
|
2518
2522
|
const wrapper = {
|