From 3ab795ca966b15be9cf16519fc5f407818abc977 Mon Sep 17 00:00:00 2001
From: Phil Banks Description: Syntax:pb:MediaEl 0.5 [Plugin]
Based on Media Element.JS 2.6.5 (http://mediaelementjs.com)
Content Plugin which provides a HTML5 Video Player for Joomla! 1.6.
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=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.
# Video DEFAULT AUDIO PARAMETER=Audio Parameter @@ -47,6 +47,7 @@ LABEL PRELOAD=Preload LABEL LOOP=Loop LABEL DEFAULT VOLUME=Default Volume LABEL WMODE=WMode +LABEL DOWNLOAD=Download text always visible? DESC MEDIA=Media type - video or audio. DESC WIDTH=Width. @@ -57,3 +58,4 @@ 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 DOWNLOAD=Should the download links always be visible? Or only when Javascript is disabled? diff --git a/Joomla 1.5/pb_mediael.php b/Joomla 1.5/pb_mediael.php index b76c032..6daaf58 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; $iIf you cannot see the media above - download here: ';
if ($audio_m4a != "") {
$html .= 'M4A ';
@@ -269,9 +273,7 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) {
$html .= 'Ogg
';
}
- $html .= '
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=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,7 +47,8 @@ LABEL PRELOAD=Preload LABEL LOOP=Loop LABEL DEFAULT VOLUME=Default Volume LABEL WMODE=WMode -LABEL DOWNLOAD=Download text always visible? +LABEL DOWNLOADLINKS=Download text always visible? +LABEL LINKTEXT=Text for download links DESC MEDIA=Media type - video or audio. DESC WIDTH=Width. @@ -58,4 +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 DOWNLOAD=Should the download links always be visible? Or only when Javascript is disabled? +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 e3e6e67..1be935b 100644 --- a/Joomla 1.5/pb_mediael.php +++ b/Joomla 1.5/pb_mediael.php @@ -63,10 +63,14 @@ function pluginPbMediaEl(&$row, &$params) { } } + $downloadlinks = $pluginParams->get('downloadlinks','0'); + if ($downloadlinks == "false" || $downloadlinks == "0") { + $showhidedownload = '$j(".PbMediaEl").hide();'; + } $document->addScriptDeclaration(' var $j = jQuery.noConflict(); $j(document).ready(function() { - '$download = $pluginParams->get('download'); if ($download == "false" || $download == "0") {'$j(".PbMediaEl").hide();'}' + '.$showhidedownload.' $j("video,audio").mediaelementplayer({ startVolume: '.$pluginParams->get('defaultVolume', '0.85').', enableAutosize: true, @@ -117,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); @@ -148,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(); @@ -244,7 +250,7 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { $html .= ''.$media.'>'; - $html .='If you cannot see the media above - download here: '; + $html .='
'.$linktext.' '; if ($audio_m4a != "") { $html .= 'M4A '; @@ -277,4 +283,5 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) { 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 1c73349..838efb8 100644 --- a/Joomla 1.5/pb_mediael.xml +++ b/Joomla 1.5/pb_mediael.xml @@ -58,9 +58,10 @@ - + + \ No newline at end of file