Skip to content

Commit

Permalink
Added rtcmulticonnection-v3@3.2.88 - Also, v2.2.2 is updated to suppo…
Browse files Browse the repository at this point in the history
…rt remote audio+video recording in Canary.

RecordRTC can be used with v3.2.88 to record remote or local
audio+video streams.
  • Loading branch information
muaz-khan committed Jan 29, 2016
1 parent 4505cec commit 87e4e6e
Show file tree
Hide file tree
Showing 23 changed files with 817 additions and 355 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ module.exports = function(grunt) {
'dev/StreamsHandler.js',

'dev/DetectRTC.js',
'dev/getScreenId.js', // or Screen-Capturing.js
'dev/getScreenId.js', // or getScreenId.js or Screen-Capturing.js

'dev/TextSenderReceiver.js',
'dev/FileProgressBarHandler.js',
Expand Down
23 changes: 23 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@

The MIT License
================

Copyright (c) 2014-2018 Muaz Khan \<muazkh@gmail.com\>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
89 changes: 81 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ All files from `/dist` directory are available on CDN: `https://cdn.webrtc-exper
<script src="https://cdn.webrtc-experiment.com:443/rmc3.min.js"></script>

<!-- or specific version -->
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.87/rmc3.min.js"></script>
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.88/rmc3.min.js"></script>
```

If you're sharing files, you also need to link:
Expand All @@ -76,7 +76,7 @@ If you're sharing files, you also need to link:
<script src="https://cdn.webrtc-experiment.com:443/rmc3.fbr.min.js"></script>

<!-- or specific version -->
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.87/rmc3.fbr.min.js"></script>
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.88/rmc3.fbr.min.js"></script>
```

> You can link multiple files from `dev` directory. Order doesn't matters.
Expand Down Expand Up @@ -282,14 +282,34 @@ connection.resetTrack();
### `onUserStatusChanged`

This even allows you show online/offline statuses of the user:
This event allows you show online/offline statuses of the user:

```javascript
connection.onUserStatusChanged = function(status) {
document.getElementById(event.userid).src = status === 'online' ? 'online.gif' : 'offline.gif';
};
```

You can even manually call above method from `onopen`, `onstream` and similar events to get the most accurate result possible:

```javascript
connection.onopen = connection.stream = function(event) {
connection.onUserStatusChanged({
userid: event.userid,
extra: event.extra,
status: 'online'
});
};

connection.onleave = connection.streamended = connection.onclose = function(event) {
connection.onUserStatusChanged({
userid: event.userid,
extra: event.extra,
status: 'offline'
});
};
```

### `getSocket`

This method allows you get the `socket` object used for signaling (handshake/presence-detection/etc.):
Expand Down Expand Up @@ -347,7 +367,7 @@ connection.getUserMediaHandler(options);

Its defined here:

* [getUserMedia.js#L20](https://github.com/muaz-khan/RTCMultiConnection/blob/master/RTCMultiConnection-v3.0/dev/getUserMedia.js#L20)
* [getUserMedia.js#L20](https://github.com/muaz-khan/RTCMultiConnection/tree/master/devgetUserMedia.js#L20)

## `becomePublicModerator`

Expand Down Expand Up @@ -459,7 +479,7 @@ connection.checkPresence('roomid', function(isRoomEists, roomid) {

## `onReadyForOffer`

This even is fired as soon as callee says "I am ready for offer. I enabled camera. Please create offer and share.".
This event is fired as soon as callee says "I am ready for offer. I enabled camera. Please create offer and share.".

```javascript
connection.onReadyForOffer = function(remoteUserId, userPreferences) {
Expand Down Expand Up @@ -538,8 +558,8 @@ connection.getAllParticipants().forEach(function(remoteUserId) {
var user = connection.peers[remoteUserId];
console.log(user.extra);

user.peer.connection.close();
alert(user.peer.connection === webkitRTCPeerConnection);
user.peer.close();
alert(user.peer === webkitRTCPeerConnection);
});
```

Expand All @@ -561,7 +581,7 @@ This method allows you skip Socket.io and force Firebase or PubNub or WebSockets
connection.setCustomSocketHandler(FirebaseConnection);
```

Please check [`FirebaseConnection`](https://github.com/muaz-khan/RTCMultiConnection/blob/master/RTCMultiConnection-v3.0/dev/FirebaseConnection.js) or [`PubNubConnection.js`](https://github.com/muaz-khan/RTCMultiConnection/blob/master/RTCMultiConnection-v3.0/dev/PubNubConnection.js) to understand how it works.
Please check [`FirebaseConnection`](https://github.com/muaz-khan/RTCMultiConnection/tree/master/devFirebaseConnection.js) or [`PubNubConnection.js`](https://github.com/muaz-khan/RTCMultiConnection/tree/master/devPubNubConnection.js) to understand how it works.

## `enableLogs`

Expand Down Expand Up @@ -1055,6 +1075,55 @@ connection.onunmute = function(e) {
};
```

## HD Streaming

```javascript
connection.bandwidth = {
audio: 128,
video: 1024,
screen: 1024
};

var videoConstraints = {
mandatory: {
maxWidth: 1920,
maxHeight: 1080,
minAspectRatio: 1.77,
minFrameRate: 3,
maxFrameRate: 64
},
optional: []
};

connection.mediaConstraints.video = videoConstraints;
```

## Default devices?

By default, RTCMultiConnection tries to use last available microphone and camera. However you can disable this behavior and ask to use default devices instead:

```javascript
// pass second parameter to force options
var connection = new RTCMultiConnection(roomId, {
useDefaultDevices: true
});
```

## Auto open or join?

By default, you always have to call `open` or `join` or `openOrJoin` methods manually. However you can force RTCMultiConnection to auto open/join room as soon as constructor is initialized.

```javascript
// pass second parameter to force options
var connection = new RTCMultiConnection(roomId, {
autoOpenOrJoin: true
});
```

For low-latency audio:

* https://twitter.com/WebRTCWeb/status/499102787733450753

## RTCMultiConnection v2.2.2 Demos

| Experiment Name | Demo | Source Code |
Expand Down Expand Up @@ -1108,6 +1177,10 @@ v2.2.2 is available here:

* https://github.com/muaz-khan/RTCMultiConnection/tree/master/v2.2.2

## 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/).
Loading

0 comments on commit 87e4e6e

Please sign in to comment.