使用音频通话的Quickblox Javascript SDK:声音没有

时间:2019-08-05 09:13:06

标签: javascript quickblox

我正在尝试使用Javascript演示实现Quickblox进行音频通话。但是我没有听到呼叫的声音。如果有人尝试过,请建议我回答。

 QB.init(qbAccount.appId, qbAccount.authKey, qbAccount.authSecret, qbEndpoints, CONFIG);
 let session = QB.webrtc.createNewSession(calleesIds, sessionType);
 session.getUserMedia(mediaParams, function(err, stream) {
  if (err) {

  }else {
    let extension = {};
    session.call(extension, function(error) {
      console.log('Start session::'+session);
      let call = $('#callingSignal')[0];
      call.play();
    });
  }
});
 QB.webrtc.onCallListener = (session, extension) => {
      let call1 = $('#ringtoneSignal')[0];
       call1.play();

      $('#income_call').show();
      console.log('onCallListener::' + session);
      this.callSession = session;
    };
    QB.webrtc.onUserNotAnswerListener =  (session, userId) => {
      console.log('User didn\'t answer: ' + userId);
    };

  QB.webrtc.onAcceptCallListener =  (session, userId, extension) => {
          console.log('user accepted call: ' + userId);
          alert(session);
          let call3 = $('#callingSignal')[0];
          call3.pause();
          session.unmute('audio');
    };
  For Call Accept & Reject: -
accept(){
  this.callSession.accept({});
 }

0 个答案:

没有答案