Temasys / SkylinkJS

SkylinkJS Javascript WebRTC SDK
http://skylink.io/web
Other
275 stars 57 forks source link

"incomingStream" from other side fails upon this scenario [0.6.12] #227

Closed amangupta26 closed 8 years ago

amangupta26 commented 8 years ago

Using non-MCU App Key. Two Users A and B. Both join the room as follows:

function initSkyLink(){
    skylink.init({
      appKey: apikey,
      defaultRoom: CurrentRoom
    }, function(initError, initSuccess){
      if (initError)
        return console.log("initError", initError);

      if(group_id == 1 && isMCU)
        skylink._isPrivileged = true;

      skylink.joinRoom({
        audio: false,
        video: false,
        userData : {'name' : first_name}
      }, function(jRError, jRSuccess){
        if(jRError) return console.log("jRError", jRError);
        $('#enable').addClass('show');
      });

    });
  }

This function is called as soon as users come to website.

$('#enable') is the id of a button, which on clicking calls this function,

function sendMedia(){
  skylink.sendStream({
    audio : true,
    video : true
  });
}

Working scenario : A has enabled video and audio by clicking on "enable" button. Now B joins and clicks "enable" lazily i.e. not instantly. Then B receives A's stream successfully and vice-versa.

Not working scenario : A has enabled video and audio by clicking on "enable" button. Now B joins and clicks "enable" instantly as soon as it appears(i.e. A has successfully joined the room). Then A does not receives B's stream . But A is able to receive B's stream.

Workaround: Add a random delay before calling skylink.sendStream(...), which I dont feel is good approach as may it still lead to failure and there is no deterministic delay too.

Could help me to tackle this issue which pragmatically will happen rarely but may happen and is bad for user experience.

oooookk7 commented 8 years ago

Thanks @amangupta26 will take a look and notify you

oooookk7 commented 8 years ago

Hi @amangupta26,

We managed to reproduce the issue, and we will resolve that in future releases version. For now, it is advisable to use the timeout as a workaround solution.

Thanks for reporting this issue. The next release version may go out in the next few weeks but we will keep you informed when we release it.

oooookk7 commented 8 years ago

Hi @amangupta26, please checkout 0.6.15 release which should resolve your issue.

oooookk7 commented 8 years ago

Closing this issue since it's been resolved in the 0.6.15 release. If this issue persists, feel free to re-open it again.