testing...
This commit is contained in:
parent
a13d9d2e55
commit
6db38141ee
12
js/main.js
12
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) {
|
||||
|
Loading…
Reference in New Issue
Block a user