Skip to content

Commit

Permalink
Temp fix #1226 - mediaLesson, interactiveVideo: syncpoints do not alw…
Browse files Browse the repository at this point in the history
…asy work with more than one mediaLesson or intrecativeVideo

Probably the best fix is to always load popcorn with all plugins instead of trying to do it on the fly.
For now the mediaLesson and interactiveVideo page just reload popcorn and the plugins
  • Loading branch information
torinfo committed Jun 16, 2023
1 parent 0eafccb commit 10531ad
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Expand Up @@ -319,14 +319,19 @@
/* files are already loaded statically */
loadFiles = false;
}
// comment out next loop and always load popcorn files
// This is because popcorn breaks if you have a mediaLesson
// and then a nav page which also loads popcorn with a different set of plugins
// Any mediaLesson after that will not work anymore
/*
for (var i=0; i<x_pageInfo.length; i++) {
if (i != x_currentPage && x_pageInfo[i].type == x_pageInfo[x_currentPage].type && x_pageInfo[i].built != false) {
// a page of this type has already been loaded - don't reload popcorn files
loadFiles = false;
break;
}
}

*/
if (loadFiles == true ) {
this.loadPopcorn();
} else {
Expand Down Expand Up @@ -422,14 +427,14 @@
// get type of media (video/audio)
if (mediaFile.indexOf(".mp3") != -1) {
mediaType = "audio";

} else if (mediaFile.indexOf(".") == -1) {
// no media
mediaType = undefined;
panelData.splice(mediaPanelIndex, 1);
mediaPanelIndex = -1;
}

// set up accordion if there's some intro text
if (x_currentPageXML.getAttribute("intro") != "" && x_currentPageXML.getAttribute("intro") != undefined) {
var $contentCover = $("#contentCover");
Expand Down Expand Up @@ -504,7 +509,7 @@
}

this.resizePanels();

// loadMedia & sortPopcorn are called below & also in the media plus plugin which deals with additional media added to panels

// _____ LOAD MEDIA _____
Expand Down
Expand Up @@ -316,14 +316,19 @@
/* files are already loaded statically */
loadFiles = false;
}
// comment out next loop and always load popcorn files
// This is because popcorn breaks if you have a mediaLesson
// and then a nav page which also loads popcorn with a different set of plugins
// Any mediaLesson after that will not work anymore
/*
for (var i=0; i<x_pageInfo.length; i++) {
if (i != x_currentPage && x_pageInfo[i].type == x_pageInfo[x_currentPage].type && x_pageInfo[i].built != false) {
// a page of this type has already been loaded - don't reload popcorn files
loadFiles = false;
break;
}
}

*/
if (loadFiles == true ) {
this.loadPopcorn();
} else {
Expand Down

0 comments on commit 10531ad

Please sign in to comment.