My node app controls the KMS via 8888. I’m opening the webRtcEndpoint with data channels enabled. At least I hope so:
let kurentoClient = await kurento('ws://localhost:8888/kurento', { failAfter: 5 }) let pipeline = await kurentoClient.create('MediaPipeline') let webRtcEndpoint = await pipeline.create('WebRtcEndpoint', {useDataChannels: true})Later, before making KMS generating an offer I call
await webRtcEndpoint.connect(webRtcEndpoint) await webRtcEndpoint.createDataChannel() console.log(await webRtcEndpoint.generateOffer()) await webRtcEndpoint.gatherCandidates()I expected to see the data channel pattern in the offer, but instead I get:
Trace: Error: Data channels are not supported at /home/ubuntu/kms-test/node_modules/kurento-client/lib/KurentoClient.js:365:24 at Object.dispatchCallback [as callback] (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:546:9) at processResponse (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:667:15) at RpcBuilder.decode (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:723:5) at Stream.transportMessage (/home/ubuntu/kms-test/node_modules/kurento-jsonrpc/lib/index.js:208:10) at Stream.emit (events.js:314:20) at Stream.EventEmitter.emit (domain.js:483:12) at drain (/home/ubuntu/kms-test/node_modules/through/index.js:36:16) at Stream.stream.queue.stream.push (/home/ubuntu/kms-test/node_modules/through/index.js:45:5) at WebsocketStream.onMessage (/home/ubuntu/kms-test/node_modules/websocket-stream/index.js:45:15) { code: 40111, data: { type: 'MEDIA_OBJECT_OPERATION_NOT_SUPPORTED' } } at Object.noop (/home/ubuntu/kms-test/node_modules/kurento-client-elements/lib/WebRtcEndpoint.js:35:22) at callback2 (/home/ubuntu/kms-test/node_modules/promisecallback/index.js:27:25) at processTicksAndRejections (internal/process/task_queues.js:97:5) at async test (/home/ubuntu/kms-test/index.js:42:9)I can’t find the origin of this error in the sources.
Being supported means that the WebRtcEndpoint has been created with data channel support, the client also supports data channels, and they have been negotiated in the SDP exchange. Otherwise, the method throws an exception, indicating that the operation is not possible.
--
You received this message because you are subscribed to the Google Groups "kurento" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kurento+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/50544ec7-56db-441c-87e8-dc4c12e9bef8n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kurento/ca95288c-85de-42d2-a68d-745524a2f9een%40googlegroups.com.
0:00:15.313615029 1276 0x7284a4f0 ERROR webrtcbin gstwebrtcbin.c:4333:_set_description_task:<webrtcbin> media 1 is missing or contains an empty 'setup' attribute
This seems to be a reaction to the "a=inactive".
The KMS does not reach MediaState:Connected, instead it traces:
2021-11-30T08:55:39.294Z silly: Publisher: IceComponentStateChange state CONNECTING, streamId 1, componentId 1
2021-11-30T08:55:39.294Z silly: Publisher: IceComponentStateChange state CONNECTING, streamId 1, componentId 2
2021-11-30T08:55:46.511Z silly: Publisher: IceComponentStateChange state FAILED, streamId 1, componentId 1
2021-11-30T08:55:46.513Z silly: Publisher: IceComponentStateChange state FAILED, streamId 1, componentId 2
kmssdpagent.c:1568 create_media_answer() <KmsSdpAgent@0xffff6001bcd0> Not negotiated media offered with port set to 0
Is this the reaction to "m=application 0"?