'myspace', 'name' => t('MySpace'), 'url' => EMVIDEO_MYSPACE_MAIN_URL, 'settings_description' => t('These settings specifically affect videos displayed from MySpace.', array('@provider' => EMVIDEO_MYSPACE_MAIN_URL)), 'supported_features' => $features, ); } function emvideo_myspace_settings() { $form = array(); return $form; } function emvideo_myspace_request($code, $cacheable = TRUE) { $args = array(); return module_invoke('emfield', 'request_xml', 'myspace', "http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=$code", $args, $cacheable); } /** * Implements emvideo_PROVIDER_extract(). */ function emvideo_myspace_extract($url) { // http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid=43381231 // What's That Floating In The Water Part 1

Add to My Profile | More Videos return array( '@src="myspace\.com/index.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)@i', '@myspace\.com/index\.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)@i', '@myspace\.com/index\.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)@i', '@src="myspacetv\.com/index.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)"@i', '@myspacetv\.com/index\.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)@i', '@myspacetv\.com/index\.cfm\?fuseaction=vids\.individual&videoid=([^&"]+)@i', ); } /** * Implements emvideo_PROVIDER_link(). */ function emvideo_myspace_video_link($video_code) { return 'http://vids.myspace.com/index.cfm?fuseaction=vids.individual&videoid='. $video_code; } function theme_emvideo_myspace_flash($embed, $width, $height) { static $count = 0; if ($embed) { $output .= " \n"; } $count++; return $output; } function emvideo_myspace_thumbnail($field, $item, $formatter, $node, $width, $height) { $xml_data_url = 'http://mediaservices.myspace.com/services/rss.ashx?type=video&videoID=' . $item['value']; $video_data = emfield_request_xml('myspace', $xml_data_url, array(), TRUE, TRUE, FALSE, FALSE, FALSE); $thumbnail = $video_data['ITEM']['MEDIA:THUMBNAIL'][1]['URL']; return $thumbnail; } function emvideo_myspace_video($embed, $width, $height, $field, $item, &$node) { $output = theme('emvideo_myspace_flash', $embed, $width, $height); return $output; } function emvideo_myspace_preview($embed, $width, $height, $field, $item, &$node) { $output = theme('emvideo_myspace_flash', $embed, $width, $height); return $output; } /** * Implementation of hook_emfield_subtheme. */ function emvideo_myspace_emfield_subtheme() { return array( 'emvideo_myspace_flash' => array( 'arguments' => array('embed' => NULL, 'width' => NULL, 'height' => NULL, 'autoplay' => NULL), 'file' => 'providers/myspace.inc' ) ); }