RTCDataChannelConfiguration *datainit = [[RTCDataChannelConfiguration alloc] init];
@try {
datainit.isNegotiated = YES;
datainit.isOrdered = YES;
datainit.maxRetransmits = 30;
datainit.maxPacketLifeTime = 30000;
datainit.channelId = 100;
_dataChannel = [_peerConnection dataChannelForLabel:@"MyDataChannel" configuration:datainit];
_dataChannel.delegate = self;
RTCDataBuffer *buffer = [[RTCDataBuffer alloc] initWithData:[@"Hello" dataUsingEncoding:NSUTF8StringEncoding] isBinary:NO];
[_dataChannel sendData:buffer];
}
@catch(NSException *nse) {
NSLog(@"%@", nse);
}
I tried to run the above code when I got the client connection and also when I got the remote track. It fails either way with the following assert;
When dataChannelForLabel is executed, I am getting;
2017-01-20 18:05:26.546181 Telepix[12826:5098212] *** Assertion failure in -[RTCDataChannel initWithNativeDataChannel:], ../../webrtc/sdk/objc/Framework/Classes/RTCDataChannel.mm:170
Please let me know what I am doing wrong.
Thanks in advance
--Suman
--
---
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-webrtc+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/83d8fbb8-16fe-4608-9936-ad472a99857e%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-webrt...@googlegroups.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/6a789b13-b89b-4495-8423-a631565bc715%40googlegroups.com.
(void)peerConnection:(RTCPeerConnection *)peerConnection
didOpenDataChannel:(RTCDataChannel *)dataChannel.
I will take a look at didChangeIceConnectionState and let you know if I find anything. As you may already guessed, I am new to WebRTC, so, I am just fumbling around the code.
Thanks,
--Suman
RTCIceConnectionState is RTCIceConnectionStateCompleted. Video and Audio work fine except the messages through data channel.
Thanks,
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/1270ade2-4420-43f0-b56c-61ac405fb392%40googlegroups.com.To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrtc+unsubscribe@googlegroups.com.
_dataChannel = [_client.peerConnection dataChannelForLabel:@"TelepixDataChannel" configuration:config];
I tried creating the datachannel right after _peerConnection is created and also when I received the remote video track. I used default configuration, with and without channel id etc. Also tried isNegotiated = YES and NO. In all attempts, the dataChannel ready state stays at RTCDataChannelStateConnecting
Thanks,
[_peerConnection offerForConstraints:[self defaultOfferConstraints]
I created the data channel before that. Now my dataChannel state is open when a peer is connected. However, data is not getting received. The default offer constraints used in the code are;
@"OfferToReceiveAudio" : @"true",
@"OfferToReceiveVideo" : @"true"
Should I pass any other constraints for data?
@"internalSctpDataChannels": @"true" but it didn't help.