远程错误:模块“remotion”没有导出成员“OffthreadVideo”

问题描述 投票:0回答:1

我正在使用

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>
  );
};
reactjs video remotion
1个回答
0
投票

我通过从以下位置导入

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>
  );
};
© www.soinside.com 2019 - 2024. All rights reserved.