Short description

Wouldn't it be nice to have support for video and other media? I saw something in Dokuwiki on http://wiki.splitbrain.org/plugin:video -- FlorianBurka 2006年06月29日 17:51:37

If you could tell the mimetype and the object code I do add it. -- ReimarBauer 2006年06月29日 20:43:07

Does this help?

What

classid

mime

parameters

movie

clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B

video/quicktime

autoplay = true

mpeg

clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B

video/mpeg

realvideo

clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA

autostart = true

video

CLSID:05589FA1-C356-11CE-BF01-00AA0055595A

application/x-mplayer2

autostart = true

midi

clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B

audio/midi

mp3

clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B

audio/

visio

CLSID:279D6C9A-652E-4833-BEFC-312CA8887857

vnd.ms-visio.viewer

-- FlorianBurka 2006年06月30日 12:50:29

Needs tests on several browsers and OSs

 1 # HG changeset patch
 2 # User ReimarBauer <R.Bauer@fz-juelich.de>
 3 # Node ID f373ba0fb6ab9d9afac442e628ad5d5f96652428
 4 # Parent b3a47164c22a16a37bb097a78e03342ecacf4d3b
 5 added mov, mpg and midi support
 6 
 7 diff -r b3a47164c22a -r f373ba0fb6ab MoinMoin/macro/EmbedObject.py
 8 --- a/MoinMoin/macro/EmbedObject.py	Tue Aug 29 17:01:55 2006 +0200
 9 +++ b/MoinMoin/macro/EmbedObject.py	Wed Aug 30 19:51:26 2006 +0200
 10 @@ -191,6 +191,45 @@ VALUE = "%(file)s">Your browser cannot d
 11  "height": kw['height'],
 12  "file": url,
 13  }
 14 + elif mime_type == "audio/midi":
 15 + return '''
 16 +<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
 17 +WIDTH="%(width)s"
 18 +HEIGHT="%(height)s"
 19 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
 20 +TYPE="audio/midi">
 21 +</EMBED>
 22 +</OBJECT>''' % {
 23 + "width": kw["width"],
 24 + "height": kw["height"],
 25 + "file": url,
 26 +}
 27 + elif mime_type == "video/mpeg":
 28 + return '''
 29 +<OBJECT CLASSID="CLSID:05589FA1-C356-11CE-BF01-00AA0055595A"
 30 +WIDTH="%(width)s"
 31 +HEIGHT="%(height)s"
 32 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
 33 +TYPE="application/x-mplayer2">
 34 +</EMBED>
 35 +</OBJECT>''' % {
 36 + "width": kw["width"],
 37 + "height": kw["height"],
 38 + "file": url,
 39 +}
 40 + elif mime_type == "video/quicktime":
 41 + return '''
 42 +<OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B"
 43 +WIDTH="%(width)s"
 44 +HEIGHT="%(height)s"
 45 +<EMBED SRC="%(file)s" HEIGHT="0" REPEAT="TRUE" AUTOSTART="TRUE" WIDTH="0" OP="TRUE"
 46 +TYPE="video/quicktime">
 47 +</EMBED>
 48 +</OBJECT>''' % {
 49 + "width": kw["width"],
 50 + "height": kw["height"],
 51 + "file": url,
 52 +}
 53  else:
 54  msg = 'Not supported mimetype %(mimetype)s ' % {"mimetype": mime_type}
 55  return "%s%s%s" % (macro.formatter.sysmsg(1),

EmbedObject_patch.txt

  • (!) Added to 1.5 branch


Test for Loading of Runtime Shared Libraries into an SWF

I have completed a number of tests to check loading of runtime shared libraries into an swf using Flash MX2004, and there seems to be a little bit of a glitch. Any suggestions would be very welcome.

-- BrianMcEnery

I have spent some time to resolve problem with embedded visio drawings to the MoinMoin pages, so I found some gaps in the code of plugin. For example my part of code especially created for visio drawings:

 1  if mime_type == 'application/vnd.ms-visio.viewer':
 2  if self.width == "":
 3  self.width = "800"
 4  if self.height == "":
 5  self.height = "600"
 6 
 7  return '''
 8 <OBJECT classid="CLSID:279D6C9A-652E-4833-BEFC-312CA8887857"
 9  codebase="http://somewhereonlocalserver/vviewer.exe"
 10  ID="Viewer1" width="%(width)s" height="%(height)s">
 11  <param name="BackColor" value="16777200">
 12  <param name="AlertsEnabled" value="1">
 13  <param name="ContextMenuEnabled" value="1">
 14  <param name="GridVisible" value="0">
 15  <param name="HighQualityRender" value="1">
 16  <param name="PageColor" value="16777215">
 17  <param name="PageVisible" value="1">
 18  <param name="PropertyDialogEnabled" value="1">
 19  <param name="ScrollbarsVisible" value="1">
 20  <param name="SizeGripVisible" value="1">
 21  <param name="ToolbarVisible" value="1">
 22  <param name="SRC" value="%(file)s">Your browser cannot display Visio Please use IE instead!
 23  <param name="CurrentPageIndex" value="0">
 24  <param name="Zoom" value="-1">
 25 </OBJECT>''' % {
 26  "width": self.width,
 27  "height": self.height,
 28  "file": file,
 29 }

Also it needs to add string like

 1  url = self.request.getQualifiedURL(url)

After string

 1  url = AttachFile.getAttachUrl(pagename, attname, self.request)

So complete render procedure:

 1  def render(self):
 2  _ = self.request.getText
 3 
 4  pagename, attname = AttachFile.absoluteName(self.target, self.formatter.
 5  attachment_fname = AttachFile.getFilename(self.request, pagename, attnam
 6 
 7  if not os.path.exists(attachment_fname):
 8  linktext = _('Upload new attachment "%(filename)s"')
 9  return wikiutil.link_tag(self.request,
 10  ('%s?action=AttachFile&rename=%s' % (
 11  wikiutil.quoteWikinameURL(pagename),
 12  wikiutil.url_quote_plus(attname))),
 13  linktext % {'filename': attname})
 14 
 15  url = AttachFile.getAttachUrl(pagename, attname, self.request)
 16  url = self.request.getQualifiedURL(url)
 17  mime_type, enc = mimetypes.guess_type(attname)
 18  if mime_type in ["application/x-shockwave-flash",
 19  "application/x-dvi",
 20  "application/postscript",
 21  "application/pdf",
 22  "application/ogg",
 23  "application/vnd.visio",
 24  "application/vnd.ms-visio.viewer",
 25 
 26  "image/x-ms-bmp",
 27  "image/svg+xml",
 28  "image/tiff",
 29  "image/x-photoshop",
 30 
 31  "image/x-ms-bmp",
 32  "image/svg+xml",
 33  "image/tiff",
 34  "image/x-photoshop",
 35 
 36  "audio/mpeg",
 37  "audio/midi",
 38  "audio/x-wav",
 39 
 40  "video/fli",
 41  "video/mpeg",
 42  "video/quicktime",
 43  "video/x-msvideo",
 44 
 45  "chemical/x-pdb",
 46 
 47  "x-world/x-vrml",
 48  ]:
 49 
 50  return self.embed(mime_type, url)
 51 
 52  else:
 53  msg = 'Not supported mimetype %(mimetype)s' % {"mimetype": mime_type}
 54  return "%s%s%s" % (self.macro.formatter.sysmsg(1),
 55  self.macro.formatter.text(msg),
 56  self.macro.formatter.sysmsg(0))


see also ../EmbedObject, ../AltTextForEmbedObjectMacro


CategoryFeatureImplemented

MoinMoin: FeatureRequests/EmbedObjectExtensions (last edited 2007年11月29日 15:40:42 by ArtemRadchuk )

AltStyle によって変換されたページ (->オリジナル) /