NotAdded/video/new.js
Function onReady
has 99 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
client.onReady = function() {
xConsole.append('<li>Connected. Get PeerID '+client.peerID);
xConsole.append('<li>Select a file to share: <input type=file id=xFile />');
z('#xFile').on('change', function (xEvent) {
z('#xFile').attr('disabled', true);
Function onMeta
has 80 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
client.onMeta = function(meta) {
client.file.write(file, 0, function () {
client.pieceQueue = [];
client.finishedPiece = x.map(client.finishedPiece, function() {
return 1;
Function onMessage
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
peer.onMessage = function(data) {
var xData, piece, block;
if(x.isObject(data) || data.indexOf('{') === 0) {
var msg = x.isObject(data) ? data : JSON.parse(data);
if(msg.cmd === 'request block') {}