Commit 7c632415 authored by Mike's avatar Mike

keep video container for a bit after stream is removed;

change bg color to gray (usually covered by video);
don't start video until initialization completes
parent 86e61bf2
......@@ -8829,4 +8829,7 @@ textarea {
.video-list .video-container {
display: inline-block; }
.video-container {
background-color: #999; }
/*# sourceMappingURL=main.css.map */
\ No newline at end of file
......@@ -76,3 +76,7 @@ textarea {
.video-list .video-container {
display: inline-block;
}
.video-container {
background-color: #999;
}
......@@ -22,10 +22,7 @@
computerAudio: true, // speaker and mic disabled
muted: false, // mic muted
myVideo: true,
guestVideo: true,
leaderVideo: true,
phonePause: false,
guestPause: false
guestVideo: true
};
/* Keep track of who has subscribed to us */
......@@ -630,19 +627,34 @@
toggleVideo(expanded.id, false, expanded.container);
}
// Stop watching stats
//monitorStop(stream);
try {
streamDisplay = _.filter(streamDisplay, function(id) { return id != stream.getID(); });
// Remove stream from DOM
if (stream.elementID !== undefined) {
var element = document.getElementById(stream.elementID);
var parent = document.getElementById('video-list');
parent.removeChild(element);
//resizeVideoList();
var remove = function() {
// Remove stream from DOM
if (stream.elementID !== undefined) {
var element = document.getElementById(stream.elementID);
var parent = document.getElementById('video-list');
parent.removeChild(element);
//resizeVideoList();
}
};
if (!stopped) {
//$("#vcont_"+stream.getID()).find(".video-reconnect").show();
if (stream.getID() != localStream.getID()) {
var guestId = stream.getAttributes().guestId;
if (guestId != undefined) {
reconnectTimers[guestId] = setTimeout(function() {
logger.log("Timed out video:" + guestId);
remove();
}, 15000);
}
}
} else {
remove();
}
} catch (error) {
logger.log("Remove video error: " + error);
}
......@@ -700,8 +712,6 @@
}
setMaxBandwidth();
//loadMediaSettings();
//monitorCPU();
if (localStream && room) {
logger.log("Reconnecting to room");
......@@ -710,11 +720,11 @@
return;
}
/*if (videoDevices.length == 0 && audioDevices.length == 0 && (config.audio || config.video)) {
if (videoDevices.length == 0 && audioDevices.length == 0 && (config.audio || config.video)) {
var reason = "no_webcam";
video.trigger("failed", reason);
return;
}*/
}
if (!config.audio) {
mediaSettings.computerAudio = false;
......@@ -775,7 +785,6 @@
logger.log("Disconnected from room");
connected = false;
//monitorStop(localStream);
_.each(reconnectTimers, function(timer) {
clearTimeout(timer);
......@@ -791,7 +800,6 @@
var stream = streamEvent.stream;
showVideo(stream, false);
//monitorStart(stream, false);
updateState('subscribe', stream);
});
......@@ -804,7 +812,6 @@
if (stream.getID() == localStream.getID()) {
// We are published to room
showVideo(localStream, true);
//monitorStart(localStream, true);
published = PublishedFlags.StreamEstablished;
updateState('published', stream);
......@@ -845,10 +852,7 @@
muteAudio(stream.getID(), streamEvent.msg.mediaSettings.muted, true);
}
}
if (stream.getID() == localStream.getID()) {
saveMediaSettings();
}
updateVideoControls(stream.getID());
//updateVideoControls(stream.getID());
});
room.addEventListener("stream-frozen", function (streamEvent) {
......
......@@ -34,7 +34,9 @@ block content
size: "normal"
});
video.start();
video.on('initialized', function() {
video.start();
});
}
$(document).ready(function() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment