mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-14 05:31:42 +00:00
add preview function for audio files (not activated)
This commit is contained in:
parent
b9faf8e5eb
commit
1c09327bc0
|
@ -127,6 +127,23 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
$this->printDocumentChooserJs("form1");
|
$this->printDocumentChooserJs("form1");
|
||||||
} /* }}} */
|
} /* }}} */
|
||||||
|
|
||||||
|
function preview() { /* {{{ */
|
||||||
|
$document = $this->params['document'];
|
||||||
|
$latestContent = $document->getLatestContent();
|
||||||
|
switch($latestContent->getMimeType()) {
|
||||||
|
case 'audio/mpeg':
|
||||||
|
case 'audio/ogg':
|
||||||
|
case 'audio/wav':
|
||||||
|
$this->contentHeading(getMLText("preview"));
|
||||||
|
?>
|
||||||
|
<audio controls style="width: 100%;">
|
||||||
|
<source src="../op/op.Download.php?documentid=<?php echo $document->getID(); ?>&version=<?php echo $latestContent->getVersion(); ?>" type="audio/mpeg">
|
||||||
|
</audio>
|
||||||
|
<?php
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
} /* }}} */
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
@ -313,6 +330,7 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
</table>
|
</table>
|
||||||
<?php
|
<?php
|
||||||
$this->contentContainerEnd();
|
$this->contentContainerEnd();
|
||||||
|
// $this->preview();
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
<div class="span9">
|
<div class="span9">
|
||||||
|
|
Loading…
Reference in New Issue
Block a user