@ai-matrx/media 0.2.1 → 0.2.2

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/react.js CHANGED
@@ -1145,7 +1145,7 @@ function useThumbnailSource(ref, options = {}) {
1145
1145
  return null;
1146
1146
  }
1147
1147
  }, [client, thumbnailUrl]);
1148
- const needsBlob = allowSourceFallback && !explicitThumb && !resolution?.thumbnailSrc && resolution?.transport === "blob";
1148
+ const needsBlob = allowSourceFallback && !explicitThumb && !resolution?.thumbnailSrc && resolution?.transport === "blob" && (resolution.kind === "image" || resolution.kind === "video");
1149
1149
  const blob = useMediaBlob(needsBlob ? ref : null);
1150
1150
  if (explicitThumb) {
1151
1151
  return {
@@ -1266,7 +1266,7 @@ function ImageThumb({
1266
1266
  {
1267
1267
  src: url,
1268
1268
  alt,
1269
- loading: "lazy",
1269
+ loading: url.startsWith("blob:") ? "eager" : "lazy",
1270
1270
  className: "h-full w-full object-cover",
1271
1271
  onError: onLoadError
1272
1272
  },