169 lines
7.4 KiB
HTML
169 lines
7.4 KiB
HTML
<!--
|
|
> Muaz Khan - https://github.com/muaz-khan
|
|
> MIT License - https://www.webrtc-experiment.com/licence/
|
|
> Experiments - https://github.com/muaz-khan/WebRTC-Experiment/tree/master/file-hangout
|
|
-->
|
|
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>WebRTC Group File Sharing</title>
|
|
|
|
<script>
|
|
if(!location.hash.replace('#', '').length) {
|
|
location.href = location.href.split('#')[0] + '#' + (Math.random() * 100).toString().replace('.', '');
|
|
location.reload();
|
|
}
|
|
</script>
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
|
|
<link rel="author" type="text/html" href="https://plus.google.com/+MuazKhan">
|
|
<meta name="author" content="Muaz Khan">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
|
|
|
<link rel="stylesheet" href="https://cdn.webrtc-experiment.com/style.css">
|
|
|
|
<style>
|
|
p { padding: .8em; }
|
|
|
|
input {
|
|
border: 1px solid #d9d9d9;
|
|
border-radius: 1px;
|
|
font-size: 2em;
|
|
margin: .2em;
|
|
}
|
|
|
|
li {
|
|
border-bottom: 1px solid rgb(189, 189, 189);
|
|
border-left: 1px solid rgb(189, 189, 189);
|
|
padding: .5em;
|
|
}
|
|
|
|
code {
|
|
color: red;
|
|
font-family: inherit;
|
|
}
|
|
</style>
|
|
<script>
|
|
document.createElement('article');
|
|
document.createElement('footer');
|
|
</script>
|
|
</head>
|
|
|
|
<body>
|
|
<article>
|
|
<header style="text-align: center;">
|
|
<h1>
|
|
WebRTC Group File Sharing
|
|
</h1>
|
|
<p>
|
|
<a href="https://www.webrtc-experiment.com/">HOME</a>
|
|
<span> © </span>
|
|
<a href="http://www.MuazKhan.com/" target="_blank">Muaz Khan</a>
|
|
|
|
.
|
|
<a href="http://twitter.com/WebRTCWeb" target="_blank" title="Twitter profile for WebRTC Experiments">@WebRTCWeb</a>
|
|
|
|
.
|
|
<a href="https://github.com/muaz-khan?tab=repositories" target="_blank" title="Github Profile">Github</a>
|
|
|
|
.
|
|
<a href="https://github.com/muaz-khan/WebRTC-Experiment/issues?state=open" target="_blank">Latest issues</a>
|
|
|
|
.
|
|
<a href="https://github.com/muaz-khan/WebRTC-Experiment/commits/master" target="_blank">What's New?</a>
|
|
</p>
|
|
</header>
|
|
|
|
<div class="github-stargazers"></div>
|
|
|
|
<blockquote class="inline">
|
|
You can try this: <a href="https://www.webrtc-experiment.com/FileBufferReader/">https://www.webrtc-experiment.com/FileBufferReader/</a>
|
|
</blockquote>
|
|
|
|
<section class="experiment">
|
|
<p>
|
|
A file-hangout experiment where all participants can share files in a group!
|
|
</p>
|
|
<table style="width: 100%;">
|
|
<tr>
|
|
<td>
|
|
<input type="text" id="conference-name" placeholder="Enter Your Name">
|
|
<input type="button" value="Start sharing files in Group!" id="start-conferencing">
|
|
<input type="file" id="file" disabled>
|
|
|
|
<div id="status" style="color: red; font-size: 1em;"></div>
|
|
<table id="participants"></table>
|
|
<table id="rooms-list" class="visible"></table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<table id="output-panel"></table>
|
|
|
|
<table class="visible">
|
|
<tr>
|
|
<td style="text-align: center;">
|
|
<strong>Private file-hangout</strong> ?? <a href="https://www.webrtc-experiment.com/file-hangout/" target="_blank" title="Open this link in new tab. Then your file-hangout will be private!"><code>/file-hangout/<strong id="unique-token">#123456789</strong></code></a>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</section>
|
|
|
|
<section class="experiment">
|
|
<p style="margin-top: 0;">
|
|
You can try <a href="https://www.webrtc-experiment.com/WebRTC-File-Sharing/">SCTP based WebRTC File Sharing Demo</a>!
|
|
</p>
|
|
</section>
|
|
|
|
<section class="experiment">
|
|
<h2 class="header">How <a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/file-hangout" target="_blank">file-sharing</a> experiment works?</h2>
|
|
<ol>
|
|
<li>Multi-peers for group data connectivity</li>
|
|
<li>Multip-sockets for group offer/answer exchange</li>
|
|
<li>Multi SCTP/RTP data ports on single chrome/firefox instance</li>
|
|
<li>Custom file sharing implementation for chrome</li>
|
|
<li>In reality, it is peer-to-peer-to-peers....</li>
|
|
</ol>
|
|
|
|
<p>Interested to learn <a href="https://www.webrtc-experiment.com/docs/how-file-broadcast-works.html"
|
|
target="_blank">how to share files using RTCDataChannel APIs?</a></p>
|
|
</section>
|
|
|
|
<section class="experiment">
|
|
<h2 class="header" id="feedback">Feedback</h2>
|
|
<div>
|
|
<textarea id="message" style="border: 1px solid rgb(189, 189, 189); height: 8em; margin: .2em; outline: none; resize: vertical; width: 98%;" placeholder="Have any message? Suggestions or something went wrong?"></textarea>
|
|
</div>
|
|
<button id="send-message" style="font-size: 1em;">Send Message</button><small style="margin-left: 1em;">Enter your email too; if you want "direct" reply!</small>
|
|
</section>
|
|
|
|
<section class="experiment own-widgets latest-commits">
|
|
<h2 class="header" id="updates" style="color: red; padding-bottom: .1em;"><a href="https://github.com/muaz-khan/WebRTC-Experiment/commits/master" target="_blank">Latest Updates</a></h2>
|
|
<div id="github-commits"></div>
|
|
</section>
|
|
|
|
</article>
|
|
|
|
<!-- Copy these two files! -->
|
|
<script src="https://webrtc.github.io/adapter/adapter-latest.js"></script>
|
|
<script src="https://cdn.webrtc-experiment.com/socket.io.js"> </script>
|
|
<script src="https://cdn.webrtc-experiment.com/RTCPeerConnection-v1.5.js"> </script>
|
|
<script src="https://cdn.webrtc-experiment.com/file-hangout/file-hangout.js" async> </script>
|
|
|
|
<a href="https://github.com/muaz-khan/WebRTC-Experiment/tree/master/file-hangout" class="fork-left"></a>
|
|
|
|
<footer>
|
|
<p>
|
|
<a href="https://www.webrtc-experiment.com/">WebRTC Experiments</a>
|
|
© <a href="https://plus.google.com/+MuazKhan" rel="author" target="_blank">Muaz Khan</a>
|
|
<a href="mailto:muazkh@gmail.com" target="_blank">muazkh@gmail.com</a>
|
|
</p>
|
|
</footer>
|
|
|
|
<!-- commits.js is useless for you! -->
|
|
<script src="https://cdn.webrtc-experiment.com/commits.js" async> </script>
|
|
</body>
|
|
</html>
|