adds archive.org images

This commit is contained in:
buttle 2021-04-17 19:39:48 +02:00
parent 2cb3287c85
commit ded1d57d16
6 changed files with 19 additions and 30 deletions

View File

@ -12,6 +12,7 @@ class Module extends AbstractModule
const MEDIA_TYPE = [
'video' => 'Video',
'audio' => 'Audio',
'image' => 'Image',
];
const RATIOS = [

View File

@ -1,6 +1,7 @@
# Archive.org media for Omeka S
[Archive.org media] is a module for [Omeka S] that integrates [Archive.org] media.
[Archive.org media] is a module for [Omeka S] that integrates [Archive.org]
video and audio media.
## Install

View File

@ -1,6 +1,6 @@
/* Panaorama viewer custom */
@media screen {
.panorama-viewer {
.archive_org {
/* width: 600px; */
/* height: 400px; */
}

View File

@ -31,7 +31,7 @@ class ArchiveOrgBlockForm extends Form
'name' => 'o:block[__blockIndex__][o:data][width]',
'type' => Element\Number::class,
'options' => [
'label' => 'Video width in pixels',
'label' => 'Width in pixels',
],
'attributes' => [
'min' => '100',
@ -42,7 +42,7 @@ class ArchiveOrgBlockForm extends Form
'name' => 'o:block[__blockIndex__][o:data][ratio]',
'type' => Element\Select::class,
'options' => [
'label' => 'Video ratio',
'label' => 'Ratio',
'value_options' => Module::RATIOS,
],
]);

View File

@ -56,7 +56,8 @@ class ArchiveOrg extends AbstractBlockLayout
$html = '';
$html .= $view->blockAttachmentsForm($block);
$html .= '<a href="#" class="collapse" aria-label="collapse"><h4>' . $view->translate('Options'). '</h4></a>';
$html .= '<a href="#" class="collapse" aria-label="collapse"><h4>';
$html .= $view->translate('Options'). '</h4></a>';
$html .= '<div class="collapsible" style="padding-top:6px;">';
$html .= $view->formCollection($form);
$html .= '</div>';

View File

@ -1,43 +1,29 @@
<div class="pannemmul-wrap" style="position:relative;">
<div class="archive_org-wrap" style="position:relative;">
<?php
if ($title !== false && $title !== "") {
$title = sprintf('<p id="panorama-viewer-title">%s</p>', $title);
$title = sprintf('<p id="achive_org_media-title">%s</p>', $title);
} else {
$title = false;
}
?>
<?php if ($media_type != "audio") { ?>
<style>
#<?= $id ?> {
height: <?= $height ?>px;
width: <?= $width ?>px;
}
</style>
<div class="pannellum-wrap">
<?php if ($media_type == "video") { ?>
<iframe
id="<?= $id ?>"
src="<?= $url ?>"
frameborder="0"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allowfullscreen >;
</iframe>
<?php } ?>
<?php if ($media_type == "audio") { ?>
<iframe
src="<?= $url ?>"
frameborder="0"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allowfullscreen >;
</iframe>
<?php } ?>
<iframe
id="<?= $id ?>"
src="<?= $url ?>"
frameborder="0"
webkitallowfullscreen="true"
mozallowfullscreen="true"
allowfullscreen >
</iframe>
</div>