Browse Source

Delay DOM append to avoid flash of unrendered text.

pull/206/head
Simon Eisenmann 10 years ago
parent
commit
846544de29
  1. 4
      static/js/directives/audiovideo.js

4
static/js/directives/audiovideo.js

@ -137,7 +137,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -137,7 +137,6 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
// Render template.
peerTemplate(subscope, function(clonedElement, scope) {
$($scope.remoteVideos).append(clonedElement);
clonedElement.data("peerid", scope.peerid);
scope.element = clonedElement;
scope.attachStream = function(stream) {
@ -192,6 +191,9 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/ @@ -192,6 +191,9 @@ define(['jquery', 'underscore', 'text!partials/audiovideo.html', 'text!partials/
});
};
scope.attachStream(stream);
$timeout(function() {
$($scope.remoteVideos).append(clonedElement);
});
});
};

Loading…
Cancel
Save