Merge pull request #6561 from kepstin/caption-fixes

Wait until the media is ready before initializing the acorn player.
This commit is contained in:
Fred Dixon 2019-01-15 14:33:48 -05:00 committed by GitHub
commit fb3bce1d7d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -531,16 +531,6 @@ function loadPlayback() {
loadAudio();
}
// load up the acorn controls
logger.info("==Loading acorn media player");
$('#video').acornMediaPlayer({
theme: 'bigbluebutton',
volumeSlider: 'vertical'
});
$('#video').on("swap", function() {
swapVideoPresentation();
});
if (hasDeskshare) {
loadDeskshare();
} else {
@ -802,6 +792,16 @@ document.addEventListener('playback-ready', function(event) {
if (dataReady && mediaReady && contentReady) {
runPopcorn();
if (firstLoad) {
// load up the acorn controls
logger.info("==Loading acorn media player");
$('#video').acornMediaPlayer({
theme: 'bigbluebutton',
volumeSlider: 'vertical'
});
$('#video').on("swap", function() {
swapVideoPresentation();
});
initPopcorn();
}
}