Permalink
Browse files

filter/mediaplugins MDL-18658 Add support for MP4 files (Quicktime)

  • Loading branch information...
moodler
moodler committed Jul 21, 2009
1 parent b12c56b commit 2ae3f041432333b84df6d0fc94a9d406b4a71ec5
Showing with 7 additions and 0 deletions.
  1. +7 −0 filter/mediaplugin/filter.php
@@ -53,6 +53,13 @@ function mediaplugin_filter($courseid, $text) {
if ($CFG->filter_mediaplugin_enable_mov) {
$search = '/<a.*?href="([^<]+\.mov)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
$newtext = preg_replace_callback($search, 'mediaplugin_filter_qt_callback', $newtext);
+
+ // MDL-18658
+ $search = '/<a.*?href="([^<]+\.mp4)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
+ $newtext = preg_replace_callback($search, 'mediaplugin_filter_qt_callback', $newtext);
+
+ $search = '/<a.*?href="([^<]+\.m4v)(\?d=([\d]{1,4}%?)x([\d]{1,4}%?))?"[^>]*>.*?<\/a>/is';
+ $newtext = preg_replace_callback($search, 'mediaplugin_filter_qt_callback', $newtext);
}
if ($CFG->filter_mediaplugin_enable_wmv) {

0 comments on commit 2ae3f04

Please sign in to comment.