Datachannel implementation errors in KMS

208 views
Skip to first unread message

sejon

unread,
Mar 26, 2023, 11:47:46 AM3/26/23
to kurento
Hello. I'm implementing video chat and datachannel using kurento and I'm getting an error.

First, the environment I am developing to implement the datachannel feature is as follows.
- spring boot
- kms 6.18.0
- javascript
- I tried to implement datachannel after checking that video call is possible with N:M, up to 4 people using kms.

The error I encountered is shown below.
1. in js I get the error Rejected data channel transport with mid=2.
스크린샷 2023-03-25 오후 5.15.44.png


2. kurento meida server log shows the following two errors
- application UDP/DTLS/SCTP (multiple m= lines?)
- Rejecting media: 'application'
스크린샷 2023-03-25 오후 5.10.49.png


My question is, is it possible to implement datachannel in kurento?

If anyone has any idea why these errors occur and how to fix them, I'd love to hear from you.

Have a nice day everyone!

Translated with www.DeepL.com/Translator (free version)

Neil Young

unread,
Mar 26, 2023, 12:03:23 PM3/26/23
to kurento
Are you sending the SDP offer to Kurento? Could you show that?

sejon

unread,
Mar 27, 2023, 6:56:46 AM3/27/23
to kurento
yes im sending the SDP offer to kurento server.
and here is my SDP offer

v=0
o=- 6098878227998780777 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1
a=extmap-allow-mixed
a=msid-semantic: WMS a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e
m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Q8pm
a=ice-pwd:+7VfOx1EyDwTWVyNKclgnfzh
a=ice-options:trickle
a=fingerprint:sha-256 93:75:85:4E:F2:24:CB:ED:98:C2:B0:67:26:7D:B4:DB:57:7F:80:F2:AA:CA:1A:E2:48:C1:CC:61:35:9E:97:58
a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e a7ab8554-fa7a-42c6-bc83-4e0f42d08b17
a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:126 telephone-event/8000
a=ssrc:3155521273 cname:QRzuWSoz+FITsVB2
a=ssrc:3155521273 msid:a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e a7ab8554-fa7a-42c6-bc83-4e0f42d08b17
m=video 9 UDP/TLS/RTP/SAVPF 96 97 102 103 104 105 106 107 108 109 127 125 39 40 45 46 98 99 100 101 112 113 114 115 116
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:Q8pm
a=ice-pwd:+7VfOx1EyDwTWVyNKclgnfzh
a=ice-options:trickle
a=fingerprint:sha-256 93:75:85:4E:F2:24:CB:ED:98:C2:B0:67:26:7D:B4:DB:57:7F:80:F2:AA:CA:1A:E2:48:C1:CC:61:35:9E:97:58
a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e 3aac68ad-76ad-477f-9104-d15e0d8a2e45
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:96 VP8/90000
a=rtcp-fb:96 goog-remb
a=rtcp-fb:96 transport-cc
a=rtcp-fb:96 ccm fir
a=rtcp-fb:96 nack
a=rtcp-fb:96 nack pli
a=rtpmap:97 rtx/90000
a=fmtp:97 apt=96
a=rtpmap:102 H264/90000
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 transport-cc
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f
a=rtpmap:103 rtx/90000
a=fmtp:103 apt=102
a=rtpmap:104 H264/90000
a=rtcp-fb:104 goog-remb
a=rtcp-fb:104 transport-cc
a=rtcp-fb:104 ccm fir
a=rtcp-fb:104 nack
a=rtcp-fb:104 nack pli
a=fmtp:104 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f
a=rtpmap:105 rtx/90000
a=fmtp:105 apt=104
a=rtpmap:106 H264/90000
a=rtcp-fb:106 goog-remb
a=rtcp-fb:106 transport-cc
a=rtcp-fb:106 ccm fir
a=rtcp-fb:106 nack
a=rtcp-fb:106 nack pli
a=fmtp:106 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=106
a=rtpmap:108 H264/90000
a=rtcp-fb:108 goog-remb
a=rtcp-fb:108 transport-cc
a=rtcp-fb:108 ccm fir
a=rtcp-fb:108 nack
a=rtcp-fb:108 nack pli
a=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f
a=rtpmap:109 rtx/90000
a=fmtp:109 apt=108
a=rtpmap:127 H264/90000
a=rtcp-fb:127 goog-remb
a=rtcp-fb:127 transport-cc
a=rtcp-fb:127 ccm fir
a=rtcp-fb:127 nack
a=rtcp-fb:127 nack pli
a=fmtp:127 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d001f
a=rtpmap:125 rtx/90000
a=fmtp:125 apt=127
a=rtpmap:39 H264/90000
a=rtcp-fb:39 goog-remb
a=rtcp-fb:39 transport-cc
a=rtcp-fb:39 ccm fir
a=rtcp-fb:39 nack
a=rtcp-fb:39 nack pli
a=fmtp:39 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f
a=rtpmap:40 rtx/90000
a=fmtp:40 apt=39
a=rtpmap:45 AV1/90000
a=rtcp-fb:45 goog-remb
a=rtcp-fb:45 transport-cc
a=rtcp-fb:45 ccm fir
a=rtcp-fb:45 nack
a=rtcp-fb:45 nack pli
a=rtpmap:46 rtx/90000
a=fmtp:46 apt=45
a=rtpmap:98 VP9/90000
a=rtcp-fb:98 goog-remb
a=rtcp-fb:98 transport-cc
a=rtcp-fb:98 ccm fir
a=rtcp-fb:98 nack
a=rtcp-fb:98 nack pli
a=fmtp:98 profile-id=0
a=rtpmap:99 rtx/90000
a=fmtp:99 apt=98
a=rtpmap:100 VP9/90000
a=rtcp-fb:100 goog-remb
a=rtcp-fb:100 transport-cc
a=rtcp-fb:100 ccm fir
a=rtcp-fb:100 nack
a=rtcp-fb:100 nack pli
a=fmtp:100 profile-id=2
a=rtpmap:101 rtx/90000
a=fmtp:101 apt=100
a=rtpmap:112 H264/90000
a=rtcp-fb:112 goog-remb
a=rtcp-fb:112 transport-cc
a=rtcp-fb:112 ccm fir
a=rtcp-fb:112 nack
a=rtcp-fb:112 nack pli
a=fmtp:112 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=64001f
a=rtpmap:113 rtx/90000
a=fmtp:113 apt=112
a=rtpmap:114 red/90000
a=rtpmap:115 rtx/90000
a=fmtp:115 apt=114
a=rtpmap:116 ulpfec/90000
a=ssrc-group:FID 849718510 1509050136
a=ssrc:849718510 cname:QRzuWSoz+FITsVB2
a=ssrc:849718510 msid:a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e 3aac68ad-76ad-477f-9104-d15e0d8a2e45
a=ssrc:1509050136 cname:QRzuWSoz+FITsVB2
a=ssrc:1509050136 msid:a3a2d7f9-9bb4-4328-bc2d-ba78cad01c8e 3aac68ad-76ad-477f-9104-d15e0d8a2e45

2023년 3월 27일 월요일 오전 1시 3분 23초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 27, 2023, 6:57:58 AM3/27/23
to kurento
Missing "m=application 1 UDP/DTLS/SCTP webrtc-datachannel" or something like this

sejon

unread,
Mar 27, 2023, 7:04:02 AM3/27/23
to kurento
Sorry, here's the correct one

v=0
o=- 3818632440245838050 2 IN IP4 127.0.0.1
s=-
t=0 0
a=group:BUNDLE 0 1 2
a=extmap-allow-mixed
a=msid-semantic: WMS d82dd54a-35b0-498b-8abb-c3ee89a29565

m=audio 9 UDP/TLS/RTP/SAVPF 111 63 9 0 8 13 110 126
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:LXIn
a=ice-pwd:2sU18FqNrKziVAgltTOKAUZc
a=ice-options:trickle
a=fingerprint:sha-256 65:9C:49:18:98:7A:A7:F3:06:0E:B1:3B:7B:79:2C:36:D2:15:EA:A2:13:44:F5:C3:EF:7E:53:22:83:B9:CA:C6

a=setup:actpass
a=mid:0
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=sendrecv
a=msid:d82dd54a-35b0-498b-8abb-c3ee89a29565 96d3641a-e4c1-4d78-8ee5-5f90cfd5bba9

a=rtcp-mux
a=rtpmap:111 opus/48000/2
a=rtcp-fb:111 transport-cc
a=fmtp:111 minptime=10;useinbandfec=1
a=rtpmap:63 red/48000/2
a=fmtp:63 111/111
a=rtpmap:9 G722/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:13 CN/8000
a=rtpmap:110 telephone-event/48000
a=rtpmap:126 telephone-event/8000
a=ssrc:2901731217 cname:e4JHsQBFPyhUZbzf
a=ssrc:2901731217 msid:d82dd54a-35b0-498b-8abb-c3ee89a29565 96d3641a-e4c1-4d78-8ee5-5f90cfd5bba9

m=video 9 UDP/TLS/RTP/SAVPF 96 97 102 103 104 105 106 107 108 109 127 125 39 40 45 46 98 99 100 101 112 113 114 115 116
c=IN IP4 0.0.0.0
a=rtcp:9 IN IP4 0.0.0.0
a=ice-ufrag:LXIn
a=ice-pwd:2sU18FqNrKziVAgltTOKAUZc
a=ice-options:trickle
a=fingerprint:sha-256 65:9C:49:18:98:7A:A7:F3:06:0E:B1:3B:7B:79:2C:36:D2:15:EA:A2:13:44:F5:C3:EF:7E:53:22:83:B9:CA:C6

a=setup:actpass
a=mid:1
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:13 urn:3gpp:video-orientation
a=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01
a=extmap:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay
a=extmap:6 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type
a=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing
a=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:11 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=sendrecv
a=msid:d82dd54a-35b0-498b-8abb-c3ee89a29565 fe25e082-159f-4b83-87d9-8c1864d6aa35
a=ssrc-group:FID 939836335 813719877
a=ssrc:939836335 cname:e4JHsQBFPyhUZbzf
a=ssrc:939836335 msid:d82dd54a-35b0-498b-8abb-c3ee89a29565 fe25e082-159f-4b83-87d9-8c1864d6aa35
a=ssrc:813719877 cname:e4JHsQBFPyhUZbzf
a=ssrc:813719877 msid:d82dd54a-35b0-498b-8abb-c3ee89a29565 fe25e082-159f-4b83-87d9-8c1864d6aa35
m=application 9 UDP/DTLS/SCTP webrtc-datachannel
c=IN IP4 0.0.0.0
a=ice-ufrag:LXIn
a=ice-pwd:2sU18FqNrKziVAgltTOKAUZc
a=ice-options:trickle
a=fingerprint:sha-256 65:9C:49:18:98:7A:A7:F3:06:0E:B1:3B:7B:79:2C:36:D2:15:EA:A2:13:44:F5:C3:EF:7E:53:22:83:B9:CA:C6
a=setup:actpass
a=mid:2
a=sctp-port:5000
a=max-message-size:262144

2023년 3월 27일 월요일 오후 7시 57분 58초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 27, 2023, 7:15:28 AM3/27/23
to kurento
Now I know, why I was triggered by your question. The offer doesn't look bad. Had the same problem, don't recall, how I solved this:


Maybe you try to munge your outgoing offer and change the port of the m=application from 9 to something else? "m=application 1" or so, this is a simple string replace. Easy to try.

Neil Young

unread,
Mar 27, 2023, 7:31:58 AM3/27/23
to kurento

sejon

unread,
Mar 27, 2023, 8:00:28 AM3/27/23
to kurento
https://groups.google.com/g/kurento/c/vQoGWkcjIGg

This looks like the same error.

Even if I change application 9 to application 1 as you mentioned, I still get the error.

Did you manage to solve it and how did you do it?

2023년 3월 27일 월요일 오후 8시 31분 58초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 27, 2023, 8:02:42 AM3/27/23
to kurento
Meanwhile I don't offer anymore towards KMS. I let it offer and answer. 

sejon

unread,
Mar 27, 2023, 11:28:23 AM3/27/23
to kurento
Oh...so if you come up with a workaround or find any relevant information, I'd really appreciate it if you could reply.

Have a nice day!

2023년 3월 27일 월요일 오후 9시 2분 42초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 27, 2023, 12:05:54 PM3/27/23
to kurento
I think my workaround was the reversal of control: Instead of generating an offer in the browser, sending it to KMS, getting the answer and bla bla, I'm now making KMS "generateOffer" and send the answer to it. That solved the data channel probs. For JS there is a "dataChannel" option when generating the webRtcEndpoint, I believe, there is something like this in Java too. You need to call "generateOffer" with the appropriate options on the KMS and then forward the offer to your other side. Then forward the answer back to KMS and good.

Neil Young

unread,
Mar 27, 2023, 1:12:58 PM3/27/23
to kurento
Hmm. I double checked your issue with a fresh installation of KMS 7. It seems to be no issue anymore. I took your offer and made KMS generate an answer (node js, directly on the KMS server):

This is my Node script. I got a valid answer, containing a datachannel description. No warning server side.


const kurento = require('kurento-client')

const sdpOffer =`
`

// If false, KMS will generate an offer
const do_offer = true

const test = async () => {
    try {
        let kurentoClient = await kurento('ws://localhost:8888/kurento', { failAfter: 5 })
        let pipeline = await kurentoClient.create('MediaPipeline')
        let webRtcEndpoint = await pipeline.create('WebRtcEndpoint', { useDataChannels: true })
       
        webRtcEndpoint.on('ConnectionStateChanged', (event) => {
            console.log(`ConnectionStateChanged ${JSON.stringify(event)}`)
        })
        webRtcEndpoint.on('MediaStateChanged', (event) => {
            console.log(`MediaStateChanged ${JSON.stringify(event)}`)
        })
        webRtcEndpoint.on('NewCandidatePairSelected', (event) => {
            console.log(`NewCandidatePairSelected, server ${event.candidatePair.localCandidate}`)
            console.log(`NewCandidatePairSelected, client ${event.candidatePair.remoteCandidate}`)
        })
        webRtcEndpoint.on('IceCandidateFound', (event) => {
            console.log(`IceCandidateFound ${event.candidate.candidate}, sdpMid: ${event.candidate.sdpMid}`)
        })
        webRtcEndpoint.on('IceGatheringDone', (event) => {
            console.log(`IceGatheringDone`)
        })
   
        await webRtcEndpoint.connect(webRtcEndpoint)

        if (!do_offer) {
            let offer = await webRtcEndpoint.generateOffer()
            console.log("KMS offer:\n", offer)
        }
        else {
            let answer = await webRtcEndpoint.processOffer(sdpOffer)
            console.log("KMS answer:\n", answer)
        }

        await webRtcEndpoint.gatherCandidates()

    }
    catch (e) {
        console.error(e)
    }
   
}

test()

Neil Young

unread,
Mar 28, 2023, 4:58:24 AM3/28/23
to kurento
Also no issue on KMS 6.18

sejon

unread,
Mar 29, 2023, 4:37:18 AM3/29/23
to kurento
I tried using the node.js code you provided.
However, I am still encountering the following error.
But when I set the "const do_offer = true" part in the code to false, the error does not occur.

Is there a problem with the part where the sdp offer is generated in Java springboot?
In Java, I defined the use of Datachannel as follows:
this.outgoingMedia = new WebRtcEndpoint
.Builder(pipeline)
.useDataChannels()
.build();
화면 캡처 2023-03-29 173607.png

The same issue occurs with both KMS 7.0 and 6.18.

2023년 3월 28일 화요일 오후 5시 58분 24초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 29, 2023, 4:55:18 AM3/29/23
to kurento
That's not an error. All fine

sejon

unread,
Mar 29, 2023, 7:42:44 AM3/29/23
to kurento
Just in case,
Is there a setting in the KMS server configuration to use datachannel? I'm running kms as a docker container.

2023년 3월 29일 수요일 오후 5시 55분 18초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Mar 29, 2023, 7:52:39 AM3/29/23
to kurento
No, there is not

sejon

unread,
Apr 2, 2023, 5:42:44 AM4/2/23
to kurento
I've tried several things since your last answer.
I finally configured the datachannel with the code below, and I don't get the usual error.

However, when I send a message through the datachannel, the message doesn't reach the other participants and I don't know where it went XD

Do you know of any similar symptoms?


function onExistingParticipants(msg) {
console.log(name + " registered in room " + roomId);
var participant = new Participant(name);
participants[name] = participant;
var video = participant.getVideoElement();

var options = {
localVideo: video,
mediaConstraints: constraints,
onicecandidate: participant.onIceCandidate.bind(participant),
dataChannels : true,
dataChannelConfig: {
onmessage : onMessage,
onopen : () => onOpen(participant),
onclose : onClosed,
onbufferedamountlow : onbufferedamountlow,
onerror : onError
}
}

participant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,
function (error) {
if (error) {
return console.error(error);
}

this.generateOffer(participant.offerToReceiveVideo.bind(participant));

});


msg.data.forEach(sender => receiveVideo(sender));
}

function receiveVideo(sender) {
var participant = new Participant(sender);
participants[sender] = participant;
var video = participant.getVideoElement();

var options = {
remoteVideo: video,
onicecandidate: participant.onIceCandidate.bind(participant)
}

participant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,
function (error) {
if (error) {
return console.error(error);
}

this.generateOffer(participant.offerToReceiveVideo.bind(participant));

});
}


Also, in the spring boot, I created the code below.
this.outgoingMedia = new WebRtcEndpoint.Builder(pipeline).useDataChannels()
.build();

outgoingMedia.addDataChannelOpenedListener(ev -> {
outgoingMedia.createDataChannel(roomName);
log.info("event : {}", ev.getSource());
});

outgoingMedia.connect(kmsShowData);
outgoingMedia.connect(kmsSendData);


p.s) I also encountered a MEDIA_OBJECT_OPERATION_NOT_SUPPORTED error in the middle, which I solved by checking your previous post. thanks!

https://groups.google.com/g/kurento/c/QWicNUely6A
2023년 3월 29일 수요일 오후 8시 52분 39초 UTC+9에 Neil Young님이 작성:

Neil Young

unread,
Apr 2, 2023, 10:57:34 AM4/2/23
to kurento
Well, you can't expect me to skim code splits of an unknown implementations. I not even know anything about your entire use case. I for sure can tell you: WebRTC data channel works with Kurento. But I'm using Node JS as server side proxy for KMS and JS code (or GStreamer) to feed it.

You should intercept the data-channel related callbacks (example):

webRtcEndpoint.on('DataChannelOpened', () => {
this.logger.silly(`publisher/${room}: DataChannelOpened`)
})
webRtcEndpoint.on('DataChannelClosed', () => {
this.logger.silly(`publisher/${room}: DataChannelClosed`)
})

Also, if I skim my code, I see this on the publisher and subscriber side:

await webRtcEndpoint.createDataChannel()


I'm calling this when the KMS signals a media state change from DISCONNECTED to CONNECTED:


webRtcEndpoint.on('MediaStateChanged', (event) => {
if (event.newState === "CONNECTED" && event.oldState === "DISCONNECTED") {
await webRtcEndpoint.createDataChannel()
}
})


Then you have a lot of means with WebRTC internals or about://webrtc to examine, what happens in the browser with the datachannels. There is statistics for send and receive.

sejon

unread,
Apr 7, 2023, 6:36:25 AM4/7/23
to kurento

Maybe something's wrong with the code in my project or the settings on the server or something.
But thank you so much for answering my questions again and again.
Have a great day!
2023년 4월 2일 일요일 오후 11시 57분 34초 UTC+9에 Neil Young님이 작성:

sejon

unread,
Oct 4, 2023, 9:16:01 PM10/4/23
to kurento
After a long time, I was eventually able to solve the problem. At the same time, I also realized that I was very stupid XD
Anyway, to summarize, in the following environment, I was sending and receiving messages via dataChannel.
- KMS 7.0 : I used a docker image and deployed it via kubernetes.
- Java :
new WebRtcEndpoint.Builder(pipeline)
.useDataChannels()
.build();
- JS
var options = {
remoteVideo: video,
remoteAudio : audio,
onicecandidate: participant.onIceCandidate.bind(participant),
dataChannels : true, // dataChannel 사용 여부
dataChannelConfig: { // dataChannel event 설정
id : dataChannel.getChannelName,
onopen : dataChannel.handleDataChannelOpen,
onclose : dataChannel.handleDataChannelClose,
onmessage : dataChannel.handleDataChannelMessageReceived,
onerror : dataChannel.handleDataChannelError
},
configuration: { // 이 부분에서 TURN 서버 연결 설정
iceServers: [
{
urls: turnUrl,
username: turnUser,
credential: turnPwd
}
]
}
}

participant.rtcPeer = new kurentoUtils.WebRtcPeer.WebRtcPeerSendrecv(options,
function (error) {
if (error) {
return console.error(error);
}
this.generateOffer(participant.offerToReceiveVideo.bind(participant));
});
2023년 4월 7일 금요일 오후 7시 36분 25초 UTC+9에 sejon님이 작성:
Reply all
Reply to author
Forward
0 new messages