【问题标题】:Type 'RecordRTCPromisesHandler' is missing the following properties from type 'RecordRTC'类型 \'RecordRTCPromisesHandler\' 缺少来自类型 \'RecordRTC\' 的以下属性
【发布时间】:2022-11-11 01:03:27
【问题描述】:

这是我第一次使用录音机,所以我不确定如何解决这个问题。我一直有这个问题,我错过了一些类型。我不知道如何解决它。请帮忙。

    const mediaDevices = navigator.mediaDevices;
    const stream: MediaStream =
      type === "video"
        ? await mediaDevices.getUserMedia({
            video: true,
            audio: true,
          })
        : await (mediaDevices as any).getDisplayMedia({
            video: true,
            audio: false,
          });
    const **recorder**: RecordRTC = new RecordRTCPromisesHandler(stream, {
      type: "video",
    });

    await recorder.startRecording();
    setRecorder(recorder);
    setStream(stream);
    setVideoUrlBlob(null);
  };```

【问题讨论】:

    标签: typescript recorder recordrtc


    【解决方案1】:

    你找到解决方案了吗?

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2022-09-28
    • 2021-04-20
    • 2021-07-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-09-11
    相关资源
    最近更新 更多