--- youtube.inc	2008-08-07 15:00:02.000000000 -0400
+++ youtube.new.inc	2009-01-11 18:11:35.984375000 -0500
@@ -78,6 +78,15 @@ function video_cck_youtube_settings() {
 //     '#default_value' => variable_get('video_cck_youtube_api_secret', ''),
 //     '#description' => t('If you have a secret for the YouTube API, enter it here.'),
 //   );
+  
+  $form['youtube']['video_cck_youtube_use_high_quality'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Use YouTube high quality'),
+    '#default_value' => variable_get('video_cck_youtube_use_high_quality', 0),
+    '#description' => t('If checked, then a parameter will be set to request high quality videos.  Note that not all videos all available in high quality so they will play in normal quality.'),
+  );
+
+
   $form['youtube']['colors'] = array(
     '#type' => 'fieldset',
     '#title' => t('Embedded Video Player Colors'),
@@ -260,7 +269,8 @@ function theme_video_cck_youtube_flash($
     $allowScriptAcess = $enablejsapi ? 'always' : 'sameDomain';
     $id = isset($options['id']) ? $options['id'] : 'video-cck-youtube-flash-'. (++$count);
     $div_id = isset($options['div_id']) ? $options['div_id'] : 'video-cck-youtube-flash-wrapper-'. $count;
-    $url = "http://www.youtube.com/v/$embed&amp;$related$autoplay_value$colors$border$enablejsap";
+	$high_quality = (variable_get('video_cck_youtube_use_high_quality', 0)) ? '&amp;ap=%2526fmt%3D18' : '';
+    $url = "http://www.youtube.com/v/$embed&amp;$related$autoplay_value$colors$border$high_quality$enablejsap";
     if (variable_get('emfield_swfobject', FALSE) && (module_exists('swfobject_api') || variable_get('emfield_swfobject_location', ''))) {
       if (module_exists('swfobject_api')) {
         $params['width'] = $width;
