fix(studio): skip deferred media in hasUnloadedAssets check

Elements with preload!='auto' are intentionally deferred by the
media preloader and should not block the loading overlay.
This commit is contained in:
Miguel Ángel
2026-05-11 19:17:04 -07:00
parent b7438fa03d
commit 15f9fb711a
@@ -45,7 +45,11 @@ function hasUnloadedAssets(iframe: HTMLIFrameElement, lastResult: boolean): bool
if (!win || !doc) return lastResult;
for (const el of doc.querySelectorAll("video, audio")) {
if (el instanceof HTMLMediaElement && el.readyState < HTMLMediaElement.HAVE_FUTURE_DATA) {
if (
el instanceof HTMLMediaElement &&
el.preload === "auto" &&
el.readyState < HTMLMediaElement.HAVE_FUTURE_DATA
) {
return true;
}
}