QTVR Object VRs are squashed

I'm experimenting with displaying some QTVR images - object VRs of historic costume which show a full rotation of the costume on a mannequin, and can be zoomed in upon for more detail.

I'm pleased with the viewer that automatically pops up in Omeka - it does support the drag/drop/zoom capabilities.

However, the aspect ratio is off - since they're not typical movies, they're taller and skinnier than usual, but seem to be getting squashed into a typical wider/shorter movie viewer.

Is there a way that I can change the aspect ratio to solve this, or to help it detect the file's own properties?

Also, the viewer is pretty tiny - is there a way to enlarge it?

You should be able to see my first test here:
http://ardenkirkland.com/vcccomeka/items/show/11

Arden, the media.php file in your helpers folder can be edited and you can determine the size of the QT player. We're actually looking into another way, but you can try this for now.

Sheila

Hi Arden,

We had a similar problem with the Martha Washington site. In a future version of Omeka we're going to make it so the player uses the file's predefined width/height if those values are available. But for now, you can use something like this code to get those values yourself and pass them to the display_file helper:

<?php
while(loop_files_for_item()):
    $file = get_current_file();
    // Only do this if the file doesn't have a thumbnail.
    if (!$file->hasThumbnail()):
        $width = item_file('Omeka Video File','Width');
        $height = item_file('Omeka Video File','Height');
        echo display_file($file, array('width' => $width, 'height' => $height));
    endif;
endwhile;
?>

Here we're just looping through the files, and then getting the Width and Height metadata from the File record itself. Then, we pass those width and height values as parameters to the display_file function. Its a bit complicated, but we're hoping to make this work automatically in a future version of Omeka.

Hope this helps!
Jeremy

You should add that code I just provided to your items/show.php file.

I would recommend, by the way, editing the theme, instead of directly editing the Media.php file in the Omeka application core, since you would lose those changes whenever you did an upgrade.

Hello!

Well, our objectVR's are looking great on our main item pages, and we're getting ready to upload a whole new batch of them.
You can take a look at this one, and rotate and zoom at will:
http://vcomeka.com/vccc/items/show/615

However, I'm not sure where I need to change the code to fix the display for our exhibit pages. Here's a sample exhibit page showing what I need to fix:
http://vcomeka.com/vccc/exhibits/show/test/test1

I should be able to change the code as I have for the items/show pages, but exactly which file do I need to insert the code into for exhibits?

Gratefully,
Arden

This can actually get tricky, depending on how many different layouts your exhibit uses.

One attack would be to go into the views/shared/exhibit_layouts folder, and for each layout that you are using, modify the code in the layout.php file.

Another attack would be to make a plugin that makes use of the filters for exhibits. So, for example, in a plugin.php file you could have:

add_filter('exhibit_builder_exhibit_display_item', 'qtvr_exhibit_builder_exhibit_display_item');

function qtvr_exhibit_builder_exhibit_display_item($html)
{
    //append qtvr html to the html for the item
    $qtvrHtml = "(whatever your html does)";
    $html .= $qtvrHtml;
    return $html;
}

The trick there is that different layouts might have different filters, and so there would be some digging to make sure you have the right ones in place. It does have the virtue of making the least changes directly to the ExhibitBuilder code.

Others who have spent more time with EB might have better options, though.

Thanks, Patrick!

I didn't have a chance to try this out until today. I may try the plugin approach later on, but for now, I only need a layout with a single objectVR and text - so, I copied the "text-image-left" layout into a new layout called "text-VR-left." I only had to change one line of code in the layout.php file in that layout folder:

<?php echo exhibit_builder_exhibit_display_item(array('scale' => 'tofit', 'width' => 350, 'height' => 525), array('class'=>'permalink')); ?>

All my objectVRs so far are a standard size, which that reflects.

Then, I changed the layout.ini file to reflect the new title,etc.

All in all, this was a quick fix and my page looks just the way I wanted it to:

http://vcomeka.com/vccc/exhibits/show/glimpse/info/digitalcostumes

Now I have this layout ready to go whenever I'm displaying one of my objectVRs in an exhibit. If I do need something more fancy and I try the plugin route, I'll report back how it turns out.

Gratefully,
Arden