diff options
author | Robin Millette <millette@controlyourself.ca> | 2009-06-01 14:02:59 -0400 |
---|---|---|
committer | Robin Millette <millette@controlyourself.ca> | 2009-06-01 14:02:59 -0400 |
commit | 683b835c3ed0be5f691795c64b1217896e1dad95 (patch) | |
tree | c8608b58952db1844e80751b657ab85801b922af /lib | |
parent | f8dae2bbc9600a4ad474e924dc540491e29e2767 (diff) |
Attachments popups for supported files are now embedded with the object xhtml tag.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/attachmentlist.php | 17 | ||||
-rw-r--r-- | lib/common.php | 1 |
2 files changed, 18 insertions, 0 deletions
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', |