I am trying to change rtcpMuxPolicy
and also the bundlePolicy
, but it seems like it cannot be changed
This is my code:
Attempt 1:
var servers = {
'iceServers': [{
'urls': 'stun-url..'
}, {
'urls': 'stun-url-2..'
}, {
'urls': 'turn-url..',
'credential': 'psw',
'username': 'user'
}],
peerIdentity: [{bundlePolicy: 'max-bundle', rtcpMuxPolicy: 'negotiate'}]//added this line
};
var pc;
var sendChannel;
navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia);
pc = new RTCPeerConnection(servers);
Attempt 2:
var servers = {
'iceServers': [{
'urls': 'stun-url..'
}, {
'urls': 'stun-url-2..'
}, {
'urls': 'turn-url..',
'credential': 'psw',
'username': 'user'
}]
};
var pc;
var sendChannel;
navigator.getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia);
pc = new RTCPeerConnection(servers);
pc.setConfiguration([{bundlePolicy: 'max-bundle', rtcpMuxPolicy: 'negotiate'}]);
With both examples, I am still seeing the default values:
pc.getConfiguration()
bundlePolicy: "balanced"
rtcpMuxPolicy: "require"
And I can notice only one change and that is, the iceServers
array is empty, but
bundlePolicy
, and rtcpMuxPolicy
are still the default.
I have WebRtc web solution that communicates with an Android application and everything works perfectly when streaming video, the problem occurs when I add dataChannel i.e.
sendChannel = pc.createDataChannel('sendDataChannel');
After adding the above line in my web solution, the android throws an error saying:
setSDP error: Failed to set remote offer sdp: Session error code: ERROR_CONTENT. Session error description: Failed to setup RTCP mux filter..