0

我正在尝试播放视频链接,目前只有 youtube 播放器播放。如何添加 wistia、vimeo 和 loom?我曾尝试使用 VLC 播放器,但它会引发有关依赖项的错误。

import ReactPlayer from "react-player";

{
  this.state.element.element === "Video" && (
    <div className="justify-content-center">
      <div className="p-3">
        <input
          id="video"
          type="text"
          className="form-control"
          placeholder="Enter Website's URL"
          defaultValue={this.props.element.url}
          onBlur={this.updateElement.bind(this)}
          onChange={this.editElementProp.bind(this, "url", "value")}
        />
      </div>
      <div className={`p-3 ${styles.iframeHeading}`}>
        <ReactPlayer
          className="w-100 h-100"
          allowfullscreen
          url={this.props.element.url}
          height="200"
          width="300"
          title="Content Loaded from Website"
        />
      </div>
    </div>
  );
}
4

0 回答 0