ShareDrop - easy P2P file sharing powered by WebRTC

1,742 views
Skip to first unread message

Szymon Nowak

unread,
Mar 30, 2014, 7:06:03 PM3/30/14
to discuss...@googlegroups.com
Hey,

hope it's ok to show WebRTC related projects here. A few days ago we released ShareDrop - OS X AirDrop clone (at least when it comes to UI, it doesn't create ad-hoc wifi networks) that uses WebRTC for file transfers in local network (devices need to have the same public IP). The app itself is available at https://www.sharedrop.io and the source code is available at https://github.com/cowbell/sharedrop.

Of course there's nothing from a technical point of view that prevents using it for transferring files across networks - we just need to figure out a simple UI for that and figure out how to handle cases where TURN server is needed. WebRTC related code is not groundbreaking, e.g. https://www.sharefest.me does much more advanced stuff, but I guess it might be useful for someone. The app uses a modified version of PeerJS library (http://peerjs.com) - the original version uses WebSockets server for WebRTC signaling, the modified one uses Firebase (https://www.firebase.com/). We use Firebase for presence management as well.

Cheers,
Szymon

Vladimir Ralev

unread,
Mar 30, 2014, 8:07:47 PM3/30/14
to discuss...@googlegroups.com
Haha, awesome idea and I just need something like this, but it doesn't work for me.

1. Dragging a group of files or directories only sends one of the files in the group. This works in airdrop as long as the files are <2-3GB.
2. After accepting to save the file nothing happens. The sender side remains in "Waiting for..."

PeerJS: Received data channel 151fb56e.vendor.js:1
PeerJS: Data channel connection success 151fb56e.vendor.js:1
Peer: Received file info
Object {connectiondinfoObject}
0c1c1244.app.js:1
Peer: Internal state has changed: received_file_info 0c1c1244.app.js:1
Peer: File info:
Object {type"info"payloadObject}
0c1c1244.app.js:1
Peer: Internal state has changed: sending_file_data 0c1c1244.app.js:1
PeerJS: iceConnectionState is disconnected, closing connections to ff381f90-b866-11e3-aeb2-c1156dae8bda 151fb56e.vendor.js:1
PeerJS: Cleaning up PeerConnection to ff381f90-b866-11e3-aeb2-c1156dae8bda 151fb56e.vendor.js:1
Peer: P2P connection opened:
d {_eventsObjectoptionsObjectopenfalsetype"data"peer"ff381f90-b866-11e3-aeb2-c1156dae8bda"}
0c1c1244.app.js:1
PeerJS: DataChannel closed for: ff381f90-b866-11e3-aeb2-c1156dae8bda

If these problems are solved and it supports arbitrary large files I would use it everyday. Very cool. Cheers.


--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Szymon Nowak

unread,
Mar 31, 2014, 2:54:55 AM3/31/14
to discuss...@googlegroups.com
Hey Vladimir,

On Monday, 31 March 2014 02:07:47 UTC+2, Vladimir Ralev wrote:
Haha, awesome idea and I just need something like this, but it doesn't work for me.

1. Dragging a group of files or directories only sends one of the files in the group. This works in airdrop as long as the files are <2-3GB.

Transferring multiple files doesn't work at the moment and it might be a good idea to show some warning instead of simply transferring the first file. I'll add a ticket for that. To be honest I'm not sure how transferring multiple files would work and I'm not sure if it's possible to save whole directories to disk from HTML5 filesystem, so for now it's going to be limited to one file only.

 
2. After accepting to save the file nothing happens. The sender side remains in "Waiting for..."

Error handling is a bit rough at the moment. It looks like the data channel was disconnected after transferring file info. Could you try again, or does it always happen for you? If it does happen always, could you report it at https://github.com/cowbell/sharedrop/issues and specify browsers' names and versions and some info about the file (name, size, type) to help me reproduce it?

We managed to transfer 1.5GB file (between Chrome browsers, in Firefox it probably wouldn't work), but it looks like people get max transfer speeds of ~1MB/s at the moment, so it does take ages to transfer larger files - it would probably be faster to go out, buy a flash drive and copy the file using it instead :) Max file size is restricted by the size of temporary filesystem, which on my computer is about ~4GB. The app doesn't check yet if the transferred file is bigger than that, but we plan on adding it.
Reply all
Reply to author
Forward
0 new messages