我正在使用
remotion
作为我的视频编辑器,现在我面临新问题 Module "remotion" has no exported member 'OffthreadVideo'.
,之前它工作正常。
import { AbsoluteFill, OffthreadVideo, staticFile } from "remotion";
export const VideoWithText: React.FC<{
link: any;
}> = ({ link }) => {
const loacFileUrl = staticFile(link);
return (
<AbsoluteFill>
<OffthreadVideo
src={loacFileUrl}
// Rest property
/>
</AbsoluteFill>
);
};
我通过从以下位置导入
Video
探索并解决了该错误
import {Video} from 'remotion';
代替 import { OffthreadVideo } from "remotion";
所以这是我的工作代码:
import { AbsoluteFill, Video, staticFile } from "remotion";
export const VideoWithText: React.FC<{
link: any;
}> = ({ link }) => {
const loacFileUrl = staticFile(link);
return (
<AbsoluteFill>
<Video
src={loacFileUrl}
// Rest property
/>
</AbsoluteFill>
);
};