Skip to content

Commit

Permalink
Added rtcmulticonnection-v3@3.4.3
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed Nov 25, 2016
1 parent caa6348 commit 30068fd
Show file tree
Hide file tree
Showing 12 changed files with 242 additions and 45 deletions.
6 changes: 5 additions & 1 deletion README.md
Expand Up @@ -11,6 +11,10 @@
>
> v3 can use XHR/XMPP/etc. signaling implementations as well. Please check [PubNubConnection.js](https://github.com/muaz-khan/RTCMultiConnection/blob/master/dev/PubNubConnection.js) to see how to configure it for 3rd party signaling implementations. You simply have to modify top few lines.
# Install On Your Own Site

* https://github.com/muaz-khan/RTCMultiConnection/tree/master/docs/installation-guide.md

# YouTube videos

1. [Getting started guide / RTCMultiConnection](https://www.youtube.com/watch?v=jqtC7mSTCgk)
Expand All @@ -35,7 +39,7 @@ RTCMultiConnection-v2 (old) videos: https://vimeo.com/muazkh

# iOS+Android Demo Apps

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

# v3 Demos

Expand Down
2 changes: 1 addition & 1 deletion bower.json
@@ -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.4.2",
"version": "3.4.3",
"authors": [
{
"name": "Muaz Khan",
Expand Down
16 changes: 12 additions & 4 deletions dev/IceServersHandler.js
Expand Up @@ -86,10 +86,18 @@ var IceServersHandler = (function() {
var iceServers = [];

iceServers.push(getSTUNObj('stun:stun.l.google.com:19302'));
iceServers.push(getTURNObj('turn:webrtcweb.com:80', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:443', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:3344', 'muazkh', 'muazkh')); // resiprocate
iceServers.push(getTURNObj('turn:webrtcweb.com:4433', 'muazkh', 'muazkh')); // resiprocate

iceServers.push(getTURNObj('stun:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:8877', 'muazkh', 'muazkh')); // coTURN

iceServers.push(getTURNObj('turns:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turns:webrtcweb.com:8877', 'muazkh', 'muazkh')); // coTURN

// iceServers.push(getTURNObj('turn:webrtcweb.com:3344', 'muazkh', 'muazkh')); // resiprocate
// iceServers.push(getTURNObj('turn:webrtcweb.com:4433', 'muazkh', 'muazkh')); // resiprocate

iceServers.push(getTURNObj('stun:webrtcweb.com:4455', 'muazkh', 'muazkh')); // restund
iceServers.push(getTURNObj('turn:webrtcweb.com:4455', 'muazkh', 'muazkh')); // restund
iceServers.push(getTURNObj('turn:webrtcweb.com:5544?transport=tcp', 'muazkh', 'muazkh')); // restund

Expand Down
21 changes: 19 additions & 2 deletions dev/SocketConnection.js
Expand Up @@ -20,10 +20,27 @@ function SocketConnection(connection, connectCallback) {
io.sockets = {};
} catch (e) {};

if (!connection.socketURL) {
connection.socketURL = '/';
}

if (connection.socketURL.substr(connection.socketURL.length - 1, 1) != '/') {
// connection.socketURL = 'https://domain.com:9001/';
throw '"socketURL" MUST end with a slash.';
}

if (connection.enableLogs) {
if (connection.socketURL == '/') {
console.info('socket.io is connected at: ', location.origin + '/');
} else {
console.info('socket.io is connected at: ', connection.socketURL);
}
}

try {
connection.socket = io((connection.socketURL || '/') + parameters);
connection.socket = io(connection.socketURL + parameters);
} catch (e) {
connection.socket = io.connect((connection.socketURL || '/') + parameters, connection.socketOptions);
connection.socket = io.connect(connection.socketURL + parameters, connection.socketOptions);
}

// detect signaling medium
Expand Down
39 changes: 32 additions & 7 deletions dist/RTCMultiConnection.js
@@ -1,4 +1,4 @@
// Last time updated: 2016-11-22 12:00:27 PM UTC
// Last time updated: 2016-11-25 6:09:38 PM UTC

// _________________________
// RTCMultiConnection v3.4.2
Expand Down Expand Up @@ -1632,10 +1632,27 @@
io.sockets = {};
} catch (e) {};

if (!connection.socketURL) {
connection.socketURL = '/';
}

if (connection.socketURL.substr(connection.socketURL.length - 1, 1) != '/') {
// connection.socketURL = 'https://domain.com:9001/';
throw '"socketURL" MUST end with a slash.';
}

if (connection.enableLogs) {
if (connection.socketURL == '/') {
console.info('socket.io is connected at: ', location.origin + '/');
} else {
console.info('socket.io is connected at: ', connection.socketURL);
}
}

try {
connection.socket = io((connection.socketURL || '/') + parameters);
connection.socket = io(connection.socketURL + parameters);
} catch (e) {
connection.socket = io.connect((connection.socketURL || '/') + parameters, connection.socketOptions);
connection.socket = io.connect(connection.socketURL + parameters, connection.socketOptions);
}

// detect signaling medium
Expand Down Expand Up @@ -4724,10 +4741,18 @@
var iceServers = [];

iceServers.push(getSTUNObj('stun:stun.l.google.com:19302'));
iceServers.push(getTURNObj('turn:webrtcweb.com:80', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:443', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:3344', 'muazkh', 'muazkh')); // resiprocate
iceServers.push(getTURNObj('turn:webrtcweb.com:4433', 'muazkh', 'muazkh')); // resiprocate

iceServers.push(getTURNObj('stun:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turn:webrtcweb.com:8877', 'muazkh', 'muazkh')); // coTURN

iceServers.push(getTURNObj('turns:webrtcweb.com:7788', 'muazkh', 'muazkh')); // coTURN
iceServers.push(getTURNObj('turns:webrtcweb.com:8877', 'muazkh', 'muazkh')); // coTURN

// iceServers.push(getTURNObj('turn:webrtcweb.com:3344', 'muazkh', 'muazkh')); // resiprocate
// iceServers.push(getTURNObj('turn:webrtcweb.com:4433', 'muazkh', 'muazkh')); // resiprocate

iceServers.push(getTURNObj('stun:webrtcweb.com:4455', 'muazkh', 'muazkh')); // restund
iceServers.push(getTURNObj('turn:webrtcweb.com:4455', 'muazkh', 'muazkh')); // restund
iceServers.push(getTURNObj('turn:webrtcweb.com:5544?transport=tcp', 'muazkh', 'muazkh')); // restund

Expand Down
8 changes: 4 additions & 4 deletions dist/RTCMultiConnection.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/README.md
Expand Up @@ -29,7 +29,7 @@

# iOS+Android Demo Apps

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

## Twitter

Expand Down
2 changes: 2 additions & 0 deletions docs/api.md
Expand Up @@ -1102,6 +1102,8 @@ connection.onSettingLocalDescription = fucntion(event) {
(function looper() {
if(tries > 10) return; // throw error here

tries++;

// make sure that each user's video.id == hisUserID
var video = document.getElementById(event.userid);

Expand Down
70 changes: 64 additions & 6 deletions docs/installation-guide.md
Expand Up @@ -4,21 +4,79 @@
* Youtube Video: [NPM install](https://www.youtube.com/watch?v=EtsiYEW_T8Y) or [Other Videos](https://www.youtube.com/watch?v=EtsiYEW_T8Y&list=PLPRQUXAnRydKdyun-vjKPMrySoow2N4tl)

Or fetch latest code via github:
# Fetch from Github

> Github is strongly recommended. NPM or TAR are secondary options.
```sh
git clone https://github.com/muaz-khan/RTCMultiConnection.git ./RTCMultiConnection
cd RTCMultiConnection
sudo npm install --save-dev
git clone https://github.com/muaz-khan/RTCMultiConnection.git ./
npm install --production
```

Or download ZIP:

* https://github.com/muaz-khan/RTCMultiConnection/archive/master.zip

Then call `npm install --production`.

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

# Download TAR

```sh
wget http://webrtcweb.com/rtcmulticonnection-v3.tar.gz
tar -xf rtcmulticonnection-v3.tar.gz
```

# Install using NPM or Bower


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

# or
bower install rtcmulticonnection-v3
```

To TEST:
# Run `server.js`

```sh
node server.js
```

## Stop Old Processes
Now open `http://localhost:9001/`.

# Use HTTPs

Open [server.js](https://github.com/muaz-khan/RTCMultiConnection/blob/master/server.js) and enable `isUseHTTPs`:

```javascript
var isUseHTTPs = true;
```

# Change Port

Open [server.js](https://github.com/muaz-khan/RTCMultiConnection/blob/master/server.js) and set `port`:

```javascript
var port = 443;
```

See how to enable SSL certificates:

* https://github.com/muaz-khan/WebRTC-Experiment/issues/62

> Remember: HTTPs is requires for screen-capturing on both Chrome & Firefox.
>
> Chrome requires HTTPs for normal camera/mic as well.
# How to check if server is running correctly?

Open this URL: `https://localhost:9001/socket.io/socket.io.js`

If you can load `/socket.io/socket.io.js` on your server then it is working fine.

# Stop Old Processes

Check all processes running on port `9001` and stop process by `id`:

Expand Down
10 changes: 5 additions & 5 deletions docs/ios-android.md
Expand Up @@ -15,14 +15,14 @@ Please check these docs as well:

Please check all iOS+Android demos here:

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

| DemoTitle | DownloadZip | AndroidAPK | AllFiles |
| ------------- |-------------|-------------|-------------|
| Scalable Broadcast | [Source](http://webrtcweb.com:9001/cordova-apps/scalable-broadcast/Download-Source.zip) | [Android APK](http://webrtcweb.com:9001/cordova-apps/scalable-broadcast/Install-Android-App.apk) | [All files](http://webrtcweb.com:9001/cordova-apps/scalable-broadcast) |
| Audio Conferencing | [Source](http://webrtcweb.com:9001/cordova-apps/audio-conferencing/Download-Source.zip) | [Android APK](http://webrtcweb.com:9001/cordova-apps/audio-conferencing/Install-Android-App.apk) | [All files](http://webrtcweb.com:9001/cordova-apps/audio-conferencing) |
| Video Conferencing | [Source](http://webrtcweb.com:9001/cordova-apps/video-conferencing/Download-Source.zip) | [Android APK](http://webrtcweb.com:9001/cordova-apps/video-conferencing/Install-Android-App.apk) | [All files](http://webrtcweb.com:9001/cordova-apps/video-conferencing) |
| File Sharing | [Source](http://webrtcweb.com:9001/cordova-apps/filesharing/Download-Source.zip) | [Android APK](http://webrtcweb.com:9001/cordova-apps/filesharing/Install-Android-App.apk) | [All files](http://webrtcweb.com:9001/cordova-apps/filesharing) |
| Scalable Broadcast | [Source](http://webrtcweb.com/cordova-apps/scalable-broadcast/Download-Source.zip) | [Android APK](http://webrtcweb.com/cordova-apps/scalable-broadcast/Install-Android-App.apk) | [All files](http://webrtcweb.com/cordova-apps/scalable-broadcast) |
| Audio Conferencing | [Source](http://webrtcweb.com/cordova-apps/audio-conferencing/Download-Source.zip) | [Android APK](http://webrtcweb.com/cordova-apps/audio-conferencing/Install-Android-App.apk) | [All files](http://webrtcweb.com/cordova-apps/audio-conferencing) |
| Video Conferencing | [Source](http://webrtcweb.com/cordova-apps/video-conferencing/Download-Source.zip) | [Android APK](http://webrtcweb.com/cordova-apps/video-conferencing/Install-Android-App.apk) | [All files](http://webrtcweb.com/cordova-apps/video-conferencing) |
| File Sharing | [Source](http://webrtcweb.com/cordova-apps/filesharing/Download-Source.zip) | [Android APK](http://webrtcweb.com/cordova-apps/filesharing/Install-Android-App.apk) | [All files](http://webrtcweb.com/cordova-apps/filesharing) |

# Prerequisites

Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,7 +1,7 @@
{
"name": "rtcmulticonnection-v3",
"preferGlobal": false,
"version": "3.4.2",
"version": "3.4.3",
"author": {
"name": "Muaz Khan",
"email": "muazkh@gmail.com",
Expand Down

0 comments on commit 30068fd

Please sign in to comment.