'spike tv', 'name' => t('Spike TV'), 'url' => EMVIDEO_SPIKE_MAIN_URL, 'settings_description' => t('These settings specifically affect videos displayed from Spike TV.', array('@spike' => EMVIDEO_SPIKE_MAIN_URL)), 'supported_features' => $features, ); } function emvideo_spike_settings() { $form = array(); return $form; } function emvideo_spike_extract($embed) { //
// http://www.spike.com/video/simpsons-movie/2796729 return array( // http://www.spike.com/video/2836119/collection/19459/channel/comedy //What happens when Jesus, Abe Lincoln, Tom Cruise, Dustin Hoffman, Buddha and Einstein play a friendly game of poker?
'@spike\.com/efp"(?:.*)flvbaseclip=([^/&"\?]+)@i', '@spike\.com/video/[^/&"\?]+/([^/&"\?]+)@i', '@spike\.com/video/([^/&"\?]+)@i', ); } function emvideo_spike_request($embed, $cacheable = TRUE) { return NULL; } /** * hook emvideo_PROVIDER_embedded_link($video_code) * returns a link to view the video at the provider's site. * @param $video_code * The string containing the video to watch. * @return * A string containing the URL to view the video at the original provider's site. */ function emvideo_spike_embedded_link($video_code) { return 'http://www.spike.com/video/'. $video_code; } function theme_emvideo_spike_flash($embed, $width, $height, $autoplay) { // TODO: figure out autoplay... // if ($embed) { $autoplay = $autoplay ? ' autoplay="true"' : ''; $output = ''; } return $output; } /** * TODO: Is this correct? Using ifilmpro for thumbnails. */ function emvideo_spike_thumbnail($field, $item, $formatter, $node, $width, $height) { $picturelink = drupal_substr($item['value'], 0, 7); return 'http://img1.ifilmpro.com/resize/image/stills/films/resize/istd/'. $picturelink .'.jpg?width='. $width; } function emvideo_spike_video($embed, $width, $height, $field, $item, $node, $autoplay) { $output = theme('emvideo_spike_flash', $embed, $width, $height, $autoplay); return $output; } function emvideo_spike_preview($embed, $width, $height, $field, $item, $node, $autoplay) { $output = theme('emvideo_spike_flash', $embed, $width, $height, $autoplay); return $output; } /** * Implementation of hook_emfield_subtheme. */ function emvideo_spike_emfield_subtheme() { return array( 'emvideo_spike_flash' => array( 'arguments' => array('embed' => NULL, 'width' => NULL, 'height' => NULL, 'autoplay' => NULL), 'file' => 'providers/spike.inc' ) ); }