Author: sevein
Date: Mon Sep 21 19:49:03 2009
New Revision: 3464

Log:
Remove unnecessary code and some cosmetic changes.

Modified:
   trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
   trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php

Modified: 
trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php 
Mon Sep 21 15:26:04 2009        (r3463)
+++ trunk/apps/qubit/modules/digitalobject/actions/showAudioComponent.class.php 
Mon Sep 21 19:49:03 2009        (r3464)
@@ -42,34 +42,7 @@
 
     $this->pathToFlowPlayer = public_path('flowplayer/FlowPlayerDark.swf');
 
-    // Get representation by usage type
+    // Get representation by usage type, audio objects haven't derivatives
     $this->representation = 
$this->digitalObject->getRepresentationByUsage(QubitTerm::MASTER_ID);
-
-    // If we can't find a representation for this object, try their parent
-    if (!$this->representation && ($parent = 
$this->digitalObject->getParent()))
-    {
-      $this->representation = 
$parent->getRepresentationByUsage(QubitTerm::MASTER_ID);
-    }
-
-    // Set up display of video in flowplayer
-    if ($this->representation)
-    {
-      // If this is a reference movie, get the thumbnail representation for the
-      // place holder image
-      $this->showFlashPlayer = true;
-
-      if ($this->usageType == QubitTerm::REFERENCE_ID)
-      {
-        $this->thumbnail = 
$this->digitalObject->getRepresentationByUsage(QubitTerm::THUMBNAIL_ID);
-      }
-
-      list($this->width, $this->height) = 
QubitDigitalObject::getImageMaxDimensions($this->usageType);
-    }
-    // If representation is not a valid digital object, return a generic icon
-    else
-    {
-      $this->showFlashPlayer = false;
-      $this->representation = 
QubitDigitalObject::getGenericRepresentation($this->digitalObject->getMimeType(),
 $this->usageType);
-    }
   }
 }
\ No newline at end of file

Modified: trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php
==============================================================================
--- trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php     Mon Sep 
21 15:26:04 2009        (r3463)
+++ trunk/apps/qubit/modules/digitalobject/templates/_showAudio.php     Mon Sep 
21 19:49:03 2009        (r3464)
@@ -1,20 +1,21 @@
 <?php use_helper('Javascript') ?>
 
-<?php if ($showFlashPlayer): ?>
-    <?php echo javascript_tag(<<<EOF
-      // select all link tags with "flowplayer" class and "video-enable" them. 
-      $(function() { 
-          $("a.flowplayer").flowembed("$pathToFlowPlayer", {
-              
-            });
-      });
+<?php echo javascript_tag(<<<EOF
+  // select all link tags with "flowplayer" class and "video-enable" them. 
+  $(function() { 
+      $("a.flowplayer").flowembed("$pathToFlowPlayer", {
+          clip: {
+            autoplay: true,
+            autoBuffering: true
+          }
+        });
+  });
 EOF
-  ) ?>
+) ?>
 
-    <a id="flowplayer" class="flowplayer" href="<?php echo 
public_path($representation->getFullPath()) ?>">
-      <img src="/~jesus/qubit/web/images/generic-icons/blank.png" />
-    </a>
-<?php endif;?>
+<a id="flowplayer" class="flowplayer" href="<?php echo 
public_path($representation->getFullPath()) ?>">
+  <img src="/~jesus/qubit/web/images/generic-icons/blank.png" />
+</a>
 
 <!-- link to download master -->
 <?php if ($link != null): ?>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Qubit Toolkit Commits" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to