0
Ich versuche Angebot zu schaffen, aber ich unvollständig sdp-offer
wie untenPeerconnection unvollständiges Angebot zu schaffen
sdp:
"v=0↵o=- 981077471509521330 2 IN IP4 127.0.0.1
↵s=-
↵t=0 0
↵a=msid-semantic: WMS
↵"
Was ich verpassten. Mein Code ist wie folgt
// Der Adapterteil
window.RTCPeerConnection = window.RTCPeerConnection ||
window.webkitRTCPeerConnection || window.mozRTCPeerConnection;
window.RTCIceCandidate = window.RTCIceCandidate ||
window.mozRTCIceCandidate || window.webkitRTCIceCandidate;
window.RTCSessionDescription = window.RTCSessionDescription ||
window.mozRTCSessionDescription || window.webkitRTCSessionDescription;
window.URL = window.URL || window.mozURL || window.webkitURL;
window.navigator.getUserMedia = window.navigator.getUserMedia ||
window.navigator.webkitGetUserMedia || window.navigator.mozGetUserMedia;
Erstellen sdp Flow
var iceConfig = {'iceServers': [{ 'url': 'stun:stun.l.google.com:19302' }]};
var pc = new RTCPeerConnection(null);
pc.onicecandidate = function (evnt) {
socket.emit('video', {ice: evnt.candidate, type: 'ice' });
};
pc.onaddstream = function(evnt) {
$rootScope.remotestream = evnt.stream;
$rootScope.$broadcast('remotestream');
};
pc.createOffer(function(offer) {console.log(offer);});