Skip to content

Commit a1f2a76

Browse files
committed
fix(runtime): recognize cross-realm preview video elements
1 parent 7e43269 commit a1f2a76

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎packages/core/src/runtime/previewSeek.ts‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { PREVIEW_SEEK_HOLD_ATTR } from "../studioPreviewMark";
22
import { COLOR_GRADING_SOURCE_HIDDEN_ATTR } from "../colorGrading";
33
import { isUnplayable, mediaSourceTimeAt, notePlaybackIntent } from "./media";
44
import type { RuntimeMediaClip } from "./types";
5+
import { isVideoElement } from "./domRealm";
56
import { wallClearTimeout, wallSetTimeout } from "./wallClock";
67
import { getPausedVideoFrame, type PreparedPausedVideoFrames } from "./pausedVideoFrames";
78

@@ -127,7 +128,7 @@ export function createPreviewSeek(host: SeekHost) {
127128
native
128129
? new Set(
129130
clips.flatMap(({ el }) =>
130-
el instanceof HTMLVideoElement && el.readyState < 2 && isUnplayable(el) ? [el] : [],
131+
isVideoElement(el) && el.readyState < 2 && isUnplayable(el) ? [el] : [],
131132
),
132133
)
133134
: undefined,

0 commit comments

Comments
 (0)