weekly release
[moodle.git] / filter / mediaplugin / filter.php
CommitLineData
4317f92f 1<?php
35716b86
PS
2
3// This file is part of Moodle - http://moodle.org/
6de17fde 4//
35716b86
PS
5// Moodle is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
6de17fde 9//
35716b86
PS
10// Moodle is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
6de17fde 14//
35716b86
PS
15// You should have received a copy of the GNU General Public License
16// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
17
18/**
19 * Media plugin filtering
20 *
21 * This filter will replace any links to a media file with
22 * a media plugin that plays that media inline
23 *
24 * @package filter
25 * @subpackage mediaplugin
26 * @copyright 2004 onwards Martin Dougiamas {@link http://moodle.com}
27 * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
28 */
6de17fde 29
35716b86 30defined('MOODLE_INTERNAL') || die();
6de17fde 31
7e64d361 32require_once($CFG->libdir.'/filelib.php');
33
35716b86 34class filter_mediaplugin extends moodle_text_filter {
ccc161f8 35 private $eolas_fix_applied = false;
dcfffe30 36 function filter($text, array $options = array()) {
82afb587 37 global $CFG, $PAGE;
9e3f34d1 38 // You should never modify parameters passed to a method or function, it's BAD practice. Create a copy instead.
39 // The reason is that you must always be able to refer to the original parameter that was passed.
40 // For this reason, I changed $text = preg_replace(..,..,$text) into $newtext = preg.... (NICOLAS CONNAULT)
41 // Thanks to Pablo Etcheverry for pointing this out! MDL-10177
42
43 // We're using the UFO technique for flash to attain XHTML Strict 1.0
44 // See: http://www.bobbyvandersluis.com/ufo/
45 if (!is_string($text)) {
46 // non string data can not be filtered anyway
47 return $text;
48 }
e68789c5
PS
49 if (stripos($text, '</a>') === false) {
50 // performance shortcut - all regexes bellow end with the </a> tag,
51 // if not present nothing can match
52 return $text;
53 }
9e3f34d1 54 $newtext = $text; // fullclone is slow and not needed here
55
8e7fecd9 56 if (!empty($CFG->filter_mediaplugin_enable_mp3)) {
3f5192c0 57 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.mp3)"[^>]*>.*?<\/a>/is';
35716b86 58 $newtext = preg_replace_callback($search, 'filter_mediaplugin_mp3_callback', $newtext);
9e3f34d1 59 }
60
8e7fecd9 61 if (!empty($CFG->filter_mediaplugin_enable_ogg)) {
3f5192c0 62 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.ogg)"[^>]*>.*?<\/a>/is';
ce5dc36e
RW
63 $newtext = preg_replace_callback($search, 'filter_mediaplugin_ogg_callback', $newtext);
64 }
65
8e7fecd9 66 if (!empty($CFG->filter_mediaplugin_enable_ogv)) {
3f5192c0 67 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.ogv)"[^>]*>.*?<\/a>/is';
ce5dc36e
RW
68 $newtext = preg_replace_callback($search, 'filter_mediaplugin_ogv_callback', $newtext);
69 }
8e7fecd9
PS
70
71 if (!empty($CFG->filter_mediaplugin_enable_swf)) {
3f5192c0 72 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.swf)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 73 $newtext = preg_replace_callback($search, 'filter_mediaplugin_swf_callback', $newtext);
9e3f34d1 74 }
75
8e7fecd9 76 if (!empty($CFG->filter_mediaplugin_enable_flv)) {
3f5192c0 77 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.flv)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 78 $newtext = preg_replace_callback($search, 'filter_mediaplugin_flv_callback', $newtext);
9e3f34d1 79 }
80
8e7fecd9 81 if (!empty($CFG->filter_mediaplugin_enable_mov)) {
3f5192c0 82 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.mov)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 83 $newtext = preg_replace_callback($search, 'filter_mediaplugin_qt_callback', $newtext);
46936592 84
3f5192c0 85 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.mp4)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
35716b86 86 $newtext = preg_replace_callback($search, 'filter_mediaplugin_qt_callback', $newtext);
46936592 87
3f5192c0 88 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.m4v)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
35716b86 89 $newtext = preg_replace_callback($search, 'filter_mediaplugin_qt_callback', $newtext);
a184479a 90
3f5192c0 91 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.m4a)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
35716b86 92 $newtext = preg_replace_callback($search, 'filter_mediaplugin_qt_callback', $newtext);
9e3f34d1 93 }
94
8e7fecd9 95 if (!empty($CFG->filter_mediaplugin_enable_wmv)) {
3f5192c0 96 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.wmv)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 97 $newtext = preg_replace_callback($search, 'filter_mediaplugin_wmp_callback', $newtext);
9e3f34d1 98 }
99
8e7fecd9 100 if (!empty($CFG->filter_mediaplugin_enable_mpg)) {
3f5192c0 101 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.mpe?g)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 102 $newtext = preg_replace_callback($search, 'filter_mediaplugin_qt_callback', $newtext);
9e3f34d1 103 }
104
8e7fecd9 105 if (!empty($CFG->filter_mediaplugin_enable_avi)) {
3f5192c0 106 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.avi)(\?d=([\d]{1,3}%?)x([\d]{1,3}%?))?"[^>]*>.*?<\/a>/is';
35716b86 107 $newtext = preg_replace_callback($search, 'filter_mediaplugin_wmp_callback', $newtext);
9e3f34d1 108 }
109
8e7fecd9 110 if (!empty($CFG->filter_mediaplugin_enable_ram)) {
3f5192c0 111 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.ram)"[^>]*>.*?<\/a>/is';
35716b86 112 $newtext = preg_replace_callback($search, 'filter_mediaplugin_real_callback', $newtext);
9e3f34d1 113 }
114
8e7fecd9 115 if (!empty($CFG->filter_mediaplugin_enable_rpm)) {
3f5192c0 116 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.rpm)"[^>]*>.*?<\/a>/is';
35716b86 117 $newtext = preg_replace_callback($search, 'filter_mediaplugin_real_callback', $newtext);
9e3f34d1 118 }
119
8e7fecd9 120 if (!empty($CFG->filter_mediaplugin_enable_rm)) {
3f5192c0 121 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.rm)"[^>]*>.*?<\/a>/is';
35716b86 122 $newtext = preg_replace_callback($search, 'filter_mediaplugin_real_callback', $newtext);
9e3f34d1 123 }
124
125 if (!empty($CFG->filter_mediaplugin_enable_youtube)) {
a2ee26bf 126 $search = '/<a(\s+[^>]+?)?\s+href="(([^"]+youtube\.com)\/watch\?v=([A-Za-z0-9\-_]+))[^>]*>(.*?)<\/a>/is';
35716b86 127 $newtext = preg_replace_callback($search, 'filter_mediaplugin_youtube_callback', $newtext);
9e3f34d1 128
a2ee26bf 129 $search = '/<a(\s+[^>]+?)?\s+href="(([^"]+youtube\.com)\/v\/([A-Za-z0-9\-_]*))[^>]+>(.*?)<\/a>/is';
35716b86 130 $newtext = preg_replace_callback($search, 'filter_mediaplugin_youtube_callback', $newtext);
469aa3ba 131
a2ee26bf 132 $search = '/<a(\s+[^>]+?)?\s+href="((([^"]+)youtube\.com)\/view_play_list\?p=([A-Za-z0-9\-_]+))[^>]*>(.*?)<\/a>/is';
469aa3ba 133 $newtext = preg_replace_callback($search, 'filter_mediaplugin_youtube_playlist_callback', $newtext);
9e3f34d1 134 }
135
224eccbf 136 if (!empty($CFG->filter_mediaplugin_enable_img)) {
3f5192c0 137 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.jpg)"[^>]*>.*?<\/a>/is';
35716b86 138 $newtext = preg_replace_callback($search, 'filter_mediaplugin_img_callback', $newtext);
3f5192c0
RW
139
140 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.png)"[^>]*>.*?<\/a>/is';
35716b86 141 $newtext = preg_replace_callback($search, 'filter_mediaplugin_img_callback', $newtext);
3f5192c0
RW
142
143 $search = '/<a(\s+[^>]+?)?\s+href="([^"]+\.gif)"[^>]*>.*?<\/a>/is';
35716b86 144 $newtext = preg_replace_callback($search, 'filter_mediaplugin_img_callback', $newtext);
c159f28b 145 }
146
9e3f34d1 147 if (empty($newtext) or $newtext === $text) {
148 // error or not filtered
149 unset($newtext);
150 return $text;
151 }
152
153 if (!$this->eolas_fix_applied) {
9dec75db 154 $PAGE->requires->js('/filter/mediaplugin/eolas_fix.js');
9e3f34d1 155 $this->eolas_fix_applied = true;
156 }
157
158 return $newtext;
d07851e1 159 }
6de17fde 160}
161
7e64d361 162///===========================
163/// callback filter functions
164
35716b86 165function filter_mediaplugin_mp3_callback($link) {
088ccb43
PS
166 global $CFG, $OUTPUT, $PAGE;
167
168 $c = $OUTPUT->filter_mediaplugin_colors(); // You can set this up in your theme/xxx/config.php
7e64d361 169
170 static $count = 0;
171 $count++;
172 $id = 'filter_mp3_'.time().$count; //we need something unique because it might be stored in text cache
173
a2ee26bf 174 $url = addslashes_js($link[2]);
7e64d361 175
3a42ad12
RW
176 $playerpath = $CFG->wwwroot.'/filter/mediaplugin/mp3player.swf';
177 $audioplayerpath = $CFG->wwwroot .'/filter/mediaplugin/flowplayer.audio.swf';
178 $colors = explode('&', $c);
179 $playercolors = array();
180 foreach ($colors as $color) {
181 $color = explode('=', $color);
182 $playercolors[$color[0]] = $color[1];
183 }
82afb587 184
3a42ad12
RW
185 $output = <<<OET
186 <span class="mediaplugin mediaplugin_mp3" id="$id"></span>
388d1c02 187 <noscript><div>
3a42ad12
RW
188 <object width="100" height="15" id="nonjsmp3plugin" name="undefined" data="$playerpath" type="application/x-shockwave-flash">
189 <param name="movie" value="$playerpath" />
190 <param name="allowfullscreen" value="false" />
191 <param name="allowscriptaccess" value="always" />
192 <param name="flashvars" value='config={"plugins": {"controls": {
193 "fullscreen": false,
194 "height": 15,
195 "autoHide": false,
196 "all": false,
197 "play": true,
198 "pause": true,
199 "scrubber": true
200 },
201 "audio": {"url": "$audioplayerpath"}
202 },
203 "clip":{"url":"$url",
204 "autoPlay": false},
205 "content":{"url":"$playerpath"}}}' />
4d4d20e7
PS
206 </object>
207 </div></noscript>
3a42ad12
RW
208OET;
209
210 $jsoutput = create_flowplayer($id, $url, 'mp3', $playercolors);
211 $output .= $jsoutput;
82afb587 212
213 return $output;
7e64d361 214}
215
ce5dc36e
RW
216function filter_mediaplugin_ogg_callback($link) {
217 global $CFG, $OUTPUT, $PAGE;
218
219 static $count = 0;
220 $count++;
221 $id = 'filter_ogg_'.time().$count; //we need something unique because it might be stored in text cache
222
3f5192c0 223 $url = $link[2];
ce5dc36e
RW
224 $printlink = html_writer::link($url, get_string('oggaudio', 'filter_mediaplugin'));
225 $unsupportedplugins = get_string('unsupportedplugins', 'filter_mediaplugin', $printlink);
226 $output = <<<OET
227 <audio id="$id" src="$url" controls="true" width="100">
8e7fecd9 228 $unsupportedplugins
ce5dc36e
RW
229 </audio>
230OET;
8e7fecd9 231
ce5dc36e
RW
232 return $output;
233}
234
235function filter_mediaplugin_ogv_callback($link) {
236 global $CFG, $OUTPUT, $PAGE;
237
238 static $count = 0;
239 $count++;
240 $id = 'filter_ogv_'.time().$count; //we need something unique because it might be stored in text cache
241
3f5192c0 242 $url = $link[2];
ce5dc36e
RW
243 $printlink = html_writer::link($url, get_string('ogvvideo', 'filter_mediaplugin'));
244 $unsupportedplugins = get_string('unsupportedplugins', 'filter_mediaplugin', $printlink);
245 $output = <<<OET
246 <video id="$id" src="$url" controls="true" width="600" >
8e7fecd9 247 $unsupportedplugins
ce5dc36e
RW
248 </video>
249OET;
250
251 return $output;
252}
253
35716b86 254function filter_mediaplugin_swf_callback($link) {
82afb587 255 global $PAGE;
7e64d361 256 static $count = 0;
257 $count++;
258 $id = 'filter_swf_'.time().$count; //we need something unique because it might be stored in text cache
259
3f5192c0
RW
260 $width = empty($link[4]) ? '400' : $link[4];
261 $height = empty($link[5]) ? '300' : $link[5];
262 $url = $link[2];
7e64d361 263
82afb587 264 $args = Array();
265 $args['movie'] = $url;
266 $args['width'] = $width;
267 $args['height'] = $height;
268 $args['majorversion'] = 6;
269 $args['build'] = 40;
270 $args['allowscriptaccess'] = 'never';
271 $args['quality'] = 'high';
82afb587 272
10eaeca8 273 $jsoutput = create_ufo_inline($id, $args);
35716b86 274
a845d68b 275 $output = $link[0].'<span class="mediaplugin mediaplugin_swf" id="'.$id.'">('.get_string('flashanimation', 'filter_mediaplugin').')</span>'.$jsoutput;
82afb587 276
277 return $output;
7e64d361 278}
279
35716b86 280function filter_mediaplugin_flv_callback($link) {
82afb587 281 global $CFG, $PAGE;
7e64d361 282
283 static $count = 0;
284 $count++;
285 $id = 'filter_flv_'.time().$count; //we need something unique because it might be stored in text cache
286
a2ee26bf
PS
287 // note: in 1.9.x this used to be 480x360
288 $width = empty($link[4]) ? '800' : $link[4];
289 $height = empty($link[5]) ? '600' : $link[5];
290 $url = addslashes_js($link[2]);
7e64d361 291
3a42ad12
RW
292 $playerpath = $CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf';
293
294 $output = <<<EOT
295 <span class="mediaplugin mediaplugin_flv" id="$id"></span>
388d1c02 296 <noscript><div>
a2ee26bf 297 <object width="$width" height="$height" id="undefined" name="undefined" data="$playerpath" type="application/x-shockwave-flash">
3a42ad12
RW
298 <param name="movie" value="$playerpath" />
299 <param name="allowfullscreen" value="true" />
300 <param name="allowscriptaccess" value="always" />
301 <param name="flashvars" value='config={"clip":{"url":"$url",
302 "autoPlay": false},
303 "content":{"url":"$playerpath"}}}' />
4d4d20e7
PS
304 </object>
305 </div></noscript>
3a42ad12
RW
306EOT;
307
308 $jsoutput = create_flowplayer($id, $url, 'flv');
309 $output .= $jsoutput;
82afb587 310 return $output;
7e64d361 311}
312
35716b86 313function filter_mediaplugin_real_callback($link, $autostart=false) {
3f5192c0
RW
314 $url = $link[2];
315 $jsurl = addslashes_js($link[2]);
7e64d361 316 $mimetype = mimeinfo('type', $url);
317 $autostart = $autostart ? 'true' : 'false';
318
319// embed kept for now see MDL-8674
320 return $link[0].
321'<span class="mediaplugin mediaplugin_real">
322<script type="text/javascript">
323//<![CDATA[
324document.write(\'<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="240" height="180">\\
3f5192c0 325 <param name="src" value="'.$jsurl.'" />\\
7e64d361 326 <param name="autostart" value="'.$autostart.'" />\\
327 <param name="controls" value="imagewindow" />\\
328 <param name="console" value="video" />\\
329 <param name="loop" value="true" />\\
3f5192c0 330 <embed src="'.$jsurl.'" width="240" height="180" loop="true" type="'.$mimetype.'" controls="imagewindow" console="video" autostart="'.$autostart.'" />\\
7e64d361 331 </object><br />\\
332 <object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="240" height="30">\\
3f5192c0 333 <param name="src" value="'.$jsurl.'" />\\
7e64d361 334 <param name="autostart" value="'.$autostart.'" />\\
335 <param name="controls" value="ControlPanel" />\\
336 <param name="console" value="video" />\\
3f5192c0 337 <embed src="'.$jsurl.'" width="240" height="30" controls="ControlPanel" type="'.$mimetype.'" console="video" autostart="'.$autostart.'" />\\
7e64d361 338 </object>\');
339//]]>
340</script></span>';
341}
342
4d8bccf4 343/**
344 * Change links to Youtube into embedded Youtube videos
345 */
35716b86 346function filter_mediaplugin_youtube_callback($link, $autostart=false) {
3f5192c0 347 $site = s($link[3]);
a2ee26bf
PS
348 $param = $link[4]; // video id
349 $info = s(strip_tags($link[5]));
4d8bccf4 350
4d8bccf4 351
4317f92f
PS
352 return '<object title="'.$info.'"
353 class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash"
3f5192c0
RW
354 data="'.$site.'/v/'.$param.'&amp;fs=1&amp;rel=0" width="400" height="320">'.
355 '<param name="movie" value="'.$site.'/v/'.$param.'&amp;fs=1&amp;rel=0" />'.
4d8bccf4 356 '<param name="FlashVars" value="playerMode=embedded" />'.
357 '<param name="wmode" value="transparent" />'.
358 '<param name="allowFullScreen" value="true" />'.
e2cf2d7f 359 '</object>';
4d8bccf4 360}
361
469aa3ba
RW
362/**
363 * Change Youtube playlist into embedded Youtube playlist videos
364 */
365function filter_mediaplugin_youtube_playlist_callback($link, $autostart=false) {
366
367 $site = s($link[4]);
a2ee26bf
PS
368 $param = $link[5]; // playlist id
369 $info = s(strip_tags($link[6]));
469aa3ba
RW
370
371 return '<object title="'.$info.'"
372 class="mediaplugin mediaplugin_youtube" type="application/x-shockwave-flash"
373 data="'.$site.'youtube.com/p/'.$param.'&amp;fs=1&amp;rel=0" width="400" height="320">'.
374 '<param name="movie" value="'.$site.'youtube.com/p/'.$param.'&amp;fs=1&amp;rel=0" />'.
375 '<param name="FlashVars" value="playerMode=embedded" />'.
376 '<param name="wmode" value="transparent" />'.
377 '<param name="allowFullScreen" value="true" />'.
378 '</object>';
379}
380
c159f28b 381/**
382 * Change links to images into embedded images
383 */
35716b86 384function filter_mediaplugin_img_callback($link, $autostart=false) {
3f5192c0 385 $url = $link[2];
a2ee26bf 386 $info = s(strip_tags($link[2]));
c159f28b 387 return '<img class="mediaplugin mediaplugin_img" alt="" title="'.$info.'" src="'.$url.'" />';
388}
389
7e64d361 390/**
391 * Embed video using window media player if available
392 */
35716b86 393function filter_mediaplugin_wmp_callback($link, $autostart=false) {
3f5192c0
RW
394 $url = $link[2];
395 if (empty($link[4]) or empty($link[5])) {
7e64d361 396 $mpsize = '';
397 $size = 'width="300" height="260"';
398 $autosize = 'true';
399 } else {
3f5192c0 400 $size = 'width="'.$link[4].'" height="'.$link[5].'"';
7e64d361 401 $mpsize = $size;
402 $autosize = 'false';
403 }
404 $mimetype = mimeinfo('type', $url);
405 $autostart = $autostart ? 'true' : 'false';
406
407 return $link[0].
408'<span class="mediaplugin mediaplugin_wmp">
409<object classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" '.$mpsize.'
410 standby="Loading Microsoft(R) Windows(R) Media Player components..."
411 type="application/x-oleobject">
412 <param name="Filename" value="'.$url.'" />
413 <param name="src" value="'.$url.'" />
414 <param name="url" value="'.$url.'" />
415 <param name="ShowControls" value="true" />
416 <param name="AutoRewind" value="true" />
417 <param name="AutoStart" value="'.$autostart.'" />
418 <param name="Autosize" value="'.$autosize.'" />
419 <param name="EnableContextMenu" value="true" />
420 <param name="TransparentAtStart" value="false" />
421 <param name="AnimationAtStart" value="false" />
422 <param name="ShowGotoBar" value="false" />
423 <param name="EnableFullScreenControls" value="true" />
424<!--[if !IE]>-->
425 <object data="'.$url.'" type="'.$mimetype.'" '.$size.'>
426 <param name="src" value="'.$url.'" />
427 <param name="controller" value="true" />
428 <param name="autoplay" value="'.$autostart.'" />
429 <param name="autostart" value="'.$autostart.'" />
430 <param name="resize" value="scale" />
431 </object>
432<!--<![endif]-->
433</object></span>';
434}
435
35716b86 436function filter_mediaplugin_qt_callback($link, $autostart=false) {
3f5192c0
RW
437 $url = $link[2];
438 if (empty($link[4]) or empty($link[5])) {
1387d5eb 439 $size = 'width="440" height="315"';
7e64d361 440 } else {
3f5192c0 441 $size = 'width="'.$link[4].'" height="'.$link[5].'"';
7e64d361 442 }
443 $mimetype = mimeinfo('type', $url);
444 $autostart = $autostart ? 'true' : 'false';
445
446 return $link[0].
447'<span class="mediaplugin mediaplugin_qt">
448<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
449 codebase="http://www.apple.com/qtactivex/qtplugin.cab" '.$size.'>
450 <param name="pluginspage" value="http://www.apple.com/quicktime/download/" />
451 <param name="src" value="'.$url.'" />
d42df9da 452 <param name="controller" value="true" />
7e64d361 453 <param name="loop" value="true" />
454 <param name="autoplay" value="'.$autostart.'" />
455 <param name="autostart" value="'.$autostart.'" />
456 <param name="scale" value="aspect" />
457<!--[if !IE]>-->
458 <object data="'.$url.'" type="'.$mimetype.'" '.$size.'>
459 <param name="src" value="'.$url.'" />
460 <param name="pluginurl" value="http://www.apple.com/quicktime/download/" />
461 <param name="controller" value="true" />
462 <param name="loop" value="true" />
463 <param name="autoplay" value="'.$autostart.'" />
464 <param name="autostart" value="'.$autostart.'" />
465 <param name="scale" value="aspect" />
466 </object>
467<!--<![endif]-->
468</object></span>';
469}
6de17fde 470
4317f92f 471