private func initializeConstraints() -> RTCMediaConstraints {
let mandatoryConstraints = [
RTCPair(key: "OfferToReceiveAudio", value: "true"),
RTCPair(key: "OfferToReceiveVideo", value: "false"),
RTCPair(key: "echoCancellation", value: "false"),
RTCPair(key: "googEchoCancellation", value: "false")
]
let optionalConstraints = [
RTCPair(key: "internalSctpDataChannels", value: "true"),
RTCPair(key: "DtlsSrtpKeyAgreement", value: "true")
]
return RTCMediaConstraints(mandatoryConstraints: mandatoryConstraints, optionalConstraints: optionalConstraints)
}
func peerConnection(peerConnection: RTCPeerConnection!, didCreateSessionDescription sdp: RTCSessionDescription!, error: NSError?) {
LOGD("created sdp")
guard error == nil else {
LOGE("error creating session description: \(error!)")
delegate.onError(self, description: "Error creating sdp")
return
}
dispatch_async(dispatch_get_main_queue()) {
let replaceThis = "fmtp:111 minptime=10; useinbandfec=1"
let replaceWith = "fmtp:111 minptime=10; useinbandfec=1; stereo=1; sprop-stereo=1"
let sdpDescriptionWithStereo = sdp.description.stringByReplacingOccurrencesOfString(replaceThis, withString: replaceWith)
let sdpWithStereo = RTCSessionDescription(type: sdp.type, sdp: sdpDescriptionWithStereo)
peerConnection.setLocalDescriptionWithDelegate(self, sessionDescription: sdpWithStereo)
self.delegate.onLocalSDP(self, type: sdp.type, sdp: sdpDescriptionWithStereo)
}
}
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/f1c3789e-652f-4ff9-955d-90ce844d13b4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/9ec71fc9-11e8-4451-8246-6425ed095b4c%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/c4199ad4-68d0-43e8-bf30-8ccdae488e2a%40googlegroups.com.
--
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/807fb754-5b4c-40d8-a6ae-71c5a8362b31%40googlegroups.com.