Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/417.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript Angular未能执行';setRemoteDescription';在';RTPeerConnection';:无法设置远程应答sdp:在错误状态下调用:稳定_Javascript_Angular_Ionic Framework_Webrtc - Fatal编程技术网

Javascript Angular未能执行';setRemoteDescription';在';RTPeerConnection';:无法设置远程应答sdp:在错误状态下调用:稳定

Javascript Angular未能执行';setRemoteDescription';在';RTPeerConnection';:无法设置远程应答sdp:在错误状态下调用:稳定,javascript,angular,ionic-framework,webrtc,Javascript,Angular,Ionic Framework,Webrtc,我正在使用firebase学习angular webrtc,我遇到了以下问题:未能在“RTPeerConnection”上执行“setRemoteDescription”:未能设置远程应答sdp:在错误状态下调用:稳定在我研究后,我只找到了一些答案,但使用JS而不是TS 调用此函数时会出现此问题 showRemote() { try { this.pc.createOffer() .then(offer => this.pc.setLocalDesc

我正在使用firebase学习angular webrtc,我遇到了以下问题:
未能在“RTPeerConnection”上执行“setRemoteDescription”:未能设置远程应答sdp:在错误状态下调用:稳定
在我研究后,我只找到了一些答案,但使用JS而不是TS

调用此函数时会出现此问题

  showRemote() {
    try {
      this.pc.createOffer()
        .then(offer => this.pc.setLocalDescription(offer))
        .then(() => {
          this.sendMessage(this.senderId, JSON.stringify({ sdp: this.pc.localDescription }));
          this.callActive = true;
        });
    } catch (error) {
      this.setupWebRtc();
      console.log(error);
    }
  }
知道为什么吗