From: vincent@cubedesigners.com Date: Tue, 5 Oct 2021 15:46:30 +0000 (+0000) Subject: wait #4752 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=cea4c6b1dc6514e723b642a13734f89bf2c8bcb3;p=cubeextranet.git wait #4752 --- diff --git a/inc/ws/Util/html5/master/class.ws.html5.compiler.php b/inc/ws/Util/html5/master/class.ws.html5.compiler.php index cf045997e..d1db5adcb 100644 --- a/inc/ws/Util/html5/master/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/master/class.ws.html5.compiler.php @@ -843,7 +843,7 @@ class wsHTML5Compiler $res = [150, 300]; } else if ($this->maxRes <= 150) { $res = [$this->maxRes]; - } + } if ($this->widget) { $res = array_merge(array(36), $res); @@ -888,6 +888,9 @@ class wsHTML5Compiler if ($this->book->parametres->scorm_enable) { $this->book->parametres->seoVersion = false; } + if ($this->book->parametres->embedAllLibraries) { + $this->addVideoJs(); + } $this->writeStats(); $this->writeSecure(); $this->log('Copied assets'); @@ -1410,6 +1413,8 @@ height="0" width="0" style="display:none;visibility:hidden"> protected function writeIndex() { + + $iv = $this->getIndexVars(); $this->log('Got index vars'); foreach ($iv as $k => $v) { @@ -2080,6 +2085,7 @@ height="0" width="0" style="display:none;visibility:hidden"> $config = $this->writeConfig(); $this->vdir->file_put_contents('data/datas.js', $config); + $finals = $this->jsLibs; if ($this->book->parametres->PDFRenderer === 'pdfjs') { @@ -2088,6 +2094,11 @@ height="0" width="0" style="display:none;visibility:hidden"> $this->vdir->copyDirectory(WS_COMPILE_ASSETS . '/pdfjs-legacy', 'pdfjs'); } + if (stripos($this->book->parametres->PDFRenderer, 'pdfjs') !== false) { + $css = '.openFile,.rotateCw,.rotateCcw,.rotateCcw + .horizontalToolbarSeparator{display:none !important;}' . $this->book->parametres->PDFJSCSS; + $this->vdir->file_put_contents('pdfjs/web/viewer.css', file_get_contents(WS_COMPILE_ASSETS . '/' . $this->book->parametres->PDFRenderer . '/web/viewer.css') . $css); + } + if ($this->book->parametres->scorm_enable) { $finals['scorm'] = array(); $finals['scorm'][] = 'js/libs/scorm/apiwrapper.js';