<commit_before>## tiny webRTC


WebRTC is a brand new technology for the Web that allows users to establish a peer-to-peer connection and share video, audio and data. In contrast to previous techniques this allows much higher data speeds without a server in the middle that can easily be a bottleneck for applications with a large number of users.
The area of application for this new technique is significant and reaches from simple chat applications to complex video chat programs with the ability to send files and share the screen.
However it is not an easy way to implement WebRTC for the browser and requieres some server-side work as well to establish the connection. The plugin tiny-webrtc was developed for this purpose and provides a simple API that can be used by virtually anyone.

This Project is still under development and change requests are welcome!

The code is only tested in latest Chrome, since it is used in a Chrome Packaged App.


## Installation

Grab one of the files from the dist folder.

Bower support coming soon!


## Usage

As shown in the sample.html (client/sample.html) you can create a webRTC Object by calling 

``` js
var webRTC = new WebRTC();
```

To listen to events you can hook up some callback functions.

``` js
webRTC.onLoad(function () {}} // called when tiny-webRTC is loaded
webRTC.onInit(function () {}} // called when tiny-webRTC is initialized
webRTC.onScriptLoaded(function () {}} // called when server script is loaded
webRTC.onCameraAccess(function (localStreamURL) {}} // called when camera access is granted
webRTC.onReady(function (userId) {}} // called when script is ready and userId is available
webRTC.onRoomJoin(function (roomNumber) {}} // called when room is joined<commit_msg>updated bower<commit_after>## tiny webRTC


WebRTC is a brand new technology for the Web that allows users to establish a peer-to-peer connection and share video, audio and data. In contrast to previous techniques this allows much higher data speeds without a server in the middle that can easily be a bottleneck for applications with a large number of users.
The area of application for this new technique is significant and reaches from simple chat applications to complex video chat programs with the ability to send files and share the screen.
However it is not an easy way to implement WebRTC for the browser and requieres some server-side work as well to establish the connection. The plugin tiny-webrtc was developed for this purpose and provides a simple API that can be used by virtually anyone.

This Project is still under development and change requests are welcome!

The code is only tested in latest Chrome, since it is used in a Chrome Packaged App.


## Installation

Grab one of the files from the dist folder.

### Bower
```
$ bower install https://github.com/paul-em/tiny-webrtc.git
```
bower_components/tiny-webrtc/dist/tiny-webrtc.min.js



## Usage

As shown in the sample.html (client/sample.html) you can create a webRTC Object by calling 

``` js
var webRTC = new WebRTC();
```

To listen to events you can hook up some callback functions.

``` js
webRTC.onLoad(function () {}} // called when tiny-webRTC is loaded
webRTC.onInit(function () {}} // called when tiny-webRTC is initialized
webRTC.onScriptLoaded(function () {}} // called when server script is loaded
webRTC.onCameraAccess(function (localStreamURL) {}} // called when camera access is granted
webRTC.onReady(function (userId) {}} // called when script is ready and userId is available
webRTC.onRoomJoin(function (roomNumber) {}} // called when room is joined
{'fraction_non_alphanumeric': 0.062151616499442584, 'fraction_numerical': 0.0, 'mean_word_length': 4.396992481203007, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3154136', 'n_tokens_mistral': 931, 'n_tokens_neox': 885, 'n_words': 503}