]> _ Git - cubeextranet.git/commitdiff
wait #4752
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 5 Oct 2021 15:46:30 +0000 (15:46 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Tue, 5 Oct 2021 15:46:30 +0000 (15:46 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index cf045997e9ac915ce8171707ceb63d3b1fabc065..d1db5adcbf8a4d870b94b8fcbaac9afa8df7f68e 100644 (file)
@@ -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"></iframe></noscript>
 
     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"></iframe></noscript>
         $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"></iframe></noscript>
             $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';