0.19.0 • Published 6 years ago

kcl v0.19.0

Weekly downloads
2
License
MIT
Repository
-
Last release
6 years ago

kcl

A promise-based client for the Kurento Media Server, for the browser or Node.js

Building

kcl uses gulp as the task manager, and building kcl requires a global gulp installation.

  1. (If not alreaady installed) Install gulp globally by running npm install -g gulp
  2. Install the npm packages running npm install
  3. Run gulp browser to build the browser version
  4. Run gulp server to build the server version

Installation

  • Node.js: run npm install --save kcl to install from NPM.
  • Browser: copy the kcl.browser.js script from the /browser directory into a public directory, and link to it from your HTML file by using the <script> tag.

Usage

In node, you can include KCL by using this statement: const KCL = require("kcl");

To connect to a running KMS instance, run the following code: var client = new KCL("ws://kmsserver.domain:8888/kurento")
and replace kmsserver.domain with the hostname or IP of the KMS instance and 8888 with the IP of the KMS server. The /kurento path is the default path that KMS listens to, if you have modified the settings and changed this path, change it here to match as well.

Methods

ping
Used to check the connectivity status with the server.

Example usage:

client.ping().then((response) => {
	console.log(response);
});

or if you want to use async syntax:

let response = await client.ping();
console.log(response);

The expected response should be a JSONRPC 2.0 object with a structure similar to this one:

{
    "id": "cf8a653d-e912-1404-9a84-bef9d191b8eb",
    "result": {
        "value": "pong"
    },
    "jsonrpc": "2.0"
}

The existence of this response indicates a proper connection to the KMS.

License: MIT

Copyright 2016 Ermir Suldashi

0.19.0

6 years ago

0.18.0

6 years ago

0.17.0

6 years ago

0.15.0

6 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.11.0

7 years ago

0.10.5

7 years ago

0.10.4

7 years ago

0.10.3

7 years ago

0.10.2

7 years ago

0.10.1

7 years ago

0.10.0

7 years ago

0.9.0

7 years ago

0.8.0

7 years ago

0.5.3

7 years ago

0.5.2

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.0

7 years ago