Moving media sync for after screenshare is loaded

This commit is contained in:
Pedro Beschorner Marin 2019-02-12 11:43:51 -02:00
parent 3635cea2b5
commit 4f4f668116

View File

@ -379,8 +379,6 @@ function loadDeskshare() {
var presentationArea = document.getElementById("presentation-area");
presentationArea.insertBefore(deskshareVideo,presentationArea.childNodes[0]);
setMediaSync();
checkLoadedDeskshare();
};
@ -576,6 +574,7 @@ function checkLoadedMedia() {
function checkLoadedDeskshare() {
let deskshare = $('#deskshare-video')[0];
if (isMediaReady(deskshare)) {
setMediaSync();
document.dispatchEvent(new CustomEvent('media-ready', {'detail': 'deskshare'}));
} else {
setTimeout(checkLoadedDeskshare, 250);