Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

bug report of webrtc-scalable-broadcast #20

Open
Jackie2016 opened this issue Apr 6, 2016 · 0 comments
Open

bug report of webrtc-scalable-broadcast #20

Jackie2016 opened this issue Apr 6, 2016 · 0 comments

Comments

@Jackie2016
Copy link

hi,expert
i find a bug in share-files.html or maybe in rtcmulticonnection.js.
i make a connect network like this at first:
peer 1<--peer 2<--peer 3
peer2 request file from peer1
peer3 request file from peer2
then i close peer 3
at this time,i transfer png file from peer1 to peer2.but the peer2 could not show the png image,only show 100% with the progressbar.

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant