Skip to content

🎥 Make videos programmatically with React

Update video-flicker.md

Jonny Burger9e66b5cb6106
diff --git a/packages/docs/docs/troubleshooting/video-flicker.md b/packages/docs/docs/troubleshooting/video-flicker.md
index 2f33be4b20..4e0f6793e0 100644
--- a/packages/docs/docs/troubleshooting/video-flicker.md
+++ b/packages/docs/docs/troubleshooting/video-flicker.md
@@ -105,7 +105,10 @@ export const Premount: React.FC<PremountProps> = ({
? sequenceContext.cumulatedFrom + sequenceContext.relativeFrom
: 0;
- const currentFrame = context.frame - contextOffset;
+ // v3
+ // const currentFrame = context.frame - contextOffset;
+ // v4
+ const currentFrame = (context.frame[id] ?? 0) - contextOffset;
return {
...context,
playing: currentFrame < premountFor ? false : context.playing,
@@ -177,7 +180,10 @@ export const Premount: React.FC<PremountProps> = ({
? sequenceContext.cumulatedFrom + sequenceContext.relativeFrom
: 0;
- const currentFrame = context.frame - contextOffset;
+ // v3
+ // const currentFrame = context.frame - contextOffset;
+ // v4
+ const currentFrame = (context.frame[id] ?? 0) - contextOffset;
return {
...context,
playing: currentFrame < premountFor ? false : context.playing,