Skip to content

Commit

Permalink
Moved all NPM "dependencies" to "devDependencies"
Browse files Browse the repository at this point in the history
It helps us deliver a clean standalone RTCMultiConnection package on NPM
store.

When you install "npm install RTCMultiConnection" it will merely
download RTCMultiConnection.js scripts. A clean and tinny package.

If you need RTCMultiConnection-Server or if you want to test demos then
please try "npm install". It will install all required packages.

i.e.
npm install RTCMultiConnection
cd node_modules/rtcmulticonnection
npm install
node server --port=9001
  • Loading branch information
muaz-khan committed Dec 20, 2018
1 parent 0bf56f2 commit fb70be2
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 72 deletions.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,16 @@

```sh
mkdir demo && cd demo

# install from NPM
npm install rtcmulticonnection

# or clone from github
git clone https://github.com/muaz-khan/RTCMultiConnection.git ./
npm install --production

# install all required packages
# you can optionally include --save-dev
npm install
node server --port=9001
```

Expand All @@ -31,6 +39,7 @@ connection.socketURL = 'https://webrtcweb.com:9001/';

```sh
npm install rtcmulticonnection-server
node server --port=9001
```

For more info, please check:
Expand Down Expand Up @@ -58,12 +67,14 @@ For more info, please check:
## iOS+Android Demo Apps

* https://github.com/muaz-khan/cordova-mobile-apps
* https://webrtcweb.com/cordova-apps/

> Note: RTCMultiConnection supports Safari-11 and Edge.
## Wiki Pages

* https://github.com/muaz-khan/RTCMultiConnection/wiki
* https://github.com/muaz-khan/RTCMultiConnection-Server/wiki

## License

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtcmulticonnection",
"description": "RTCMultiConnection is a WebRTC JavaScript wrapper library runs top over RTCPeerConnection API to provide multi-session establishment scenarios.",
"version": "3.5.9",
"version": "3.6.1",
"authors": [
{
"name": "Muaz Khan",
Expand Down
6 changes: 5 additions & 1 deletion dev/MultiPeersHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ function MultiPeers(connection) {
if (!isNull(data.size) && !isNull(data.type)) {
if (connection.enableFileSharing) {
self.shareFile(data, remoteUserId);
return;
}

if (typeof data !== 'string') {
data = JSON.stringify(data);
}
return;
}

if (data.type !== 'text' && !(data instanceof ArrayBuffer) && !(data instanceof DataView)) {
Expand Down
5 changes: 1 addition & 4 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,7 @@
# iOS+Android Demo Apps

* http://webrtcweb.com/cordova-apps/

## Twitter

* https://twitter.com/WebRTCWeb i.e. @WebRTCWeb
* https://github.com/muaz-khan/cordova-mobile-apps

## License

Expand Down
4 changes: 0 additions & 4 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,6 @@ You can use `jsfiddle.net` for testing purpose.
6. [How to write iOS/Android applications?](https://github.com/muaz-khan/RTCMultiConnection/tree/master/docs/ios-android.md)
7. [Tips & Tricks](https://github.com/muaz-khan/RTCMultiConnection/blob/master/docs/tips-tricks.md)

## Twitter

* https://twitter.com/WebRTCWeb i.e. @WebRTCWeb

## License

[RTCMultiConnection](https://github.com/muaz-khan/RTCMultiConnection) is released under [MIT licence](https://github.com/muaz-khan/RTCMultiConnection/blob/master/LICENSE.md) . Copyright (c) [Muaz Khan](http://www.MuazKhan.com/).
33 changes: 1 addition & 32 deletions docs/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
* [Getting Started guide for RTCMultiConnection](https://github.com/muaz-khan/RTCMultiConnection/tree/master/docs/getting-started.md)

All files from `/dist` directory are available on CDN: `https://cdn.webrtc-experiment.com:443/`

```html
<!-- or -->
<script src="/dist/RTCMultiConnection.min.js"></script>
Expand Down Expand Up @@ -87,32 +85,7 @@ Here is a demo explaining how to use above `socketURL`:

## Integrate in your own applications?

> Note: this section works only with v3.4.6 or earlier releases.
```javascript
// node.js code
require('./Signaling-Server.js')(httpServerHandlerOrPort);
```

If you're using [express.js](http://stackoverflow.com/a/35985109/552182):

```javascript
var fs = require('fs');

var options = {
key: fs.readFileSync('fake-keys/privatekey.pem'),
cert: fs.readFileSync('fake-keys/certificate.pem')
};

var express = require("express"),
http = require("https"), // Use HTTPs here -------------
app = express(),
server = http.createServer(options, app);

server.listen(3000);

require('./Signaling-Server.js')(server);
```
* https://github.com/muaz-khan/RTCMultiConnection-Server/wiki/Integrate-inside-nodejs-applications

# Other Documents

Expand All @@ -123,10 +96,6 @@ require('./Signaling-Server.js')(server);
5. [How to write iOS/Android applications?](https://github.com/muaz-khan/RTCMultiConnection/tree/master/docs/ios-android.md)
6. [Tips & Tricks](https://github.com/muaz-khan/RTCMultiConnection/blob/master/docs/tips-tricks.md)

## Twitter

* https://twitter.com/WebRTCWeb i.e. @WebRTCWeb

## License

[RTCMultiConnection](https://github.com/muaz-khan/RTCMultiConnection) is released under [MIT licence](https://github.com/muaz-khan/RTCMultiConnection/blob/master/LICENSE.md) . Copyright (c) [Muaz Khan](http://www.MuazKhan.com/).
13 changes: 8 additions & 5 deletions docs/installation-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
```sh
git clone https://github.com/muaz-khan/RTCMultiConnection.git ./
npm install --production
npm install
```

Or download ZIP:
Expand All @@ -20,15 +20,14 @@ wget https://github.com/muaz-khan/RTCMultiConnection/archive/master.zip
unzip master.zip
```

Then call `npm install --production`.
Then call `npm install`.

Use `--production` to skip `grunt` dependencies. You don't need `grunt` until you modify library itself.

# Install using NPM or Bower


```sh
npm install rtcmulticonnection --production
npm install rtcmulticonnection

# or
bower install rtcmulticonnection
Expand All @@ -37,14 +36,18 @@ bower install rtcmulticonnection
# Run `server.js`

```sh
# install all required packages first
npm install

# then run the server
node server.js
```

Now open `http://localhost:9001/`.

# Modify config.json

* https://github.com/muaz-khan/RTCMultiConnection/blob/master/config.json
* https://github.com/muaz-khan/RTCMultiConnection-Server/wiki/config.json

```json
{
Expand Down
8 changes: 6 additions & 2 deletions docs/ios-android.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
>
> So you do not need to build a cordova or ionic application.
Here is list of all cordova/iosnic demos:

* https://github.com/muaz-khan/cordova-mobile-apps

Please check these docs as well:

* [Write iOS apps using RTCMultiConnection](http://www.rtcmulticonnection.org/docs/Write-iOS-Apps/)
Expand Down Expand Up @@ -101,8 +105,8 @@ cordova platform remove ios
cordova platform remove android

# add latest platform versions
cordova platform add ios
cordova platform add android
cordova platform add [email protected]
cordova platform add [email protected]
```

# Build your Apps
Expand Down
10 changes: 3 additions & 7 deletions docs/tips-tricks.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
## How to secure your socket.io usage?

Modify [`Signaling-Server.js`](https://github.com/muaz-khan/RTCMultiConnection/blob/master/Signaling-Server.js) and add this line:
Modify [`Signaling-Server.js`](https://github.com/muaz-khan/RTCMultiConnection-Server/blob/master/node_scripts/Signaling-Server.js) and add this line:

```javascript
io.on('connection', onConnection);
Expand Down Expand Up @@ -36,7 +36,7 @@ Now you've restricted the usage of socket.io only on domain `https://domain.com:

## How to arrange videos?

It happens all insidde the [`onstream`](http://www.rtcmulticonnection.org/docs/onstream/) event.
It happens all insidde the [`onstream`](https://www.rtcmulticonnection.org/docs/onstream/) event.

```javascript
connection.onstream = function(event) {
Expand Down Expand Up @@ -380,7 +380,7 @@ v3 users can get list of existing public-rooms using this API (`connection.getPu

* https://github.com/muaz-khan/RTCMultiConnection/blob/master/docs/api.md#getpublicmoderators

However v2 users can use `connection.onNewSession` event: http://www.rtcmulticonnection.org/docs/onNewSession/
However v2 users can use `connection.onNewSession` event: https://www.rtcmulticonnection.org/docs/onNewSession/

# Other Documents

Expand All @@ -392,10 +392,6 @@ However v2 users can use `connection.onNewSession` event: http://www.rtcmulticon
6. [How to write iOS/Android applications?](https://github.com/muaz-khan/RTCMultiConnection/tree/master/docs/ios-android.md)
7. [Tips & Tricks](https://github.com/muaz-khan/RTCMultiConnection/blob/master/docs/tips-tricks.md)

## Twitter

* https://twitter.com/WebRTCWeb i.e. @WebRTCWeb

## License

[RTCMultiConnection](https://github.com/muaz-khan/RTCMultiConnection) is released under [MIT licence](https://github.com/muaz-khan/RTCMultiConnection/blob/master/LICENSE.md) . Copyright (c) [Muaz Khan](http://www.MuazKhan.com/).
2 changes: 1 addition & 1 deletion docs/upgrade.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Upgrade

> This page explains how to upgrade to latest version (v3).
> This page explains how to upgrade to latest version (v3 or higher).
Use `streamEvents` instead of `connection.streams`:

Expand Down
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtcmulticonnection",
"preferGlobal": false,
"version": "3.5.9",
"version": "3.6.1",
"author": {
"name": "Muaz Khan",
"email": "[email protected]",
Expand All @@ -13,7 +13,9 @@
"url": "https://github.com/muaz-khan/RTCMultiConnection.git"
},
"scripts": {
"start": "node server.js"
"start": "node server.js",
"heroku-prebuild": "export NPM_CONFIG_PRODUCTION=false; export NODE_ENV=; NPM_CONFIG_PRODUCTION=false NODE_ENV=development npm install --only=dev --dev",
"heroku-postbuild": "export NPM_CONFIG_PRODUCTION=true; export NODE_ENV=production;"
},
"engines": {
"node": "latest"
Expand Down Expand Up @@ -42,18 +44,7 @@
"muaz",
"muaz-khan"
],
"dependencies": {
"rtcmulticonnection-server": "latest",
"detectrtc": "latest",
"recordrtc": "latest",
"getstats": "latest",
"fbr": "latest",
"webrtc-screen-capturing": "latest",
"socket.io": "latest",
"webrtc-adapter": "latest",
"canvas-designer": "latest",
"multistreamsmixer": "latest"
},
"dependencies": {},
"analyze": false,
"license": "MIT",
"readmeFilename": "README.md",
Expand All @@ -65,6 +56,16 @@
"tonicExampleFilename": "npm-test.js",
"_from": "rtcmulticonnection@",
"devDependencies": {
"rtcmulticonnection-server": "latest",
"detectrtc": "latest",
"recordrtc": "latest",
"getstats": "latest",
"fbr": "latest",
"webrtc-screen-capturing": "latest",
"socket.io": "latest",
"webrtc-adapter": "latest",
"canvas-designer": "latest",
"multistreamsmixer": "latest",
"grunt": "0.4.5",
"grunt-bump": "0.7.0",
"grunt-cli": "0.1.13",
Expand Down

0 comments on commit fb70be2

Please sign in to comment.