diff --git a/Joomla 1.5/language/en-GB.plg_content_pb_mediael.ini b/Joomla 1.5/language/en-GB.plg_content_pb_mediael.ini index c04893b..e1fde08 100644 --- a/Joomla 1.5/language/en-GB.plg_content_pb_mediael.ini +++ b/Joomla 1.5/language/en-GB.plg_content_pb_mediael.ini @@ -2,7 +2,7 @@ # License GNU/GPL http://www.gnu.org/copyleft/gpl.html # pb_mediael.xml -PLUGIN DESC=

pb:MediaEl 0.5 [Plugin]

Based on Media Element.JS 2.6.5 (http://mediaelementjs.com)

Description:
Content Plugin which provides a HTML5 Video Player for Joomla! 1.6.

Syntax:
Place the following code in an article:

{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://myvideo.mp4] video_m4v=[http://myvideo.m4v] video_mov=[http://myvideo.mov] video_webm=[http://myvideo.webm] video_ogg=[http://myvideo.ogg] flash=[http://myvideo.mp4] image=[http://myvideo.png] image_visibility=[true]}
or
{pb_mediael media=[audio] width=[250] height=[25] autoplay=[true] preload=[true] loop=[true] audio_m4a=[http://myaudio.m4a] audio_mp3=[http://myaudio.mp3] audio_mpeg=[http://myaudio.mpeg] flash=[http://myaudio.mp4] image=[http://myvideo.png] image_visibility=[true]}

These are all parameters. Minimum required is media, width, height and a source file.

For video: MP4, M4V and MOV should be encoded as H264 - these can also be specified as the Flash fallback file. Silverlight will automatically use the same files.

For audio: any of the listed formats can be used for the Flash file.

+PLUGIN DESC=

pb:MediaEl 0.6b [Plugin]

Based on Media Element.JS 2.6.5 (http://mediaelementjs.com)

Description:
Content Plugin which provides a HTML5 Video Player for Joomla! 1.5.

Syntax:
Place the following code in an article:

{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://myvideo.mp4] video_m4v=[http://myvideo.m4v] video_mov=[http://myvideo.mov] video_webm=[http://myvideo.webm] video_ogg=[http://myvideo.ogg] flash=[http://myvideo.mp4] image=[http://myvideo.png] image_visibility=[true] downloadlinks=[true] linktext=[Download now: ]}
or
{pb_mediael media=[audio] width=[250] height=[25] autoplay=[true] preload=[true] loop=[true] audio_m4a=[http://myaudio.m4a] audio_mp3=[http://myaudio.mp3] audio_mpeg=[http://myaudio.mpeg] flash=[http://myaudio.mp4] image=[http://myvideo.png] image_visibility=[true] downloadlinks=[true] linktext=[Download now: ]}

These are all parameters. Minimum required is media, width, height and a source file.

For video: MP4, M4V and MOV should be encoded as H264 - these can also be specified as the Flash fallback file. Silverlight will automatically use the same files.

For audio: any of the listed formats can be used for the Flash file.

# Video DEFAULT AUDIO PARAMETER=Audio Parameter @@ -47,6 +47,8 @@ LABEL PRELOAD=Preload LABEL LOOP=Loop LABEL DEFAULT VOLUME=Default Volume LABEL WMODE=WMode +LABEL DOWNLOADLINKS=Download text always visible? +LABEL LINKTEXT=Text for download links DESC MEDIA=Media type - video or audio. DESC WIDTH=Width. @@ -57,3 +59,5 @@ DESC PRELOAD=Preload the video. DESC LOOP=Loops the video. Actually it works only in HTML. DESC DEFAULT VOLUME=Will be overridden by local volume if available. DESC WMODE=Here you can choose the wmode for flash player (e.g. opaque, to place elements above flash). +DESC DOWNLOADLINKS=Should the download links always be visible? Or only when Javascript is disabled? +DESC LINKTEXT=Define text that should proceed format list for download list diff --git a/Joomla 1.5/pb_mediael.php b/Joomla 1.5/pb_mediael.php index b76c032..1be935b 100644 --- a/Joomla 1.5/pb_mediael.php +++ b/Joomla 1.5/pb_mediael.php @@ -45,7 +45,7 @@ function pluginPbMediaEl(&$row, &$params) { } } if (!$foundJqueryScripts) { - $document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'); + $document->addScript('//ajax.googleapis.com/ajax/libs/jquery/1.7/jquery.min.js'); } $foundMediaelScripts = false; for ($i = 0; $iget('downloadlinks','0'); + if ($downloadlinks == "false" || $downloadlinks == "0") { + $showhidedownload = '$j(".PbMediaEl").hide();'; + } $document->addScriptDeclaration(' var $j = jQuery.noConflict(); $j(document).ready(function() { + '.$showhidedownload.' $j("video,audio").mediaelementplayer({ startVolume: '.$pluginParams->get('defaultVolume', '0.85').', enableAutosize: true, @@ -116,6 +121,7 @@ function contentPbMediaEl_getParams($videoParams, $pluginParams) { $videoParamsList['image'] = $pluginParams->get('image'); $videoParamsList['image_visibility'] = $pluginParams->get('image_visibility'); $videoParamsList['flash'] = $pluginParams->get('flash'); + $videoParamsList['linktext'] = $pluginParams->get('linktext'); $items = explode(' ', $videoParams); @@ -147,13 +153,14 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { $video_mov = $videoParamsList['video_mov']; $video_webm = $videoParamsList['video_webm']; $video_ogg = $videoParamsList['video_ogg']; + $link_text = $videoParamsList['linktext']; $flash = $videoParamsList['flash']; $image = $videoParamsList['image']; $image_visibility = $videoParamsList['image_visibility']; $wmode = $pluginParams->get('wmode', 'default'); $uri_flash = ''; $uri_image = ''; - + // Add URI for local flash video if (stripos($flash, 'http://') === false) { $uri_flash = JURI::base(); @@ -191,13 +198,13 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { // Poster image if ($image_visibility == "true" || $image_visibility == "1") { - $poster_html = ' poster="'.$image; + $poster_html = ' poster="'.$image.'"'; } else { $poster_html = ''; } // HTML output - $html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'">'; + $html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'>'; if ($audio_m4a != "") { $html .= ''; @@ -241,7 +248,9 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { $html .= ''; } - $html .='If you cannot see the media above - download here: '; + $html .= ''; + + $html .='

'.$linktext.' '; if ($audio_m4a != "") { $html .= 'M4A '; @@ -269,11 +278,10 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { $html .= 'Ogg
'; } - $html .= ''; - - $html .= ''; + $html .= '

'; return $html; -} \ No newline at end of file +} +?> \ No newline at end of file diff --git a/Joomla 1.5/pb_mediael.xml b/Joomla 1.5/pb_mediael.xml index a77afeb..838efb8 100644 --- a/Joomla 1.5/pb_mediael.xml +++ b/Joomla 1.5/pb_mediael.xml @@ -7,7 +7,7 @@ GNU/GPL http://www.gnu.org/copyleft/gpl.html pb@mrc-lmb.cam.ac.uk www2.mrc-lmb.cam.ac.uk - 0.5 + 0.6b PLUGIN DESC pb_mediael.php @@ -58,5 +58,10 @@ + + + + + \ No newline at end of file diff --git a/Joomla 1.6/pb_mediael/pb_mediael.php b/Joomla 1.6/pb_mediael/pb_mediael.php index 04db2c6..cab70a0 100644 --- a/Joomla 1.6/pb_mediael/pb_mediael.php +++ b/Joomla 1.6/pb_mediael/pb_mediael.php @@ -195,13 +195,13 @@ protected function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParam // Poster image if ($image_visibility == "true" || $image_visibility == "1") { - $poster_html = ' poster="'.$image; + $poster_html = ' poster="'.$image.'"'; } else { $poster_html = ''; } // HTML output - $html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'">'; + $html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'>'; if ($audio_m4a != "") { $html .= '';