also,i do many similar experiments to test it,it is same on different connect network.
i trace the code,and find the bugs in share-files.html:
...
var div = helper.div;
if (file.type.indexOf('image') != -1) {
div.innerHTML = '<a href="' + file.url + '" download="' + file.name + '">Download <strong style="color:red;">' + file.name + '</strong> </a><br /><img src="' + file.url + '" title="' + file.name + '" style="max-width: 80%;">';
} else if (file.type.indexOf('video/') != -1) {
div.innerHTML = '<a href="' + file.url + '" download="' + file.name + '">Download <strong style="color:red;">' + file.name + '</strong> </a><br /><video src="' + file.url + '" title="' + file.name + '" style="max-width: 80%;" controls></video>';
} else if (file.type.indexOf('audio/') != -1) {
div.innerHTML = '<a href="' + file.url + '" download="' + file.name + '">Download <strong style="color:red;">' + file.name + '</strong> </a><br /><audio src="' + file.url + '" title="' + file.name + '" style="max-width: 80%;" controls></audio>';
} else {
div.innerHTML = '<a href="' + file.url + '" download="' + file.name + '">Download <strong style="color:red;">' + file.name + '</strong> </a><br /><iframe src="' + file.url + '" title="' + file.name + '" style="width: 80%;border: 0;height: inherit;margin-top:1em;"></iframe>';
}
-----------------------------------------------------------------------------------------------------
if(connection.broadcastingConnection && connection.broadcastingConnection.numberOfConnectedUsers > 0) {
connection.broadcastingConnection.send(file);
}
...
if i close peer3,the connection.broadcastingConnection.numberOfConnectedUsers has not decreased 1,so in fact,the real connection.broadcastingConnection.numberOfConnectedUsers is 0 but your code here connection.broadcastingConnection.numberOfConnectedUsers is still 1.it is not correct.
so the bugs happen.
i don't know how to rectify it.could you help to remove the bugs?
by the way,i do the experiment on three tab of firefox.i have only one PC.i dont know whether the bugs will happen when i do the same experiment on three PC.
could you give me some ideas?thanks