From 683b835c3ed0be5f691795c64b1217896e1dad95 Mon Sep 17 00:00:00 2001 From: Robin Millette Date: Mon, 1 Jun 2009 14:02:59 -0400 Subject: Attachments popups for supported files are now embedded with the object xhtml tag. --- lib/attachmentlist.php | 17 +++++++++++++++++ lib/common.php | 1 + 2 files changed, 18 insertions(+) (limited to 'lib') diff --git a/lib/attachmentlist.php b/lib/attachmentlist.php index 61749dca5..45e4fa319 100644 --- a/lib/attachmentlist.php +++ b/lib/attachmentlist.php @@ -268,6 +268,23 @@ class Attachment extends AttachmentListItem case 'image/jpeg': $this->out->element('img', array('src' => $this->attachment->url, 'alt' => 'alt')); break; + + case 'application/ogg': + case 'audio/x-speex': + case 'video/mpeg': + case 'audio/mpeg': + case 'video/mp4': + case 'video/quicktime': + $arr = array('type' => $this->attachment->mimetype, + 'data' => $this->attachment->url, + 'width' => 320, + 'height' => 240 + ); + $this->out->elementStart('object', $arr); + $this->out->element('param', array('name' => 'src', 'value' => $this->attachment->url)); + $this->out->element('param', array('name' => 'autoStart', 'value' => 1)); + $this->out->elementEnd('object'); + break; } } } else { diff --git a/lib/common.php b/lib/common.php index 838f52f9d..ceb50337c 100644 --- a/lib/common.php +++ b/lib/common.php @@ -169,6 +169,7 @@ $config = 'image/gif', 'image/svg+xml', 'audio/mpeg', + 'audio/x-speex', 'application/ogg', 'application/pdf', 'application/vnd.oasis.opendocument.text', -- cgit v1.2.3-54-g00ecf