Permalink
Browse files

Update to mediaelements.js 2.2.5, bugfixes + added more formats

  • Loading branch information...
1 parent 63e9194 commit 7496837aa865c2423ace20d805ffc3eb5a975e16 @emirpprime committed Nov 1, 2011
@@ -2,26 +2,34 @@
# License GNU/GPL http://www.gnu.org/copyleft/gpl.html
# pb_mediael.xml
-PLUGIN DESC=<h1>pb:MediaEl 0.3 [Plugin]</h1><strong>Based on Media Element.JS 2.2.3 (<a href="http://mediaelementjs.com" title="Homepage of Media Element.JS" target="_blank">http://mediaelementjs.com</a>)</strong><p><strong>Description:</strong><br />Content Plugin which provides a HTML5 Video Player for Joomla! 1.5.</p><p><strong>Syntax:</strong><br />Place the following code in an article: <pre wrap="wrap">{pb_mediael media=[video] width=[640] height=[480] autoplay=[true] preload=[true] loop=[true] video_mp4=[http://video-js.zencoder.com/oceans-clip.mp4] video_webm=[http://video-js.zencoder.com/oceans-clip.webm] video_ogg=[http://video-js.zencoder.com/oceans-clip.ogg] flash=[http://video-js.zencoder.com/oceans-clip.mp4] image=[http://video-js.zencoder.com/oceans-clip.png] image_visibility=[true]}</pre></p><p>These are all parameters. Minimum required is media, width, height and a source file.</p>
+PLUGIN DESC=<h1>pb:MediaEl 0.4 [Plugin]</h1><strong>Based on Media Element.JS 2.2.5 (<a href="_QQ_"http://mediaelementjs.com"_QQ_" title="Homepage of Media Element.JS"_QQ_" target="_QQ_"_blank"_QQ_">http://mediaelementjs.com</a>)</strong><p><strong>Description:</strong><br />Content Plugin which provides a HTML5 Video Player for Joomla! 1.6.</p><p><strong>Syntax:</strong><br />Place the following code in an article: <pre wrap="_QQ_"wrap"_QQ_">{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]}<br/>or<br/>{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]}</pre></p><p>These are all parameters. Minimum required is media, width, height and a source file.</p><p>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.</p><p>For audio: any of the listed formats can be used for the Flash file.</p>
# Video
DEFAULT AUDIO PARAMETER=<strong>Audio Parameter</strong>
+LABEL AUDIO M4A=Audio [m4a]
LABEL AUDIO MP3=Audio [mp3]
+LABEL AUDIO MPEG=Audio [mpeg]
+DESC AUDIO M4A=Default audio [m4a]. Leave blank for no default Audio.
DESC AUDIO MP3=Default audio [mp3]. Leave blank for no default Audio.
+DESC AUDIO MPEG=Default audio [mpeg]. Leave blank for no default Audio.
# Video
DEFAULT VIDEO PARAMETER=<strong>Video Parameter</strong>
LABEL VIDEO MP4=Video [mp4]
+LABEL VIDEO M4V=Video [m4v]
+LABEL VIDEO MOV=Video [mov]
LABEL VIDEO WEBM=Video [webm]
LABEL VIDEO OGG=Video [ogg]
LABEL FLASH=Flash Fallback [mp4]
LABEL IMAGE=Poster / Fallback Image
LABEL IMAGE VISIBILITY=Poster / Fallback visible
DESC VIDEO MP4=Default video [mp4]. Leave blank for no default Video.
+DESC VIDEO M4V=Default video [m4v]. Leave blank for no default Video.
+DESC VIDEO MOV=Default video [mov]. Leave blank for no default Video.
DESC VIDEO WEBM=Default video [webm]. Leave blank for no default Video.
DESC VIDEO OGG=Default video [ogg]. Leave blank for no default Video.
DESC FLASH=If video cannot display in HTML5, here you can set a default fallback video for flash. Leave blank for no default flash video.
View
@@ -27,12 +27,12 @@ function pluginPbMediaEl(&$row, &$params) {
$foundmediaelStyles = false;
for ($i = 0; $i<count($styleSheets); $i++) {
- if (stripos($styleSheets[$i], 'mediaelementplayer.css') !== false) {
+ if (stripos($styleSheets[$i], 'mediaelementplayer.min.css') !== false) {
$foundmediaelStyles = true;
}
}
if (!$foundmediaelStyles) {
- $document->addStyleSheet(JURI::base().'plugins/content/pb_mediael/mediaelementplayer.css');
+ $document->addStyleSheet(JURI::base().'plugins/content/pb_mediael/mediaelementplayer.min.css');
}
@@ -104,8 +104,12 @@ function contentPbMediaEl_getParams($videoParams, $pluginParams) {
$videoParamsList['autoplay'] = $pluginParams->get('autoplay');
$videoParamsList['preload'] = $pluginParams->get('preload');
$videoParamsList['loop'] = $pluginParams->get('loop');
+ $videoParamsList['audio_m4a'] = $pluginParams->get('audio_m4a');
$videoParamsList['audio_mp3'] = $pluginParams->get('audio_mp3');
+ $videoParamsList['audio_mpeg'] = $pluginParams->get('audio_mpeg');
$videoParamsList['video_mp4'] = $pluginParams->get('video_mp4');
+ $videoParamsList['video_m4v'] = $pluginParams->get('video_m4v');
+ $videoParamsList['video_mov'] = $pluginParams->get('video_mov');
$videoParamsList['video_webm'] = $pluginParams->get('video_webm');
$videoParamsList['video_ogg'] = $pluginParams->get('video_ogg');
$videoParamsList['image'] = $pluginParams->get('image');
@@ -134,8 +138,12 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) {
$autoplay = $videoParamsList['autoplay'];
$preload = $videoParamsList['preload'];
$loop = $videoParamsList['loop'];
+ $audio_m4a = $videoParamsList['audio_m4a'];
$audio_mp3 = $videoParamsList['audio_mp3'];
+ $audio_mpeg = $videoParamsList['audio_mpeg'];
$video_mp4 = $videoParamsList['video_mp4'];
+ $video_m4v = $videoParamsList['video_m4v'];
+ $video_mov = $videoParamsList['video_mov'];
$video_webm = $videoParamsList['video_webm'];
$video_ogg = $videoParamsList['video_ogg'];
$flash = $videoParamsList['flash'];
@@ -190,18 +198,28 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) {
// HTML output
$html = '<'.$media.' width="'.$width.'" height="'.$height.'" controls="controls"'.$autoplay_html.$preload_html.$loop_html.$poster_html.'">';
+ if ($audio_m4a != "") {
+ $html .= '<source src="'.$audio_m4a.'" type="audio/m4a" />';
+ }
if ($audio_mp3 != "") {
$html .= '<source src="'.$audio_mp3.'" type="audio/mp3" />';
}
+ if ($audio_mpeg != "") {
+ $html .= '<source src="'.$audio_mpeg.'" type="audio/mpeg" />';
+ }
if ($video_mp4 != "") {
$html .= '<source src="'.$video_mp4.'" type="video/mp4" />';
}
-
+ if ($video_m4v != "") {
+ $html .= '<source src="'.$video_m4v.'" type="video/m4v" />';
+ }
+ if ($video_mov != "") {
+ $html .= '<source src="'.$video_mov.'" type="video/mov" />';
+ }
if ($video_webm != "") {
$html .= '<source src="'.$video_webm.'" type="video/webm" />';
}
-
if ($video_ogg != "") {
$html .= '<source src="'.$video_ogg.'" type="video/ogg" />';
}
@@ -224,24 +242,33 @@ function contentPbMediaEl_createHTML($id, &$pluginParams, &$videoParamsList) {
$html .='<p class="PbMediaEl"><strong>If you cannot see the media above - download here: </strong>';
+ if ($audio_m4a != "") {
+ $html .= '<a href="'.$audio_m4a.'">M4A</a> ';
+ }
if ($audio_mp3 != "") {
$html .= '<a href="'.$audio_mp3.'">MP3</a> ';
}
+ if ($audio_mpeg != "") {
+ $html .= '<a href="'.$audio_mpeg.'">MPEG</a> ';
+ }
if ($video_mp4 != "") {
$html .= '<a href="'.$video_mp4.'">MP4</a> ';
}
-
+ if ($video_m4v != "") {
+ $html .= '<a href="'.$video_m4v.'">M4V</a> ';
+ }
+ if ($video_mov != "") {
+ $html .= '<a href="'.$video_mov.'">MOV</a> ';
+ }
if ($video_webm != "") {
$html .= '<a href="'.$video_webm.'">WebM</a> ';
}
-
if ($video_ogg != "") {
$html .= '<a href="'.$video_ogg.'">Ogg</a><br>';
}
- $html .= '</p>
- </div>';
+ $html .= '</p>';
$html .= '</'.$media.'>';
@@ -7,7 +7,7 @@
<license>GNU/GPL http://www.gnu.org/copyleft/gpl.html</license>
<authorEmail>pb@mrc-lmb.cam.ac.uk</authorEmail>
<authorUrl>www2.mrc-lmb.cam.ac.uk</authorUrl>
- <version>0.3</version>
+ <version>0.4</version>
<description>PLUGIN DESC</description>
<files>
<filename plugin="pb_mediael">pb_mediael.php</filename>
@@ -22,9 +22,13 @@
<option value="audio">audio</option>
</param>
<param name="@spacer" type="spacer" default="DEFAULT AUDIO PARAMETER" label="" description="" />
+ <param name="audio_m4a" type="text" default="" label="LABEL AUDIO M4A" description="DESC AUDIO M4A" size="40" />
<param name="audio_mp3" type="text" default="" label="LABEL AUDIO MP3" description="DESC AUDIO MP3" size="40" />
+ <param name="audio_mpeg" type="text" default="" label="LABEL AUDIO MPEG" description="DESC AUDIO MPEG" size="40" />
<param name="@spacer" type="spacer" default="DEFAULT VIDEO PARAMETER" label="" description="" />
<param name="video_mp4" type="text" default="" label="LABEL VIDEO MP4" description="DESC VIDEO MP4" size="40" />
+ <param name="video_m4v" type="text" default="" label="LABEL VIDEO M4V" description="DESC VIDEO M4V" size="40" />
+ <param name="video_mov" type="text" default="" label="LABEL VIDEO MOV" description="DESC VIDEO MOV" size="40" />
<param name="video_webm" type="text" default="" label="LABEL VIDEO WEBM" description="DESC VIDEO WEBM" size="40" />
<param name="video_ogg" type="text" default="" label="LABEL VIDEO OGG" description="DESC VIDEO OGG" size="40" />
<param name="flash" type="text" default="" label="LABEL FLASH" description="DESC FLASH" size="40" />
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
0 Joomla 1.5/pb_mediael/bigplay.png 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
No changes.
View
0 Joomla 1.5/pb_mediael/loading.gif 100644 → 100755
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.

0 comments on commit 7496837

Please sign in to comment.