From 04d31d300f610dc7d77d3c10dcc8a0d003863b63 Mon Sep 17 00:00:00 2001 From: Calvin Walton Date: Tue, 15 Jan 2019 14:15:42 -0500 Subject: [PATCH] Wait until the media is ready before initializing the acorn player. Previously, the acorn player was being initialized before the asynchronous load of captions information completed, meaning that the acorn player didn't know there were caption tracks, and the CC selector control wasn't available. Fixes #6463 --- .../playback/presentation/2.0/playback.js | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/record-and-playback/presentation/playback/presentation/2.0/playback.js b/record-and-playback/presentation/playback/presentation/2.0/playback.js index 8783cd9016..965f67872f 100755 --- a/record-and-playback/presentation/playback/presentation/2.0/playback.js +++ b/record-and-playback/presentation/playback/presentation/2.0/playback.js @@ -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(); } }