testing...

This commit is contained in:
Mahdi Dibaiee 2014-09-10 22:23:01 +04:30
parent a13d9d2e55
commit 6db38141ee

View File

@ -39,7 +39,9 @@ $(function() {
}); });
peer.on('call', function(c) { peer.on('call', function(c) {
console.log('Got Called - peer:call');
c.on('stream', function(str) { c.on('stream', function(str) {
console.log('Got stream - peer.c:stream');
window.stream = str; window.stream = str;
if(!str.getVideoTracks().length) { if(!str.getVideoTracks().length) {
$('.remote p').removeClass('hidden'); $('.remote p').removeClass('hidden');
@ -49,6 +51,16 @@ $(function() {
}); });
}); });
call.on('stream', function(str) {
console.log('Got stream - call:stream');
window.stream = str;
if(!str.getVideoTracks().length) {
$('.remote p').removeClass('hidden');
}
$('.remote video').prop('src', window.URL.createObjectURL(str));
$('.remote video')[0].play();
})
con.on('open', function() { con.on('open', function() {
$('.connecting').addClass('hidden'); $('.connecting').addClass('hidden');
con.on('data', function(d) { con.on('data', function(d) {