差别

这里会显示出您选择的修订版和当前版本之间的差别。

到此差别页面的链接

两侧同时换到之前的修订记录 前一修订版
后一修订版
前一修订版
上一修订版 两侧同时换到之后的修订记录
start:400webimintegration:videocall [2017/01/22 09:06]
liulj [集成步骤]
start:400webimintegration:videocall [2018/11/09 10:42]
jk 移除
行 30: 行 30:
  
     listener: {     listener: {
-     ​onAcceptCall:​ function (from, options) { + onAcceptCall:​ function (from, options) { 
-        console.log('​onAcceptCall::',​ 'from: ', from, '​options:​ ', options); + console.log('​onAcceptCall::',​ 'from: ', from, '​options:​ ', options); 
-     ​}, + }, 
-     ​onGotRemoteStream:​ function (stream) { + //​通过streamType区分视频流和音频流,streamType:​ '​VOICE'​(音频流),'​VIDEO'​(视频流) 
-         ​console.log('​onGotRemoteStream::',​ '​stream:​ ', stream); + onGotRemoteStream:​ function (stream, streamType) { 
-        var video = document.getElementById('​video'​);​ + console.log('​onGotRemoteStream::',​ '​stream:​ ', stream, '​streamType:​ ', streamType); 
-        video.src window.URL.createObjectURL(stream)+ var video = document.getElementById('​video'​);​ 
-        }, + video.srcObject ​= stream; 
-        onGotLocalStream:​ function (stream) { + }, 
-         ​console.log('​onGotLocalStream::',​ '​stream:',​ stream); + onGotLocalStream:​ function (stream, streamType) { 
-            var video = document.getElementById('​localVideo'​);​ + console.log('​onGotLocalStream::',​ '​stream:',​ stream, '​streamType:​ ', streamType); 
-            video.src window.URL.createObjectURL(stream)+ var video = document.getElementById('​localVideo'​);​ 
-        }, + video.srcObject ​= stream; 
-        onRinging: function (caller) { + }, 
-            console.log('​onRinging::',​ '​caller:',​ caller); + onRinging: function (caller) { 
-        }, + console.log('​onRinging::',​ '​caller:',​ caller); 
-        onTermCall: function (reason) { + }, 
-         ​console.log('​onTermCall::'​);​ + onTermCall: function (reason) { 
-            console.log('​reason:',​ reason); + console.log('​onTermCall::'​);​ 
-        }, + console.log('​reason:',​ reason); 
-        onIceConnectionStateChange:​ function (iceState) { + }, 
-            console.log('​onIceConnectionStateChange::',​ '​iceState:',​ iceState);​ + onIceConnectionStateChange:​ function (iceState) { 
-        },+ console.log('​onIceConnectionStateChange::',​ '​iceState:',​ iceState);​ 
 + },
         onError: function (e) {         onError: function (e) {
             console.log(e);​             console.log(e);​
行 67: 行 68:
         rtcCall.caller = '​mengyuanyuan';​         rtcCall.caller = '​mengyuanyuan';​
         rtcCall.makeVideoCall('​asdfghj'​);​         rtcCall.makeVideoCall('​asdfghj'​);​
 +    };
 +    // 音频呼叫对方
 +    var call = function () {
 +        rtcCall.caller = '​mengyuanyuan';​
 +        rtcCall.makeVoiceCall('​asdfghj'​);​
     };     };
     // 关掉/​拒绝视频     // 关掉/​拒绝视频