Skip to content

Commit

Permalink
Moving media sync for after screenshare is loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
pedrobmarin committed Feb 22, 2019
1 parent 3635cea commit 4f4f668
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,6 @@ function loadDeskshare() {
var presentationArea = document.getElementById("presentation-area");
presentationArea.insertBefore(deskshareVideo,presentationArea.childNodes[0]);

setMediaSync();

checkLoadedDeskshare();
};

Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 4f4f668

Please sign in to comment.