Index: asset_bonus.module
===================================================================
--- asset_bonus.module	(revision 231)
+++ asset_bonus.module	(working copy)
@@ -171,6 +171,11 @@
         'types' => array('local' => array('swf', 'flv')),
         'description' => t('Embed the flash movie using the !swfobject javascript library', array('!swfobject' => l('swfobject', 'http://blog.deconcept.com/swfobject/'))),
       );
+      $formats['quicktimeplayer'] = array(
+        'name' => 'Quicktime Player',
+        'types' => array('local' => array('mp4', 'mov')),
+        'description' => t('Embed the Quicktime movie.')
+      );
       return $formats;
     case 'init':
       //Moved init stuff to renderers to avoid unneeded loading
@@ -228,6 +233,26 @@
   return $form;
 }
 
+function asset_bonus_quicktimeplayer_options($asset) {
+  $form['width'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Width'),
+    '#description' => t('Width in pixels'),
+    '#default_value' => !isset($_GET['width']) ? '320' : filter_xss($_GET['width']),
+    '#size' => 5,
+    '#required' => true,
+  );
+  $form['height'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Height'),
+    '#description' => t('Height in pixels'),
+    '#default_value' => !isset($_GET['height']) ? '256' : filter_xss($_GET['height']),
+    '#size' => 5,
+    '#required' => true,
+  );
+  return $form;
+}
+
 function asset_bonus_swfobject_preview($asset) {
   require_once(drupal_get_path('module', 'asset_bonus') .'/swfheader/swfheader.class.php');
   $swf = new swfheader();
@@ -239,6 +264,12 @@
   return $output;
 }
 
+function asset_bonus_quicktimeobject_preview($asset) {  
+  $attr = array('height' => $asset['height'], 'width' => $asset['width']);
+  $output = theme('asset_bonus_quicktimeobject', $asset, $attr);
+  return $output;
+}
+
 function asset_bonus_swfobject_details($asset) {
   require_once(drupal_get_path('module', 'asset_bonus') .'/swfheader/swfheader.class.php');
   $swf = new swfheader();
@@ -254,6 +285,14 @@
   return $details;
 }
 
+function asset_bonus_quicktimeobject_details($asset) {
+  $details = array(
+    t('Width') => $asset['width'] .'px',
+    t('Height') => $asset['height']  .'px',
+  );
+  return $details;
+}
+
 function theme_asset_bonus_swfobject($asset, $options=array()) {
   $embed_id = 'embed-'. preg_replace('/[^A-Za-z_-]/', '-', substr($asset->filename, 0, strlen($asset->filename)-4));
   $div_id = 'swfobject-'. preg_replace('/[^A-Za-z_-]/', '-', substr($asset->filename, 0, strlen($asset->filename)-4));
@@ -308,6 +347,32 @@
   return $output;
 }
 
+function theme_asset_bonus_quicktimeplayer($asset, $options=array()) {
+  $div_id = 'quicktimeobject-'. $asset->aid;
+  if (substr($asset->url, 0, 4) !="http") {
+    $asset->url = '/'. $asset->url;
+  }
+  
+  $output = <<<OUT
+<div id="$div_id" width="100%">
+<!--[if !IE]> <-->
+<object type="video/quicktime" width="{$options['width']}" height="{$options['height']}"
+data="{$asset->url}">
+<!--> <![endif]-->
+<!--[if IE]>
+<object classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="{$options['width']}" height="{$options['height']}" scale="tofit" >
+<![endif]-->
+
+<param name="src" value="{$asset->url}" />
+<param name="AUTOPLAY" value="false" />
+<param name="KIOSKMODE" value="false" />
+<p>Your browser is not able to display this multimedia content.</p>
+</object>
+ </div>
+OUT;
+  return $output;
+}
+
 function asset_bonus_mp3player_options($asset) {
   $form['width'] = array('#type' => 'hidden', '#value' => '290');
   $form['height'] = array('#type' => 'hidden', '#value' => '24');
