Testing..

This commit is contained in:
Mahdi Dibaiee 2014-09-10 22:31:42 +04:30
parent 93671f85d2
commit 1c050bb945

View File

@ -136,7 +136,8 @@ $(function() {
peer.on('call', function(call) { peer.on('call', function(call) {
navigator.getUserMedia({audio: true, video: true}, function(stream) { navigator.getUserMedia({audio: true, video: true}, function(stream) {
console.log(stream); console.log(stream.getVideoTracks());
window.stream = stream;
call.answer(stream); call.answer(stream);
if(!stream.getVideoTracks().length) { if(!stream.getVideoTracks().length) {
$('.self p').removeClass('hidden'); $('.self p').removeClass('hidden');
@ -146,7 +147,6 @@ $(function() {
$('.self video')[0].play(); $('.self video')[0].play();
call.on('stream', function(str) { call.on('stream', function(str) {
window.stream = str;
$('.remote video').prop('src', window.URL.createObjectURL(str)); $('.remote video').prop('src', window.URL.createObjectURL(str));
$('.remote video')[0].play(); $('.remote video')[0].play();