changeset 1562:e90cb4da25fc

added mov, mpg and midi support
author ReimarBauer <R.Bauer@fz-juelich.de>
date Mon, 18 Sep 2006 20:32:18 +0200
parents d12202b5791c
children 6cb69e9ff979
files MoinMoin/macro/EmbedObject.py
diffstat 1 files changed, 39 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/macro/EmbedObject.py	Mon Sep 18 19:55:05 2006 +0200
+++ b/MoinMoin/macro/EmbedObject.py	Mon Sep 18 20:32:18 2006 +0200
@@ -191,6 +191,45 @@
     "height": kw['height'],
     "file": url,
 }
+    elif mime_type == "audio/midi":
+        return '''
+<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
+WIDTH="%(width)s"
+HEIGHT="%(height)s"
+<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
+TYPE="audio/midi">
+</EMBED>
+</OBJECT>''' % {
+    "width": kw["width"],
+    "height": kw["height"],
+    "file": url,
+}
+    elif mime_type == "video/mpeg":
+        return '''
+<OBJECT CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
+WIDTH="%(width)s"
+HEIGHT="%(height)s"
+<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
+TYPE="application/x-mplayer2">
+</EMBED>
+</OBJECT>''' % {
+   "width": kw["width"],
+   "height": kw["height"],
+   "file": url,
+}
+    elif mime_type == "video/quicktime":
+        return '''
+<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
+WIDTH="%(width)s"
+HEIGHT="%(height)s"
+<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
+TYPE="video/quicktime">
+</EMBED>
+</OBJECT>''' % {
+   "width": kw["width"],
+   "height": kw["height"],
+   "file": url,
+}
     else:
         msg = 'Not supported mimetype %(mimetype)s ' % {"mimetype": mime_type}
         return "%s%s%s" % (macro.formatter.sysmsg(1),