Index: providers/soundcloud.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/media_soundcloud/providers/soundcloud.inc,v
retrieving revision 1.2
diff -u -p -r1.2 soundcloud.inc
--- providers/soundcloud.inc	29 Sep 2010 14:08:11 -0000	1.2
+++ providers/soundcloud.inc	12 Jan 2011 17:59:47 -0000
@@ -83,14 +83,7 @@ function theme_emaudio_soundcloud_flash(
     if ($item['data']['emaudio_soundcloud_version'] >= 1) {
       $id = form_clean_id('soundcloud');
       $autoplay = $autoplay ? '&amp;auto_play=true' : '';
-      $output .= <<<SOUNDCLOUDEMBED
-        <object type="application/x-shockwave-flash" data="{$item['data']['swf']}$autoplay" width="$width" height="81" id="$id">
-          <param name="movie" value="{$item['data']['swf']}" />
-          <param name="allowscriptaccess" value="always"></param>
-          <embed allowscriptaccess="always" height="81" src="{$item['data']['swf']}$autoplay" type="application/x-shockwave-flash" width="$width">
-          </embed>
-        </object>
-SOUNDCLOUDEMBED;
+      $output = $item['data']['swf'];
     }
   }
 
@@ -112,7 +105,10 @@ function emaudio_soundcloud_data($field,
     $patterns = array();
     $h1tags = preg_match('/(<link href="(.*)" rel="video_src" \/>)/i', $response->data, $patterns);
     $data['player'] = isset($patterns[2]) ? explode('&', $patterns[2]) : NULL;
-    $data['swf'] = isset($data['player'][0]) ? $data['player'][0] : NULL;
+    $swf = 'http://soundcloud.com/oembed?url=http://soundcloud.com/'.$item['value'];
+    $xml = drupal_http_request($swf);
+    $xml = new SimpleXmlElement($xml->data); 
+  	$data['swf'] = (string)$xml->html;
   }
   return $data;
 }
