function _emvideo_youtube_check_flv_player_setup in Embedded Media Field 6
Ensure we're able to run YouTube videos from the JW FLV Media Player. This requires that we both have the player installed, and the included yt.swf file is located in the same folder.
Return value
boolean Returns TRUE if both checks are TRUE.
2 calls to _emvideo_youtube_check_flv_player_setup()
- emvideo_youtube_settings in contrib/
emvideo/ providers/ youtube.inc - hook emvideo_PROVIDER_settings this should return a subform to be added to the emvideo_settings() admin settings page. note that a form field will already be provided, at $form['PROVIDER'] (such as $form['youtube']) so if you want…
- theme_emvideo_youtube_flash in contrib/
emvideo/ providers/ youtube.inc - The embedded flash displaying the youtube video.
File
- contrib/
emvideo/ providers/ youtube.inc, line 174 - This include processes youtube.com media files for use by emfield.module.
Code
function _emvideo_youtube_check_flv_player_setup() {
static $check;
if (is_null($check)) {
// We set up a static cache.
// First check that the JW FLV Player is installed.
$flv_path = emfield_flvmediaplayer_url();
if (!$flv_path || !file_exists($flv_path)) {
// There's no player installed, so yt.swf is moot.
$check = FALSE;
}
else {
// Now check that the yt.swf file is also present in the same folder.
$path = dirname($flv_path);
$check = file_exists($path . '/yt.swf');
}
}
return $check;
}