WebRTC Chrome and Firefox connection.setRemoteDescription
WebRTC Chrome and Firefox connection.setRemoteDescription
我是如何接受已创建的offer并创建答案的:
var description = new RTCSessionDescription(sdp),
self = this;
connection.setRemoteDescription(description, function () {
connection.createAnswer(function (answer) {
try {
connection.setLocalDescription(answer, function () {
self._mediator.sendSDPAnswer({
data: answer,
connection: connection.id
});
self._isRemoteDescriptionSet[connection.id] = true;
self._setIceCandidates(connection);
});
} catch (e) {
self._logger.error('Error while setting the remote description', e);
}
}, function (error) {
throw error;
}, {
mandatory: {
OfferToReceiveVideo: false,
OfferToReceiveAudio: true
}
});
不幸的是,当我在Chrome中创建Firefox的报价时,我得到:
Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set data send codecs..
在Firefox中,我启动连接:
connection.createOffer(function (offer) {
connection.setLocalDescription(offer, function () {
mediator.sendSDPOffer({
data: offer,
connection: connection.id
});
});
}, function (error) {
throw new Error('Error while connecting', error);
}, {
mandatory: {
OfferToReceiveVideo: false,
OfferToReceiveAudio: true
}
});
我创建的对端连接:
this._connection = new RTCPeerConnection(servers,
{ optional: [
{ RtpDataChannels: true },
{ DtlsSrtpKeyAgreement: true }
]});
当我尝试在Chrome浏览器之间启动会话时,一切正常
尝试将rtpDataChannel设置为false并删除DtlsSrtpKeyAgreement。
this._connection = new RTCPeerConnection(servers,
{ optional: [
{ RtpDataChannels: false }
]});
相关文章:
- 类型错误'未定义'不是对象(正在评估'navigator.connection.type'
- 可以't从peerConnection Connection播放视频
- RTCMultiConnection exception on connection.addStream()
- node-mysql connection.query() returns undefined
- Javascript:connection.query函数正在破坏我的for循环
- 访问套接字中的其他套接字.在socket.io中打开('connection')
- WebSockets connection.send not function error
- Signalr connection.start.done not firing
- SignalR $.connection is undefined
- socket.io 中的第二个 io.connection() 不会触发连接事件
- Nodejs Numtel Mysql over a SSH connection
- VMware webMKS(WMKS) console connection url?
- 节点&connection.query内部的MySQL-connection.query-对象属性不可访问
- 覆盖Ext.data.Connection-最佳实践
- NodeJS、Express、Sockets.io:无法在服务器上启动.on(“connection”
- navigator.network.connection.type返回null而不是connection.NONE
- Node JS, Socket.IO, Express and Http connection
- connection pooling
- Php and Javascript connection
- P2P Cirrus connection Flash-client and HTML-client