@hyperframes/core 0.9.3 → 0.9.5

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.
@@ -1,6 +1,6 @@
1
1
  import { createRuntimeStartTimeResolver } from "./runtime/startResolver.js";
2
2
  import { isRuntimeElementVisibleAt } from "./runtime/timeline.js";
3
- import { STUDIO_PREVIEW_MARK_META } from "./studioPreviewMark.js";
3
+ import { defersMediaIn } from "./studioPreviewMark.js";
4
4
  export const FIRST_FRAME_READINESS_SCOPE = "first-frame";
5
5
  // HTMLMediaElement.HAVE_FUTURE_DATA per spec, used as a literal because not
6
6
  // every DOM implementation defines the named static (e.g. happy-dom leaves
@@ -60,8 +60,8 @@ export function scanPendingCompositionAssets(doc, { scope = "all" } = {}) {
60
60
  timelineRegistry: runtimeWindow?.__timelines,
61
61
  includeAuthoredTimingAttrs: true,
62
62
  });
63
- // Studio's preview buffers a clip off the first frame only once it comes due, as with a lazy image.
64
- const defersMedia = doc.querySelector(`meta[name="${STUDIO_PREVIEW_MARK_META}"]`) !== null;
63
+ // Studio's preview and the player buffer a clip off the first frame only once it comes due, as with a lazy image.
64
+ const defersMedia = defersMediaIn(doc);
65
65
  const pendingMedia = Array.from(doc.querySelectorAll("video, audio"))
66
66
  .filter(isRealmHtmlMediaElement)
67
67
  .filter((el) => shouldIncludeAsset(el, defersMedia && el.preload !== "auto" ? FIRST_FRAME_READINESS_SCOPE : scope, resolver, runtimeWindow?.__timelines ?? {}))