Skip to content

Commit

Permalink
Fix video syncing bug
Browse files Browse the repository at this point in the history
  • Loading branch information
abhaybd committed Apr 24, 2024
1 parent 586b603 commit f497b2b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions static/js/sync_vids.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ $(document).ready(function() {
}
}
}
// trigger callback if already ready
if (vid.readyState > 3) {
vid.oncanplay();
}

vid.onended = () => {
vidsEnded[group] += 1;
Expand All @@ -38,7 +42,5 @@ $(document).ready(function() {
}
}
}
}


}
});

0 comments on commit f497b2b

Please sign in to comment.