小编Pir*_*nna的帖子

需要澄清 Kurento 的 API 以将 webRTCEndpoint 连接到 RTPEndpoint

我正在尝试使用 Kurento 将 webRTCendpoint 桥接到 RTPendpoint。webRTCendpoint 客户端是一个 Chrome 浏览器。RTPendpoint 客户端是一个 SIP 服务器(代理/B2BUA)。这是我拥有的基本代码或伪代码(我在我的应用服务器中使用 Kurento-client.js):

//On receipt of offer from the WebRTC Browser-Peer
mySignalling.on('sdpOffer', function(sdpOffer) { //Action starts!

  //Create Mediapipeline so that endpoints can be created
  kurentoClient.create('MediaPipeline', function(error, pipeline) {
    pipeline.create('webRtcEndpoint', function(error, myWebrtcEndpoint)  {
      //Get ICE Candidates from webRTC endpoint to send to browser
      mySignalling.on('candidate', function(candidate) {
        myWebrtcEndpoint.addIceCandidate(candidate);
      });
      myWebrtcEndpoint.on('OnIceCandidate', function(event) {
        var candidate = kurento.register.complexTypes.IceCandidate(event.candidate);
        mySignalling.send(candidate); //Send ICE candidate to webRTC browser peer
      });
      pipeline.create('rtpEndpoint', function(error,myRtpEndpoint) {
        myWebrtcEndpoint.connect(myrtpEndpoint,function(error){ });
        myWebrtcEndpoint.processOffer(sdpOffer, function(error, …
Run Code Online (Sandbox Code Playgroud)

javascript webrtc kurento

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

标签 统计

javascript ×1

kurento ×1

webrtc ×1