小编Jos*_*ong的帖子

Angular 2中组件和指令有什么区别?

我一直在努力理解框架中这两个概念之间的区别.

我非常熟悉AngularJS 1.x中的指令,Angular 2中的组件和指令似乎与此概念非常相似......

components directive typescript angular

12
推荐指数
1
解决办法
2787
查看次数

WebRTC Chrome和Firefox connection.setRemoteDescription

以下是我接受创建的报价并创建答案的方法:

var description = new RTCSessionDescription(sdp),
    self = this;
connection.setRemoteDescription(description, function () {
  connection.createAnswer(function (answer) {
    try {
      connection.setLocalDescription(answer, function () {
        self._mediator.sendSDPAnswer({
          data: answer,
          connection: connection.id
        });
        self._isRemoteDescriptionSet[connection.id] = true;
        self._setIceCandidates(connection);
      });
    } catch (e) {
      self._logger.error('Error while setting the remote description', e);
    }
  }, function (error) {
    throw error;
  }, {
    mandatory: {
      OfferToReceiveVideo: false,
      OfferToReceiveAudio: true
    }
  });
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我在Chrome中创建Firefox的报价时,我得到:

Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set data send …
Run Code Online (Sandbox Code Playgroud)

javascript firefox google-chrome webrtc

5
推荐指数
1
解决办法
1409
查看次数