Tag: rtcdatachannel

RTCDataChannel不工作的iOS

我正在使用RTCDataChannel。 但是我通过频道发送的消息在另一个同伴没有收到。 这里是代码: let audioConstraint : RTCPair = RTCPair(key: "OfferToReceiveAudio", value: "true") let videoConstraint : RTCPair = RTCPair(key: "OfferToReceiveVideo", value: "true") let dtlsConstraint : RTCPair = RTCPair(key: "DtlsSrtpKeyAgreement", value: "true") let mediaContraints : RTCMediaConstraints = RTCMediaConstraints(mandatoryConstraints: [audioConstraint, videoConstraint], optionalConstraints: [ dtlsConstraint]) RTCPeerConnectionFactory.initializeSSL() peerConnection = peerConnectionFactory.peerConnectionWithICEServers(servers, constraints: mediaContraints, delegate: self) dataChannels = peerConnection?.createDataChannelWithLabel(channelName,config: nil) dataChannels?.delegate = […]