From 384bc7afc86be706bf61def09afc8306cdad2443 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Sat, 2 Mar 2013 23:56:13 +0100 Subject: #2033 - Add Flowplayer 5 to play HTML5 videos. - add Flowplayer 5 to lib/flowplayer-html5 - move existing Flash Flowplayer to lib/flowplayer-flash - update page.html.php and movieplayer.html.php --HG-- rename : lib/flowplayer.controls.swf => lib/flowplayer-flash/flowplayer.controls.swf rename : lib/flowplayer.js => lib/flowplayer-flash/flowplayer.js rename : lib/flowplayer.pseudostreaming-byterange.swf => lib/flowplayer-flash/flowplayer.pseudostreaming-byterange.swf rename : lib/flowplayer.pseudostreaming.swf => lib/flowplayer-flash/flowplayer.pseudostreaming.swf rename : lib/flowplayer.swf => lib/flowplayer-flash/flowplayer.swf --- modules/gallery/views/movieplayer.html.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/gallery/views/movieplayer.html.php') diff --git a/modules/gallery/views/movieplayer.html.php b/modules/gallery/views/movieplayer.html.php index edb5184c..6d3cee2a 100644 --- a/modules/gallery/views/movieplayer.html.php +++ b/modules/gallery/views/movieplayer.html.php @@ -20,14 +20,14 @@ // setup flowplayer flowplayer(id, $.extend(true, { - "src": "", + "src": "", "wmode": "transparent", "provider": "pseudostreaming" }, ), $.extend(true, { "plugins": { "pseudostreaming": { - "url": "" + "url": "" }, "controls": { "autoHide": "always", -- cgit v1.2.3 From 9d7d6c50bb7713038231232f433ae28f6f117b95 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Sun, 3 Mar 2013 00:45:03 +0100 Subject: Follow-on to #2033 - Rename movieplayer.html.php to movieplayer-flash.html.php - renamed file with "-flash" to make room for html5 player - updated item model and xss_data.txt to reflect changes --HG-- rename : modules/gallery/views/movieplayer.html.php => modules/gallery/views/movieplayer-flash.html.php --- modules/gallery/models/item.php | 4 +- modules/gallery/tests/xss_data.txt | 14 +++---- modules/gallery/views/movieplayer-flash.html.php | 49 ++++++++++++++++++++++++ modules/gallery/views/movieplayer.html.php | 49 ------------------------ 4 files changed, 58 insertions(+), 58 deletions(-) create mode 100644 modules/gallery/views/movieplayer-flash.html.php delete mode 100644 modules/gallery/views/movieplayer.html.php (limited to 'modules/gallery/views/movieplayer.html.php') diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index 43b9a292..01da010e 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -751,7 +751,7 @@ class Item_Model_Core extends ORM_MPTT { // Not set correctly, likely because ffmpeg isn't available. Making the window 0x0 causes the // video to be effectively unviewable. So, let's guess: set width to max_size and guess a // height (using 4:3 aspect ratio). Once the video metadata is loaded, js in - // movieplayer.html.php will correct these values. + // movieplayer-flash.html.php will correct these values. $width = $max_size; $height = ceil($width * 3/4); } @@ -784,7 +784,7 @@ class Item_Model_Core extends ORM_MPTT { if (in_array(strtolower(pathinfo($this->name, PATHINFO_EXTENSION)), array("flv", "mp4", "m4v", "mov", "f4v"))) { // Filetype supported by Flowplayer v3 - use it (default) - $view = new View("movieplayer.html"); + $view = new View("movieplayer-flash.html"); $view->max_size = $movie_img->max_size; $view->width = $movie_img->width; $view->height = $movie_img->height; diff --git a/modules/gallery/tests/xss_data.txt b/modules/gallery/tests/xss_data.txt index daba878d..b365553a 100644 --- a/modules/gallery/tests/xss_data.txt +++ b/modules/gallery/tests/xss_data.txt @@ -223,13 +223,13 @@ modules/gallery/views/menu_dialog.html.php 5 DIRTY_JS $menu- modules/gallery/views/menu_link.html.php 3 DIRTY $menu->css_id?"id='{$menu->css_id}'":"" modules/gallery/views/menu_link.html.php 4 DIRTY_ATTR $menu->css_class modules/gallery/views/menu_link.html.php 5 DIRTY_JS $menu->url -modules/gallery/views/movieplayer.html.php 2 DIRTY html::anchor($url,"",$attrs) -modules/gallery/views/movieplayer.html.php 4 DIRTY_JS $attrs["id"] -modules/gallery/views/movieplayer.html.php 5 DIRTY_JS $max_size -modules/gallery/views/movieplayer.html.php 23 DIRTY_JS url::abs_file("lib/flowplayer.swf") -modules/gallery/views/movieplayer.html.php 30 DIRTY_JS url::abs_file("lib/flowplayer.pseudostreaming-byterange.swf") -modules/gallery/views/movieplayer.html.php 48 DIRTY_JS $width -modules/gallery/views/movieplayer.html.php 48 DIRTY_JS $height +modules/gallery/views/movieplayer-flash.html.php 2 DIRTY html::anchor($url,"",$attrs) +modules/gallery/views/movieplayer-flash.html.php 4 DIRTY_JS $attrs["id"] +modules/gallery/views/movieplayer-flash.html.php 5 DIRTY_JS $max_size +modules/gallery/views/movieplayer-flash.html.php 23 DIRTY_JS url::abs_file("lib/flowplayer-flash/flowplayer.swf") +modules/gallery/views/movieplayer-flash.html.php 30 DIRTY_JS url::abs_file("lib/flowplayer-flash/flowplayer.pseudostreaming-byterange.swf") +modules/gallery/views/movieplayer-flash.html.php 48 DIRTY_JS $width +modules/gallery/views/movieplayer-flash.html.php 48 DIRTY_JS $height modules/gallery/views/permissions_browse.html.php 3 DIRTY_JS url::site("permissions/form/__ITEM__") modules/gallery/views/permissions_browse.html.php 16 DIRTY_JS url::site("permissions/change/__CMD__/__GROUP__/__PERM__/__ITEM__?csrf=$csrf") modules/gallery/views/permissions_browse.html.php 43 DIRTY_ATTR $parent->id diff --git a/modules/gallery/views/movieplayer-flash.html.php b/modules/gallery/views/movieplayer-flash.html.php new file mode 100644 index 00000000..6d3cee2a --- /dev/null +++ b/modules/gallery/views/movieplayer-flash.html.php @@ -0,0 +1,49 @@ + + + diff --git a/modules/gallery/views/movieplayer.html.php b/modules/gallery/views/movieplayer.html.php deleted file mode 100644 index 6d3cee2a..00000000 --- a/modules/gallery/views/movieplayer.html.php +++ /dev/null @@ -1,49 +0,0 @@ - - - -- cgit v1.2.3 From 18f38f0dff93665267bd1497b196d9270fdbdc88 Mon Sep 17 00:00:00 2001 From: shadlaws Date: Sat, 9 Mar 2013 12:51:45 +0100 Subject: #2046 - Change Gallery over to using MediaElementJS as its movie player. --- modules/gallery/helpers/gallery_theme.php | 4 ++ modules/gallery/models/item.php | 72 ++++++++++++------------ modules/gallery/tests/xss_data.txt | 14 ++--- modules/gallery/views/movieplayer-flash.html.php | 50 ---------------- modules/gallery/views/movieplayer.html.php | 17 ++++++ themes/wind/css/screen.css | 2 +- 6 files changed, 66 insertions(+), 93 deletions(-) delete mode 100644 modules/gallery/views/movieplayer-flash.html.php create mode 100644 modules/gallery/views/movieplayer.html.php (limited to 'modules/gallery/views/movieplayer.html.php') diff --git a/modules/gallery/helpers/gallery_theme.php b/modules/gallery/helpers/gallery_theme.php index 3c6d71e9..e5f6b0b4 100644 --- a/modules/gallery/helpers/gallery_theme.php +++ b/modules/gallery/helpers/gallery_theme.php @@ -49,6 +49,10 @@ class gallery_theme_Core { . $theme->script("l10n_client.js"); } + // Add MediaElementJS library + $buf .= $theme->script("mediaelementjs/mediaelement.js"); + $buf .= $theme->script("mediaelementjs/mediaelementplayer.js"); + $buf .= $theme->css("mediaelementjs/mediaelementplayer.css"); $buf .= $theme->css("uploadify/uploadify.css"); return $buf; } diff --git a/modules/gallery/models/item.php b/modules/gallery/models/item.php index e8afaec3..1e16d307 100644 --- a/modules/gallery/models/item.php +++ b/modules/gallery/models/item.php @@ -737,40 +737,42 @@ class Item_Model_Core extends ORM_MPTT { } /** - * Return a view for movies. By default this is a Flowplayer v3 - - diff --git a/modules/gallery/views/movieplayer.html.php b/modules/gallery/views/movieplayer.html.php new file mode 100644 index 00000000..f78cc91a --- /dev/null +++ b/modules/gallery/views/movieplayer.html.php @@ -0,0 +1,17 @@ + +
> + +
+ diff --git a/themes/wind/css/screen.css b/themes/wind/css/screen.css index cbeaed34..fa1704b0 100644 --- a/themes/wind/css/screen.css +++ b/themes/wind/css/screen.css @@ -531,7 +531,7 @@ td { } #g-item img.g-resize, -#g-item a.g-movie { +#g-item .g-movie { display: block; margin: 0 auto; } -- cgit v1.2.3