Skip to content

Commit

Permalink
MDL-13743 Added realmedia support
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasconnault committed Mar 17, 2008
1 parent 5bdab31 commit 3c6767e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions mod/resource/type/file/resource.class.php
Expand Up @@ -254,6 +254,9 @@ function display() {
} else if ($mimetype == 'application/pdf' || $mimetype == 'application/x-pdf') {
$resourcetype = "pdf";
$embedded = true;
} else if ($mimetype == "audio/x-pn-realaudio") { // It's a realmedia file
$resourcetype = "rm";
$embedded = true;
}
}

Expand Down Expand Up @@ -533,6 +536,20 @@ function display() {
echo '<!--<![endif]-->';
echo '</object>';
echo '</div>';
} else if ($resourcetype == "rm") {

echo '<div class="resourcecontent resourcerm">';
echo '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" width="320" height="240">';
echo '<param name="src" value="' . $fullurl . '" />';
echo '<param name="controls" value="All" />';
echo '<!--[if !IE]>-->';
echo '<object type="audio/x-pn-realaudio-plugin" data="' . $fullurl . '" width="320" height="240">';
echo '<param name="controls" value="All" />';
echo '<a href="' . $fullurl . '">' . $fullurl .'</a>';
echo '</object>';
echo '<!--<![endif]-->';
echo '</object>';
echo '</div>';

} else if ($resourcetype == "quicktime") {
echo '<div class="resourcecontent resourceqt">';
Expand Down

0 comments on commit 3c6767e

Please sign in to comment.