When your browser does not support the video file format being displayed, all you see is a text string: "Your browser is not able to display this multimedia content." I wanted to display something more helpful, such as a link to the plugin required. I examined the VideoField code, and realized that the developers had intended the same. In videofield/common.inc, there were six function calls similar to the below:
$output = theme('video_format_play', $output, t('http://www.apple.com/quicktime/download'),
t('Link to QuickTime Download Page'),
t('Download latest Quicktime Player'));
But they were all commented out, as a fix for bug http://drupal.org/node/630606
The bug was that the theming function did not exist, so somebody decided to just comment out any call like theme('video_format_play' ... A better solution would have been to find or add the relevant theming function.
I tracked down that theming function in a Drupal 5 version of the Video Module.
/**
* Cut down on redundant link text
*
* @param $url
* string URL to link to
*
* @param $title
* string title of link to show on mouseover
*
* @param $link_text
* string text of the link
*
* @return
* string HTML link
*/
function theme_video_format_play($output, $url, $title, $link_text) {
$output = "\n<div id=\"video-player\">\n" . $output;
$output .= "<p>\n". t('Problems viewing videos?');
$output .= "<br />\n";
$output .= l($link_text, $url, array('title' => $title), NULL, NULL, TRUE);
return $output ."\n</p> \n </div>\n";
}
So, I guess VideoField Module was accessing Video Module's underwear. Then Video module changed his underwear without telling VideoField. (Why would he?) Then when Videofield asked Drupal for Video's old underwear, Drupal replied "that garment does not exist". The solution is for VideoField to find that used underwear at the salvation army, and start wearing it himself.
Solution:
- copy the above function into VideoField/common.inc
- uncomment the 6 calls to theme('video_format_play', ...
The result is that you'll now see a nice hyperlink below every video. The module developer may prefer that the hyperlink should only be displayed when the video cannot be played. In this case, the text and hyperlink could be put inside the object, where the current
<p>Your browser is not able to display this multimedia content.</p>
is sitting. But I prefer that the hyperlink always be displayed; even if someone can view the video, they might want to upgrade their current player.