1.0.0 • Published 4 years ago

telexpert-client-webrtc v1.0.0

Weekly downloads
-
License
-
Repository
github
Last release
4 years ago

TelExpert.Client.WebRTC

A re-usable TelExpert WebRTC Client.

Quick start

Several quick start options are available:

  • Clone the repo: git clone git@github.com:hthetiot/TelExpert.Client.WebRTC.git.
  • Install with Bower: bower login -t && bower install github.com:hthetiot/TelExpert.Client.WebRTC.git.
  • Install with npm: npm install ssh://git@github.com:hthetiot/TelExpert.Client.WebRTC.git.

Installation Instructions

Load dist/Client.js OR import TelExpert.Client.WebRTC/Client in your project.

Script loading methods

// TODO

Example using TelExpert.Client.WebRTC Object instance.

var client = new Client({
    serverUrl: 'https://localhost:44396',
    connectInitAuto: false,
    mediaInitAuto: false,
    peerCallRoomAuto: true,
    roomName: "test",
    iceServers: [{ 
        "urls": "stun:stun.l.google.com:19302" }, 
        { "urls": "stun:stun4.l.google.com:19302" }
    ],
    credentials: "...."
});

client.getUserMedia().then(() => {
    return client.connect().then(() => {
        return client.joinRoom('test').then(() => {
            return client.sendRoomMsg('test').then(function () {
                console.log('message sent');
            });
        });
    });
}).catch((err) => {
    console.error('Failed', err);
});

Building

Prerequisites

  • Node.js - Download and Install Node.js.

Building, Running and debugging

Build setup

Install NPM packages in root dir to install it's dependencies.

$ npm install

Build Commands

After you completed Tools prerequisites and Build setup steps you can use these commands:

$ npm run build

Running Commands

$ npm run start

Contributing

**We ask that you DO minify pull requests... You need to minify please build pull request in separate branch, and merge and minify in your master.

$ git co -b bugfix/bla-bla
$ npm run jslint
$ npm run release
$ git push -m "fix bla bla"

Troubleshooting

To clone this git repository, Github require from you to deploy an ssh-key for authentication:

Credits

Harold Thetiot

License

Exelus, all rights reserved.

1.0.0

4 years ago