mirror of
https://github.com/moodle/moodle.git
synced 2025-04-15 05:25:08 +02:00
MDL-8570 broken flv player embedding and outdate player
This commit is contained in:
parent
b28e2577d7
commit
619c7447b0
@ -88,12 +88,15 @@ function mediaplugin_filter($courseid, $text) {
|
||||
}
|
||||
|
||||
if ($CFG->filter_mediaplugin_enable_flv) {
|
||||
|
||||
$replace = array();
|
||||
|
||||
$search = array(
|
||||
'/<a(.*?)href=\"([^<]+)\.flv\?d=([\d]{1,3}%?)x([\d]{1,3}%?)\"([^>]*)>(.*?)<\/a>/is',
|
||||
'/<a(.*?)href=\"([^<]+)\.flv\"([^>]*)>(.*?)<\/a>/is'
|
||||
);
|
||||
|
||||
$replace[1] = '<script type="text/javascript">'."\n".
|
||||
|
||||
$replace[0] = '<script type="text/javascript">'."\n".
|
||||
'//<![CDATA['."\n".
|
||||
'var FO'.$count.' = { movie:"'.$CFG->wwwroot.'/filter/mediaplugin/flvplayer.swf?file=\\2.flv", '.
|
||||
'width:"\\3", height:"\\4", majorversion:"6", build:"40", '.
|
||||
@ -142,7 +145,7 @@ function mediaplugin_filter($courseid, $text) {
|
||||
|
||||
$replace = '\\0<p class="mediaplugin wmv"><object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"';
|
||||
$replace .= ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
|
||||
$replace .= ' standby="Loading Microsoft® Windows® Media Player components..." ';
|
||||
$replace .= ' standby="Loading Microsoft<EFBFBD> Windows<77> Media Player components..." ';
|
||||
$replace .= ' id="msplayer" type="application/x-oleobject">';
|
||||
$replace .= '<param name="Filename" value="\\2.wmv" />';
|
||||
$replace .= '<param name="ShowControls" value="true" />';
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user