【问题标题】:Create Only Audio Calling Using OpenVidu使用 OpenVidu 仅创建音频通话
【发布时间】:2020-04-24 14:58:05
【问题描述】:

我只想要音频通话而不使用网络摄像头。但是以下代码仅适用于相机权限。当我删除相机权限时,它不会被称为 streamCreated 事件。

   const publisher: Publisher = this.OV.initPublisher(undefined, {
      audioSource: undefined, // The source of audio. If undefined default microphone
      videoSource: undefined, // The source of video. If undefined default webcam
      publishAudio: true, // Whether you want to start publishing with your audio unmuted or not
      publishVideo: false, // Whether you want to start publishing with your video enabled or not
      resolution: '640x480', // The resolution of your video
      frameRate: 30, // The frame rate of your video
      insertMode: 'APPEND', // How the video is inserted in the target element 'video-container'
      mirror: true // Whether to mirror your local video or not
    });

我在安卓应用中使用 Ionic

【问题讨论】:

    标签: ionic3 openvidu


    【解决方案1】:

    您需要将 'videoSource' 设置为 'false' 而不是 'undefined'。 像这样的东西应该可以工作:

    const publisher: Publisher = this.OV.initPublisher(undefined, {
          audioSource: undefined, // The source of audio. If undefined default microphone
          videoSource: false, // The source of video. If undefined default webcam
          publishAudio: true, // Whether you want to start publishing with your audio unmuted or not
          publishVideo: false, // Whether you want to start publishing with your video enabled or not
          resolution: '640x480', // The resolution of your video
          frameRate: 30, // The frame rate of your video
          insertMode: 'APPEND', // How the video is inserted in the target element 'video-container'
          mirror: true // Whether to mirror your local video or not
        });
    

    【讨论】:

      猜你喜欢
      • 2020-07-18
      • 2018-02-12
      • 1970-01-01
      • 1970-01-01
      • 2018-10-24
      • 1970-01-01
      • 1970-01-01
      • 2021-01-15
      • 1970-01-01
      相关资源
      最近更新 更多