mirror of
https://github.com/moodle/moodle.git
synced 2025-05-09 09:49:01 +02:00
Don't download MP3 files automatically.... download only when play button
is pressed.
This commit is contained in:
parent
4fe76cc138
commit
c2ecfdfcbf
filter/mediaplugin
@ -25,9 +25,10 @@ function mediaplugin_filter($courseid, $text) {
|
||||
if (!empty($THEME->filter_mediaplugin_colors)) {
|
||||
$c = $THEME->filter_mediaplugin_colors; // You can set this up in your theme/xxx/config.php
|
||||
} else {
|
||||
$c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff';
|
||||
$c = 'bgColour=000000&btnColour=ffffff&btnBorderColour=cccccc&iconColour=000000&iconOverColour=00cc00&trackColour=cccccc&handleColour=ffffff&loaderColour=ffffff&waitForPlay=yes&';
|
||||
}
|
||||
}
|
||||
$c = htmlentities($c);
|
||||
$search = '/<a(.*?)href=\"([^<]+)\.mp3\"([^>]*)>(.*?)<\/a>/i';
|
||||
|
||||
$replace = '\\0 <object class="mediaplugin mp3" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"';
|
||||
@ -36,11 +37,11 @@ function mediaplugin_filter($courseid, $text) {
|
||||
$replace .= " <param name=\"movie\" value=\"$CFG->wwwroot/filter/mediaplugin/mp3player.swf?src=\\2.mp3\" />";
|
||||
$replace .= ' <param name="quality" value="high" />';
|
||||
$replace .= ' <param name="bgcolor" value="#333333" />';
|
||||
$replace .= ' <param name="flashvars" value="'.$c.'&" />';
|
||||
$replace .= ' <param name="flashvars" value="'.$c.'" />';
|
||||
$replace .= " <embed src=\"$CFG->wwwroot/filter/mediaplugin/mp3player.swf?src=\\2.mp3\" ";
|
||||
$replace .= " quality=\"high\" bgcolor=\"#333333\" width=\"90\" height=\"15\" name=\"mp3player\" ";
|
||||
$replace .= ' type="application/x-shockwave-flash" ';
|
||||
$replace .= ' flashvars="'.$c.'&" ';
|
||||
$replace .= ' flashvars="'.$c.'" ';
|
||||
$replace .= ' pluginspage="http://www.macromedia.com/go/getflashplayer">';
|
||||
$replace .= '</embed>';
|
||||
$replace .= '</object> ';
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user