mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-19 19:36:04 +00:00
perf(core): Safari clips open at their in-point, windows as before
This commit is contained in:
@@ -176,7 +176,7 @@ import {
|
||||
forgetPositionEdit,
|
||||
installPositionEditsSeekReapply,
|
||||
} from "./positionEdits";
|
||||
import { isOpenedAtInPoint, stillStandsIn, unheldPoster, unproxiedSrc } from "./proxySrc";
|
||||
import { stillStandsIn, unheldPoster, unproxiedSrc } from "./proxySrc";
|
||||
import { applyVariableBindings, unproxiedMediaSrc } from "./applyVariableBindings";
|
||||
import { createColorGradingRuntime, type RuntimeColorGradingApi } from "./colorGrading";
|
||||
import { COLOR_GRADING_AUTHORED_OPACITY_ATTR } from "../colorGrading";
|
||||
@@ -3475,11 +3475,9 @@ export function initSandboxRuntimeModular(): void {
|
||||
rawNode,
|
||||
isVisibleNow,
|
||||
loadsAhead &&
|
||||
// A clip opened at its in-point reads little ahead of it: every one is fetched ahead, not just the next take.
|
||||
(isOpenedAtInPoint(rawNode) ||
|
||||
(playerFrame
|
||||
? nextTakeClips(currentTime).has(rawNode)
|
||||
: upcoming || mediaStaysDue(rawNode, visibleAt, currentTime))),
|
||||
(playerFrame
|
||||
? nextTakeClips(currentTime).has(rawNode)
|
||||
: upcoming || mediaStaysDue(rawNode, visibleAt, currentTime)),
|
||||
currentTime,
|
||||
loadsAhead && dueAtLoopStart(rawNode, visibleAt),
|
||||
);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { parseStrictFiniteTimingNumber, readMediaStart } from "./playbackRate";
|
||||
import { isOpenedAtInPoint, recordOpenedAtInPoint } from "./proxySrc";
|
||||
import { recordOpenedAtInPoint } from "./proxySrc";
|
||||
import { createRuntimeStartTimeResolver } from "./startResolver";
|
||||
import { readMediaRenderId } from "./renderFrameSibling";
|
||||
import { defersMedia } from "./timedClipHide";
|
||||
@@ -128,7 +128,7 @@ export function deferMediaUntilDue(): void {
|
||||
if (start == null || !lengthIsAuthored(el)) return;
|
||||
const media = el as HTMLMediaElement;
|
||||
openAtInPoint(media);
|
||||
if (startInFilm(el) > 0 && !isOpenedAtInPoint(media)) media.preload = "none";
|
||||
if (startInFilm(el) > 0) media.preload = "none";
|
||||
};
|
||||
win.__hfMediaDeferral = new MutationObserver((records) => {
|
||||
const startInFilm = createRuntimeStartTimeResolver({}).resolveMediaStartForElement;
|
||||
|
||||
Reference in New Issue
Block a user