fix: prefetch media warning

This is due to the "audio" and "video" preload having limited support in
browsers.
This commit is contained in:
talksik
2026-03-24 07:27:23 -07:00
parent 161c89acf7
commit fa91ce0382
+1 -2
View File
@@ -25,7 +25,6 @@ export function usePrefetchAdjacentMedia(
for (const particle of mediaParticles) {
const objectId = particle.properties.object_id;
const isAudio = particle.properties.mime_type?.startsWith("audio/");
queryClient
.prefetchQuery({
@@ -39,7 +38,7 @@ export function usePrefetchAdjacentMedia(
objectId,
]);
if (url) {
preload(url, { as: isAudio ? "audio" : "video" });
preload(url, { as: "fetch", crossOrigin: "anonymous" });
}
});
}