cubeFiles::deleteFilesOlderThan('/home/ws/www/getpdf', 60);\r
}\r
\r
+ public static function reencodeVideos($args) {\r
+\r
+ cubePHP::neverStop();\r
+\r
+ $book_id = $args[0];\r
+ $dir = WS_BOOKS . '/working/' . $book_id;\r
+\r
+ wsLinks::getLinksAndRulers($book_id, $links, $rulers);\r
+\r
+ foreach ($links as $link) {\r
+ if ($link['type'] != 4) {\r
+ continue;\r
+ }\r
+\r
+ $file = $dir . '/' . $link['to'];\r
+ if (!file_exists($file)) {\r
+ continue;\r
+ }\r
+\r
+ wsTools::encodeWebVideos($file, null, false, true);\r
+ }\r
+ }\r
+\r
}\r
\r
?>
\ No newline at end of file
protected function getVideosFormats($poster = true) {
if (!$this->phonegap) {
- $res = array('mp4', 'ogv', 'webm', 'flv');
+ $res = array('ogv', 'webm', 'mp4', 'flv');
} elseif ($this->phonegap == 'ios') {
$res = array('mp4');
} else if ($this->phonegap == 'android') {