Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xaqron/ckc
Kurento Client async/await
https://github.com/xaqron/ckc
async-await kurento kurento-client media-server nodejs webrtc
Last synced: about 11 hours ago
JSON representation
Kurento Client async/await
- Host: GitHub
- URL: https://github.com/xaqron/ckc
- Owner: Xaqron
- License: mit
- Created: 2017-11-02T15:00:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-31T02:57:30.000Z (almost 7 years ago)
- Last Synced: 2024-12-14T07:53:50.382Z (about 2 months ago)
- Topics: async-await, kurento, kurento-client, media-server, nodejs, webrtc
- Language: JavaScript
- Homepage:
- Size: 45.9 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# CKC #
Civilized Kurento Client provides wrapper classes for kurento-client functionality.
## Usage ##
```bash
npm install --save ckc
``````js
const CKC = require('ckc')
const WebRtcEndpoint = CKC.WebRtcEndpoint
const KurentoClientFactory = CKC.KurentoClientFactoryasync function test (kurentoServerUrl) {
const kurentoClient = await KurentoClientFactory.build(kurentoServerUrl)
let mediaPipeLine = await kurentoClient.createMediaPipeline()
let webRtcEndpoint = await WebRtcEndpoint.build(mediaPipeLine)
// Add client ice candidates in a loop
webRtcEndpoint.addIceCandidate(iceCandidate)
// here you can get generated ice candidates
webRtcEndpoint.onIceCandidate(async (iceCandidate) => {
console.log(`Received ice candidate: ${iceCandidate}`)
// send generated ice candidates to client
})
// Using client sdp offer generate answer and send to client
let sdpAnswer = await webRtcEndpoint.processOffer(sdpOffer)
await webRtcEndpoint.gatherCandidates()
}test('ws://localhost:8888/kurento')
```## Changelog ##
**0.5.1**
* `PlayerEndpoint.stop()` method added.
* `PlayerEndpoint.isPlaying` property added (`boolean`).
* `Play` method now gets a `callback` to call at the end of video.