sarandogou / webrtc-everywhere

WebRTC plugin for Internet Explorer and Safari
BSD 3-Clause "New" or "Revised" License
326 stars 104 forks source link

Data channel halts while sending arraybuffer #33

Closed hanguofu closed 9 years ago

hanguofu commented 9 years ago

I installed the plugin and tried to send binary data ( arraybuffer ) with data channel :

// the data channel "sendChannel" was created with this config. successfully sendChannel.binaryType = 'arraybuffer' ;

 ...
// send a piece of file at the formate of arraybuffer :
var reader = new window.FileReader();
reader.onload = (function() {
  return function(e) {

    send_result = sendChannel.send(e.target.result);

    sendProgress.value = offset + e.target.result.byteLength;
  };
})(file);
var slice = file.slice(offset, offset + chunkSize);
reader.readAsArrayBuffer(slice);
...

IE11 just halts at sendChannel.send(e.target.result) without any prompt. If more info. is needed , 
please feel free to contact me at hanguofu@163.com. Thankyou !
hanguofu commented 9 years ago

After debug , we found out the data channel section of the plugin functions normally :) The culptrit may be the JS which needs a return val. from send statement. So we changed the statement to : sendChannel.send ( e.target.result) ; // send_result = sendChannel.send(e.target.result); and it works ! Sorry for wasting your time :) Cheer ~