Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

需求:期望在一个画布上只保留一个视频,当点击另一个视频的时候,会切换当前画布上的视频。同时切换的时候,会保留之前的剪辑状态 #219

Closed
foreverdxy opened this issue Jul 29, 2024 · 2 comments

Comments

@foreverdxy
Copy link

No description provided.

@hughfenghen
Copy link
Member

参考 #60

@foreverdxy
Copy link
Author

useEffect(() => {
avCvs?.on('activeSpriteChange', (sprite) => {
if (sprite) {
setPrevSpr(sprite);
}
});
}, [avCvs,]);
这里我会保存上一次的sprite。
当我切换视频的时候,我将上一次保存的添加进去,但没有成功。
try {
setLoading(true);
await avCvs?.addSprite(prevSprite);
} finally {
setLoading(false);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants