[英]How to use the Temasys AdapterJS to work with Microsoft Edge?
I use the Temasys AdapterJS to work with Microsoft Edge. 我使用Temasys AdapterJS与Microsoft Edge一起使用。 Did anybody use it and can anybody help me?
有没有人使用它,任何人都可以帮助我吗? This code created offer:
此代码创建提供:
function onIceCandidate() {
if(event.candidate) {
iceCandidates.push(event.candidate);
} else {
http
.connect({
id: id,
desc: getLocalDescription(),
ice: getIceCandidates()
})
.then(function(data) {
pc.setRemoteDescription(new SessionDescription(data.desc));
array.forEach(data.ice, function(ice) {
pc.addIceCandidate(new IceCandidate(ice));
});
return data;
})
.catch(onError);
}
}
There are two candidates ' candidate:1 1 udp 1 0.0.0.0 9 typ endOfCandidates ' among its candidates. 候选人中有两个候选人:1 1 udp 1 0.0.0.0 9 typ endOfCandidates '。 When I try to create answer I receive the following error: DOMException: Error processing ICE candidate .
当我尝试创建答案时,我收到以下错误: DOMException:处理ICE候选人时出错 。
Could anybody know why those two candidates are added? 谁能知道为什么要添加这两个候选人?
The sdp offer formed the following: sdp报价形成如下:
v=0
o=thisisadapterortc 8169639915646943137 2 IN IP4 127.0.0.1
s=-
t=0 0
m=audio 9 UDP/TLS/RTP/SAVPF 104 9 106 0 8 103 97 13 118 101
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=rtpmap:104 SILK/16000
a=rtcp-fb:104 x-message app send:dsh recv:dsh
a=rtpmap:9 G722/8000
a=rtcp-fb:9 x-message app send:dsh recv:dsh
a=rtpmap:106 OPUS/48000/2
a=rtcp-fb:106 x-message app send:dsh recv:dsh
a=rtpmap:0 PCMU/8000
a=rtcp-fb:0 x-message app send:dsh recv:dsh
a=rtpmap:8 PCMA/8000
a=rtcp-fb:8 x-message app send:dsh recv:dsh
a=rtpmap:103 SILK/8000
a=rtcp-fb:103 x-message app send:dsh recv:dsh
a=rtpmap:97 RED/8000
a=rtpmap:13 CN/8000
a=rtpmap:118 CN/16000
a=rtpmap:101 telephone-event/8000
a=rtcp-mux
a=ice-ufrag:IYVg
a=ice-pwd:bdVmapCbC5RoHpUEZV/alNHC
a=setup:actpass
a=fingerprint:sha-256 89:F6:17:47:CA:69:2E:8A:73:DD:05:91:68:9B:0A:61:72:2A:9D:CE:07:61:74:9C:D6:7A:CD:33:12:C0:72:86
a=mid:g7svev9ig3
a=recvonly
a=ssrc:1001 cname:ulxmndn6vb
m=video 9 UDP/TLS/RTP/SAVPF 122 123
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=rtpmap:122 X-H264UC/90000
a=rtcp-fb:122 x-message app send:src,x-pli recv:src,x-pli
a=rtpmap:123 x-ulpfecuc/90000
a=rtcp-mux
a=ice-ufrag:+5BB
a=ice-pwd:RTkgr1+iK09AOSArgK5f+KV+
a=setup:actpass
a=fingerprint:sha-256 7C:1B:A4:1C:FC:96:7B:2C:8B:1D:C2:96:AA:07:33:9A:F9:13:1A:22:68:6A:57:53:02:D9:55:90:8E:80:7E:03
a=mid:35x7e5ynh9
a=recvonly
a=ssrc:3003 cname:ulxmndn6vb
Is it normal if it doesn't contain any rows with candidates eg 'a=candidate:...' and doesn't contain any ip addresses? 如果它不包含任何候选行,例如'a = candidate:...'并且不包含任何IP地址,这是正常的吗? Because I receive one more error: DOMException: Failed to set remote offer sdp: Session error code: ERROR_CONTENT.
因为我再收到一个错误: DOMException:无法设置远程提供sdp:会话错误代码:ERROR_CONTENT。 Session error description: Failed to set remote video description send parameters..
会话错误说明:无法设置远程视频描述发送参数..
The code which should create the answer: 应该创建答案的代码:
socket.on('add offer', function (data) {
received_offer(data.id, data.desc);
console.log(data.ice);
for(var i = 0, l = data.ice.length; i < l; i++) {
// Do I need to add these ice candidates?
//if(false === /0\.0\.0\.0/.test(data.ice[i].candidate)) {
pc[data.id].addIceCandidate(new ice_candidate(data.ice[i]));
//}
}
});
navigator.getUserMedia(
{audio: true, video: true},
function(s) {
stream = s;
document.getElementById("stream").src = URL.createObjectURL(stream);
},
function(error) {console.error(error)}
);
function received_offer(id, desc) {
pc[id] = new peer_connection({iceServers: [
{url: "stun:stun.l.google.com:19302"}
]});
pc[id].onicecandidate = on_ice_candidate.bind(null, id);
pc[id].addStream(stream);
console.log(desc.sdp);
pc[id].setRemoteDescription(new session_description(desc), function() {
pc[id].createAnswer(
create_answer_success.bind(null, id),
create_answer_error,
{
"mandatory": {
"OfferToReceiveAudio": true,
"OfferToReceiveVideo": true
},
"optional": [{
"DtlsSrtpKeyAgreement": true
}]
}
);
}, function(err) {
console.log(err);
});
}
function create_answer_success(id, desc) {
pc[id].setLocalDescription(desc);
}
function create_answer_error(error) {
console.error("create_answer_error(): error:", error);
}
function on_ice_candidate(id, event){
if (event.candidate) {
if(!ice[id]) ice[id] = [];
ice[id].push(event.candidate);
} else {
var res = {id: id ,desc: pc[id].localDescription ,ice: ice[id]};
socket.emit('answer', res);
}
}
I cannot understand what is wrong? 我无法理解什么是错的? Thanks!
谢谢!
are you trying to connect Edge to Chrome / Firefox? 你想把Edge连接到Chrome / Firefox吗?
Currently, Edge to Edge connection works only. 目前,Edge to Edge连接仅适用。 Please note that Edge uses promises for createOffer(), createAnswer(), setLocalDescription() and setRemoteDescription().
请注意,Edge使用了对createOffer(),createAnswer(),setLocalDescription()和setRemoteDescription()的promise。
For Edge case: 对于Edge案例:
pc.createOffer(offerOptions).then(createOfferSuccessCb).catch(createOfferFailreCb);
Temasys AdapterJS compiles the codebase from webrtc/adapter to keep up-to-date with the latest technology. Temasys AdapterJS编译来自webrtc / adapter的代码库,以便与最新技术保持同步。
See this github link for more information: https://github.com/webrtc/adapter/issues/165 有关更多信息,请参阅此github链接: https : //github.com/webrtc/adapter/issues/165
The "Failed to set remote video description send parameters" is caused by Chrome not handling unknown video codecs properly. Chrome无法正确处理未知视频编解码器,导致“无法设置远程视频说明发送参数”。 See https://bugs.chromium.org/p/webrtc/issues/detail?id=4957 Currently, there is no video codec interoperability between Edge and any other browser.
请参阅https://bugs.chromium.org/p/webrtc/issues/detail?id=4957目前,Edge与任何其他浏览器之间没有视频编解码器互操作性。
The ice candidate with typ endOfCandidates can be safely ignored. 可以安全地忽略具有典型endOfCandidates的冰候选者。 It's an edge-specific hack.
这是一个特定于边缘的黑客。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.