mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 08:22:07 +02:00
Converted embedded media files (avi, wmv and mov) to xhtml strict compliance. However, this is far from finished, since some browsers are not displaying correctly.
<table border="1" cellpadding="2" cellspacing="2"> <tr> <td></td><th colspan="8">Browsers</th> </tr> <tr> <th>File</th> <td>FF 1.5</td> <td>FF 2.0</td> <td>IE 1.5</td> <td>IE 1.6</td> <td>IE 1.7</td> <td>Safari 2.0</td> <td>Opera 9.10</td> <td>Konqueror</td> </tr> <tr> <td>AVI (800x600)</td> <td>?</td><!-- FF 1.5 --> <td>?</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>?</td><!-- IE 1.6 --> <td>?</td><!-- IE 1.7 --> <td>?</td><!-- Safari 2.0 --> <td>?</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> <tr> <td>AVI (300x200)</td> <td>?</td><!-- FF 1.5 --> <td>OK (pb with size)</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>OK</td><!-- IE 1.6 --> <td>OK</td><!-- IE 1.7 --> <td>OK</td><!-- Safari 2.0 --> <td>OK</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> <tr> <td>WMV (800x600)</td> <td>?</td><!-- FF 1.5 --> <td>OK</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>OK</td><!-- IE 1.6 --> <td>OK</td><!-- IE 1.7 --> <td>NO</td><!-- Safari 2.0 --> <td>OK</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> <tr> <td>WMV (300x200)</td> <td>?</td><!-- FF 1.5 --> <td>OK (pb with size)</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>OK</td><!-- IE 1.6 --> <td>OK</td><!-- IE 1.7 --> <td>OK</td><!-- Safari 2.0 --> <td>OK</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> <tr> <td>MOV (800x600)</td> <td>?</td><!-- FF 1.5 --> <td>OK</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>OK</td><!-- IE 1.6 --> <td>OK</td><!-- IE 1.7 --> <td>NO</td><!-- Safari 2.0 --> <td>OK</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> <tr> <td>MOV (300x200)</td> <td>?</td><!-- FF 1.5 --> <td>OK</td><!-- FF 2.0 --> <td>?</td><!-- IE 1.5 --> <td>OK</td><!-- IE 1.6 --> <td>OK</td><!-- IE 1.7 --> <td>NO</td><!-- Safari 2.0 --> <td>OK</td><!-- Opera 2.0 --> <td>?</td><!-- Konqueror 2.0 --> </tr> </table>
This commit is contained in:
parent
38a2212c8f
commit
e0af42ef0f
@ -216,6 +216,7 @@ function display() {
|
||||
$formatoptions->noclean = true;
|
||||
|
||||
if ($resource->options != "frame") {
|
||||
|
||||
if (in_array($mimetype, array('image/gif','image/jpeg','image/png'))) { // It's an image
|
||||
$resourcetype = "image";
|
||||
$embedded = true;
|
||||
@ -234,7 +235,7 @@ function display() {
|
||||
|
||||
} else if ($mimetype == "text/html") { // It's a web page
|
||||
$resourcetype = "html";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$isteamspeak = (stripos($resource->reference, 'teamspeak://') === 0);
|
||||
@ -440,26 +441,26 @@ function display() {
|
||||
|
||||
} else if ($resourcetype == "mediaplayer") {
|
||||
echo '<div class="resourcecontent">';
|
||||
echo '<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"';
|
||||
echo ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
|
||||
echo ' standby="Loading Microsoft<66> Windows<77> Media Player components..." ';
|
||||
echo ' id="msplayer" align="" type="application/x-oleobject">';
|
||||
echo "<param name=\"Filename\" value=\"$fullurl\">";
|
||||
echo '<param name="ShowControls" value="true" />';
|
||||
echo '<param name="AutoRewind" value="true" />';
|
||||
echo '<param name="AutoStart" value="true" />';
|
||||
echo '<param name="Autosize" value="true" />';
|
||||
echo '<param name="EnableContextMenu" value="true" />';
|
||||
echo '<param name="TransparentAtStart" value="false" />';
|
||||
echo '<param name="AnimationAtStart" value="false" />';
|
||||
echo '<param name="ShowGotoBar" value="false" />';
|
||||
echo '<param name="EnableFullScreenControls" value="true" />';
|
||||
echo "\n<embed src=\"$fullurl\" name=\"msplayer\" type=\"$mimetype\" ";
|
||||
echo ' ShowControls="1" AutoRewind="1" AutoStart="1" Autosize="0" EnableContextMenu="1"';
|
||||
echo ' TransparentAtStart="0" AnimationAtStart="0" ShowGotoBar="0" EnableFullScreenControls="1"';
|
||||
echo ' pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/">';
|
||||
echo '</embed>';
|
||||
|
||||
echo '<object type="video/x-ms-wmv" data="' . $fullurl . '">';
|
||||
// Old non-compliant code (but used to work with Opera/Safari)
|
||||
// echo '<object classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95"';
|
||||
// echo ' codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ';
|
||||
// echo ' standby="Loading Microsoft<66> Windows<77> Media Player components..." ';
|
||||
// echo ' id="msplayer" type="application/x-oleobject">';
|
||||
echo '<param name="controller" value="true" />';
|
||||
echo '<param name="autostart" value="true" />';
|
||||
echo "<param name=\"src\" value=\"$fullurl\" />";
|
||||
echo '<param name="scale" value="noScale" />';
|
||||
// Old non-compliant code
|
||||
// echo "\n<embed src=\"$fullurl\" name=\"msplayer\" type=\"$mimetype\" ";
|
||||
// echo ' ShowControls="1" AutoRewind="1" AutoStart="1" Autosize="0" EnableContextMenu="1"';
|
||||
// echo ' TransparentAtStart="0" AnimationAtStart="0" ShowGotoBar="0" EnableFullScreenControls="1"';
|
||||
// echo ' pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/">';
|
||||
// echo '</embed>';
|
||||
echo "<a href=\"$fullurl\">$fullurl</a>";
|
||||
echo '</object>';
|
||||
|
||||
echo '</div>';
|
||||
|
||||
} else if ($resourcetype == "quicktime") {
|
||||
@ -467,21 +468,31 @@ function display() {
|
||||
echo '<div class="resourcecontent">';
|
||||
echo '<object classid="CLSID:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"';
|
||||
echo ' codebase="http://www.apple.com/qtactivex/qtplugin.cab" ';
|
||||
echo ' height="450" width="600"';
|
||||
echo ' id="quicktime" align="" type="application/x-oleobject">';
|
||||
echo ' id="quicktime" type="application/x-oleobject">';
|
||||
echo "<param name=\"src\" value=\"$fullurl\" />";
|
||||
echo '<param name="autoplay" value="true" />';
|
||||
echo '<param name="loop" value="true" />';
|
||||
echo '<param name="controller" value="true" />';
|
||||
echo '<param name="scale" value="aspect" />';
|
||||
echo "\n<embed src=\"$fullurl\" name=\"quicktime\" type=\"$mimetype\" ";
|
||||
echo ' height="450" width="600" scale="aspect"';
|
||||
echo ' autoplay="true" controller="true" loop="true" ';
|
||||
echo ' pluginspage="http://quicktime.apple.com/">';
|
||||
echo '</embed>';
|
||||
// New compliant code
|
||||
echo '<!--[if !IE]>-->';
|
||||
echo "<object type=\"video/quicktime\" data=\"$fullurl\">";
|
||||
echo '<param name="controller" value="true" />';
|
||||
echo '<param name="autoplay" value="true" />';
|
||||
echo '<param name="loop" value="true" />';
|
||||
echo '<param name="scale" value="aspect" />';
|
||||
echo '</object>';
|
||||
echo '<!--<![endif]-->';
|
||||
|
||||
// Old non-compliant code
|
||||
// echo "\n<embed src=\"$fullurl\" name=\"quicktime\" type=\"$mimetype\" ";
|
||||
// echo ' height="450" width="600" scale="aspect"';
|
||||
// echo ' autoplay="true" controller="true" loop="true" ';
|
||||
// echo ' pluginspage="http://quicktime.apple.com/">';
|
||||
// echo '</embed>';
|
||||
echo '</object>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
if (trim($resource->summary)) {
|
||||
print_simple_box(format_text($resource->summary, FORMAT_MOODLE, $formatoptions, $course->id), "center");
|
||||
|
@ -3023,6 +3023,11 @@ body#question-preview .quemodname, body#question-preview .controls {
|
||||
margin:20px;
|
||||
}
|
||||
|
||||
.resourcecontent object {
|
||||
height:480px;
|
||||
width:600px;
|
||||
}
|
||||
|
||||
.mod-resource .modified {
|
||||
text-align:center;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user