var peerConnectionConfig = {'iceServers': [{'url': 'stun:stun.services.mozilla.com'}, {'url': 'stun:stun.l.google.com:19302'}]};
window.RTCPeerConnection = window.RTCPeerConnection || window.mozRTCPeerConnection || window.webkitRTCPeerConnection;
var peerConnection = new RTCPeerConnection(peerConnectionConfig);
var promise = peerConnection.createOffer();
我正在尝试使用PeerConnection创建商品in MDN,但我在Chrome中遇到以下错误:
Uncaught TypeError: Failed to execute 'createOffer' on 'RTCPeerConnection': 2 arguments required, but only 0 present.