+ Peer-to-Peer (private) file sharing. +
++ You can share/receive files from any platform/device e.g. destkop operating systems, Android, iOS etc. +
++ Create or join a room & select file using "+" button. +
+' + html + '
'; logsDiv.insertBefore(div, logsDiv.firstChild); + + return div; } function previewFile(file) { @@ -224,13 +304,16 @@ function previewFile(file) { btnSelectFile.style.zIndex = 10; btnSelectFile.style.top = '5px'; btnSelectFile.style.outline = 'none'; + document.querySelector('.overlay').style.display = 'none'; iframe.style.display = 'block'; + if (file.type.match(/image|video|audio|pdf|txt|javascript|css|php|py/g)) { iframe.src = URL.createObjectURL(file); } else { - iframe.src = 'https://i.imgur.com/2SUIhbf.png?1'; + iframe.src = 'https://cdn.webrtc-experiment.com/images/folder-icon.png'; } + iframe.onload = function() { Array.prototype.slice.call(iframe.contentWindow.document.body.querySelectorAll('*')).forEach(function(element) { element.style.maxWidth = '100%'; diff --git a/Chrome-Extensions/file-sharing/getExternalIceServers.js b/Chrome-Extensions/file-sharing/getExternalIceServers.js new file mode 100644 index 00000000..9fa5deec --- /dev/null +++ b/Chrome-Extensions/file-sharing/getExternalIceServers.js @@ -0,0 +1,2 @@ +// to get STUN/TURN URIs from xirsys.com +window.getExternalIceServers = true; \ No newline at end of file diff --git a/Chrome-Extensions/file-sharing/images/unknown.png b/Chrome-Extensions/file-sharing/images/unknown.png deleted file mode 100644 index 81280a24..00000000 Binary files a/Chrome-Extensions/file-sharing/images/unknown.png and /dev/null differ diff --git a/Chrome-Extensions/file-sharing/manifest.json b/Chrome-Extensions/file-sharing/manifest.json index 4782f1dd..e30dbf86 100755 --- a/Chrome-Extensions/file-sharing/manifest.json +++ b/Chrome-Extensions/file-sharing/manifest.json @@ -1,11 +1,11 @@ { "name" : "WebRTC File Sharing", "author": "Muaz Khan", - "version" : "1.9", + "version" : "2.1", "manifest_version" : 2, "minimum_chrome_version": "34", - "description" : "Instantly/Privately/Reliably share files with single or multiple users without uploading to server!", - "homepage_url": "https://www.webrtc-experiment.com/", + "description" : "Instantly/Privately/Reliably share files across all devices(mobile/desktop), among single or multiple users.", + "homepage_url": "https://rtcxp.com/fs", "background": { "scripts": ["background.js"], "persistent": false diff --git a/Chrome-Extensions/file-sharing/options.html b/Chrome-Extensions/file-sharing/options.html index 6853aa3e..f5bd8f40 100755 --- a/Chrome-Extensions/file-sharing/options.html +++ b/Chrome-Extensions/file-sharing/options.html @@ -45,7 +45,7 @@