@geekapps/silo-elements-nextjs 0.2.34 → 0.2.35
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/FileUploader.d.ts +1 -1
- package/dist/FileUploader.js +3 -4
- package/dist/FileUploader.js.map +1 -1
- package/dist/ImageUploader.d.ts +1 -1
- package/dist/ImageUploader.js +3 -4
- package/dist/ImageUploader.js.map +1 -1
- package/dist/MediaUploader.js +9 -12
- package/dist/MediaUploader.js.map +1 -1
- package/dist/VideoPlayer.js +12 -9
- package/dist/VideoPlayer.js.map +1 -1
- package/dist/VideoUploader.d.ts +1 -1
- package/dist/VideoUploader.js +3 -4
- package/dist/VideoUploader.js.map +1 -1
- package/dist/index.js +21 -21
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +0 -1
- package/package.json +47 -47
package/dist/VideoPlayer.js
CHANGED
|
@@ -1203,36 +1203,39 @@ function parseVideoChildren(children) {
|
|
|
1203
1203
|
sources: [],
|
|
1204
1204
|
subtitles: []
|
|
1205
1205
|
};
|
|
1206
|
-
function
|
|
1207
|
-
|
|
1208
|
-
return child.type?.displayName === fn.displayName && !!fn.displayName;
|
|
1206
|
+
function dn(child) {
|
|
1207
|
+
return child.type?.displayName ?? child.type?.name ?? "";
|
|
1209
1208
|
}
|
|
1210
1209
|
React.Children.forEach(children, (child) => {
|
|
1211
1210
|
if (!React.isValidElement(child)) return;
|
|
1212
|
-
|
|
1211
|
+
const name = dn(child);
|
|
1212
|
+
if (child.type === Sources || name === "SiloSources") {
|
|
1213
1213
|
const element = child;
|
|
1214
1214
|
React.Children.forEach(element.props.children, (sourceChild) => {
|
|
1215
1215
|
if (!React.isValidElement(sourceChild)) return;
|
|
1216
|
-
|
|
1216
|
+
const sn = dn(sourceChild);
|
|
1217
|
+
if (sourceChild.type !== Source && sn !== "SiloSource") return;
|
|
1217
1218
|
const sourceElement = sourceChild;
|
|
1218
1219
|
parsed.sources.push(sourceElement.props);
|
|
1219
1220
|
});
|
|
1220
1221
|
}
|
|
1221
|
-
if (
|
|
1222
|
+
if (child.type === Subtitles || name === "SiloSubtitles") {
|
|
1222
1223
|
const element = child;
|
|
1223
1224
|
React.Children.forEach(element.props.children, (subtitleChild) => {
|
|
1224
1225
|
if (!React.isValidElement(subtitleChild)) return;
|
|
1225
|
-
|
|
1226
|
+
const sn = dn(subtitleChild);
|
|
1227
|
+
if (subtitleChild.type !== Subtitle && sn !== "SiloSubtitle") return;
|
|
1226
1228
|
const subtitleElement = subtitleChild;
|
|
1227
1229
|
parsed.subtitles.push(subtitleElement.props);
|
|
1228
1230
|
});
|
|
1229
1231
|
}
|
|
1230
|
-
if (
|
|
1232
|
+
if (child.type === Storyboard || name === "SiloStoryboard") {
|
|
1231
1233
|
const element = child;
|
|
1232
1234
|
const frames = [];
|
|
1233
1235
|
React.Children.forEach(element.props.children, (frameChild) => {
|
|
1234
1236
|
if (!React.isValidElement(frameChild)) return;
|
|
1235
|
-
|
|
1237
|
+
const fn2 = dn(frameChild);
|
|
1238
|
+
if (frameChild.type !== StoryboardFrame && fn2 !== "SiloStoryboardFrame") return;
|
|
1236
1239
|
const frameElement = frameChild;
|
|
1237
1240
|
frames.push(frameElement.props);
|
|
1238
1241
|
});
|