Testing..
This commit is contained in:
parent
93671f85d2
commit
1c050bb945
@ -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();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user