From 9db72c79e152a5bd9b9bca87d8d29fc51dd88f62 Mon Sep 17 00:00:00 2001 From: "vincent@cubedesigners.com" Date: Wed, 10 Apr 2013 16:32:37 +0000 Subject: [PATCH] --- inc/ws/Controlleur/class.ws.maintenance.php | 23 +++++++++++++++++++ inc/ws/Util/html5/class.ws.html5.compiler.php | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/inc/ws/Controlleur/class.ws.maintenance.php b/inc/ws/Controlleur/class.ws.maintenance.php index ae4447de9..e749b1d7b 100644 --- a/inc/ws/Controlleur/class.ws.maintenance.php +++ b/inc/ws/Controlleur/class.ws.maintenance.php @@ -773,6 +773,29 @@ class wsMaintenance { cubeFiles::deleteFilesOlderThan('/home/ws/www/getpdf', 60); } + public static function reencodeVideos($args) { + + cubePHP::neverStop(); + + $book_id = $args[0]; + $dir = WS_BOOKS . '/working/' . $book_id; + + wsLinks::getLinksAndRulers($book_id, $links, $rulers); + + foreach ($links as $link) { + if ($link['type'] != 4) { + continue; + } + + $file = $dir . '/' . $link['to']; + if (!file_exists($file)) { + continue; + } + + wsTools::encodeWebVideos($file, null, false, true); + } + } + } ?> \ No newline at end of file diff --git a/inc/ws/Util/html5/class.ws.html5.compiler.php b/inc/ws/Util/html5/class.ws.html5.compiler.php index bbc833ad1..15e02fd16 100644 --- a/inc/ws/Util/html5/class.ws.html5.compiler.php +++ b/inc/ws/Util/html5/class.ws.html5.compiler.php @@ -304,7 +304,7 @@ class wsHTML5Compiler { 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') { -- 2.39.5