mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-09-04 07:19:52 +00:00
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:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user