Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
muaz-khan committed Jan 19, 2016
1 parent dbe1e2c commit 4505cec
Show file tree
Hide file tree
Showing 12 changed files with 56 additions and 33 deletions.
6 changes: 4 additions & 2 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ module.exports = function(grunt) {
scope: 'devDependencies'
});

var banner = '// Last time updated: <%= grunt.template.today("UTC:yyyy-mm-dd h:MM:ss TT Z") %>\n\n';

// configure project
grunt.initConfig({
// make node configurations available
Expand All @@ -15,7 +17,7 @@ module.exports = function(grunt) {
options: {
stripBanners: true,
separator: '\n',
banner: '// Last time updated at <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %> \n\n'
banner: banner
},
dist: {
src: [
Expand Down Expand Up @@ -67,7 +69,7 @@ module.exports = function(grunt) {
uglify: {
options: {
mangle: false,
banner: '// Last time updated at <%= grunt.template.today("dddd, mmmm dS, yyyy, h:MM:ss TT") %> \n\n'
banner: banner
},
my_target: {
files: {
Expand Down
4 changes: 2 additions & 2 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.86/rmc3.min.js"></script>
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.87/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.86/rmc3.fbr.min.js"></script>
<script src="https://github.com/muaz-khan/RTCMultiConnection/releases/download/3.2.87/rmc3.fbr.min.js"></script>
```

> You can link multiple files from `dev` directory. Order doesn't matters.
Expand Down
12 changes: 9 additions & 3 deletions RTCMultiConnection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Last time updated at Sunday, January 17th, 2016, 5:28:51 PM
// Last time updated: 2016-01-19 9:53:08 AM UTC

// ______________________________
// RTCMultiConnection-v3.0 (Beta)
Expand Down Expand Up @@ -1248,7 +1248,7 @@

// default value is 15k because Firefox's receiving limit is 16k!
// however 64k works chrome-to-chrome
connection.chunkSize = 15 * 1000;
connection.chunkSize = 65 * 1000;

connection.maxParticipantsAllowed = 1000;

Expand Down Expand Up @@ -2025,7 +2025,7 @@
}, {
userid: connection.userid,
// extra: connection.extra,
chunkSize: connection.chunkSize || 0
chunkSize: isFirefox ? 15 * 1000 : connection.chunkSize || 0
});
};

Expand All @@ -2050,7 +2050,13 @@
};

this.onDataChannelOpened = function(channel, remoteUserId) {
// keep last channel only; we are not expecting parallel/channels channels
if (connection.peers[remoteUserId].channels.length) {
return;
}

connection.peers[remoteUserId].channels.push(channel);

connection.onopen({
userid: remoteUserId,
extra: connection.peers[remoteUserId] ? connection.peers[remoteUserId].extra : {},
Expand Down
6 changes: 3 additions & 3 deletions RTCMultiConnection.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dev/FileBufferReader.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function FileBufferReader() {
uuid: file.uuid || 0,
file: file,
earlyCallback: earlyCallback,
extra: extra
extra: extra,
chunkSize: extra.chunkSize
};

fbrHelper.readAsArrayBuffer(fbr, options);
Expand Down
8 changes: 7 additions & 1 deletion dev/MultiPeersHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ function MultiPeers(connection) {
}, {
userid: connection.userid,
// extra: connection.extra,
chunkSize: connection.chunkSize || 0
chunkSize: isFirefox ? 15 * 1000 : connection.chunkSize || 0
});
};

Expand All @@ -437,7 +437,13 @@ function MultiPeers(connection) {
};

this.onDataChannelOpened = function(channel, remoteUserId) {
// keep last channel only; we are not expecting parallel/channels channels
if (connection.peers[remoteUserId].channels.length) {
return;
}

connection.peers[remoteUserId].channels.push(channel);

connection.onopen({
userid: remoteUserId,
extra: connection.peers[remoteUserId] ? connection.peers[remoteUserId].extra : {},
Expand Down
2 changes: 1 addition & 1 deletion dev/RTCMultiConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1239,7 +1239,7 @@ function RTCMultiConnection(roomid) {

// default value is 15k because Firefox's receiving limit is 16k!
// however 64k works chrome-to-chrome
connection.chunkSize = 15 * 1000;
connection.chunkSize = 65 * 1000;

connection.maxParticipantsAllowed = 1000;

Expand Down
3 changes: 2 additions & 1 deletion dist/rmc3.fbr.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ function FileBufferReader() {
uuid: file.uuid || 0,
file: file,
earlyCallback: earlyCallback,
extra: extra
extra: extra,
chunkSize: extra.chunkSize
};

fbrHelper.readAsArrayBuffer(fbr, options);
Expand Down
4 changes: 2 additions & 2 deletions dist/rmc3.fbr.min.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions dist/rmc3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Last time updated at Sunday, January 17th, 2016, 5:28:51 PM
// Last time updated: 2016-01-19 9:53:08 AM UTC

// ______________________________
// RTCMultiConnection-v3.0 (Beta)
Expand Down Expand Up @@ -1248,7 +1248,7 @@

// default value is 15k because Firefox's receiving limit is 16k!
// however 64k works chrome-to-chrome
connection.chunkSize = 15 * 1000;
connection.chunkSize = 65 * 1000;

connection.maxParticipantsAllowed = 1000;

Expand Down Expand Up @@ -2025,7 +2025,7 @@
}, {
userid: connection.userid,
// extra: connection.extra,
chunkSize: connection.chunkSize || 0
chunkSize: isFirefox ? 15 * 1000 : connection.chunkSize || 0
});
};

Expand All @@ -2050,7 +2050,13 @@
};

this.onDataChannelOpened = function(channel, remoteUserId) {
// keep last channel only; we are not expecting parallel/channels channels
if (connection.peers[remoteUserId].channels.length) {
return;
}

connection.peers[remoteUserId].channels.push(channel);

connection.onopen({
userid: remoteUserId,
extra: connection.peers[remoteUserId] ? connection.peers[remoteUserId].extra : {},
Expand Down
6 changes: 3 additions & 3 deletions dist/rmc3.min.js

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rtcmulticonnection-v3",
"preferGlobal": false,
"version": "3.2.86",
"version": "3.2.87",
"author": {
"name": "Muaz Khan",
"email": "[email protected]",
Expand Down Expand Up @@ -49,15 +49,16 @@
"homepage": "https://rtcmulticonnection.herokuapp.com/",
"_from": "rtcmulticonnection-v3@",
"devDependencies": {
"grunt": "latest",
"grunt-bump": "latest",
"grunt-cli": "latest",
"grunt-contrib-clean": "latest",
"grunt-contrib-concat": "latest",
"grunt-contrib-copy": "latest",
"grunt-contrib-uglify": "latest",
"grunt-jsbeautifier": "latest",
"grunt-replace": "latest",
"load-grunt-tasks": "latest"
"grunt": "0.4.5",
"grunt-cli": "0.1.13",
"load-grunt-tasks": "3.4.0",
"grunt-contrib-concat": "0.5.1",
"grunt-contrib-jshint": "0.11.3",
"grunt-contrib-uglify": "0.11.0",
"grunt-jsbeautifier": "0.2.10",
"grunt-bump": "0.7.0",
"grunt-contrib-clean": "0.6.0",
"grunt-contrib-copy": "0.8.2",
"grunt-replace": "0.11.0"
}
}

0 comments on commit 4505cec

Please sign in to comment.