CKC
Civilized Kurento Client provides wrapper classes for kurento-client functionality.
Usage
npm install --save ckc
const CKC = require('ckc')
const WebRtcEndpoint = CKC.WebRtcEndpoint
const KurentoClientFactory = CKC.KurentoClientFactory
async function test (kurentoServerUrl) {
const kurentoClient = await KurentoClientFactory.build(kurentoServerUrl)
let mediaPipeLine = await kurentoClient.createMediaPipeline()
let webRtcEndpoint = await WebRtcEndpoint.build(mediaPipeLine)
webRtcEndpoint.addIceCandidate(iceCandidate)
webRtcEndpoint.onIceCandidate(async function (iceCandidate) {
console.log(`Received ice candidate: ${iceCandidate}`)
})
let sdpAnswer = await webRtcEndpoint.processOffer(sdpOffer)
await webRtcEndpoint.gatherCandidates()
}
test('ws://localhost:8888/kurento')