Browse Source

add setRemoteDescription

m7s
superxxd 2 years ago
parent
commit
d9a263ae23
  1. 4
      test/metaRTC.js

4
test/metaRTC.js

@ -173,6 +173,10 @@ pc.onicecandidate = event => {
console.log("Generated offer: ", data);
Ajax.post(conf.apiUrl, offer.sdp+"}", function(res){
console.log('返回的数据:',res)
pc.setRemoteDescription(new RTCSessionDescription({type: 'answer', sdp: res.sdp}));
// await self.pc.setRemoteDescription(
// new RTCSessionDescription({type: 'answer', sdp: session.sdp})
// );
// ....
})
// ajax({

Loading…
Cancel
Save