From 6db38141eef4be5708d7de1c4f424a4c90a2b245 Mon Sep 17 00:00:00 2001 From: Mahdi Dibaiee Date: Wed, 10 Sep 2014 22:23:01 +0430 Subject: [PATCH] testing... --- js/main.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/js/main.js b/js/main.js index 7ca4af7..449ea68 100644 --- a/js/main.js +++ b/js/main.js @@ -39,7 +39,9 @@ $(function() { }); peer.on('call', function(c) { + console.log('Got Called - peer:call'); c.on('stream', function(str) { + console.log('Got stream - peer.c:stream'); window.stream = str; if(!str.getVideoTracks().length) { $('.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() { $('.connecting').addClass('hidden'); con.on('data', function(d) {