Note: This is old post. Drupal SWF tools module is almost dead. To play flv and mp3 files, it is better to use jQuery Media module and cck Embedded Media Field module. See this:
http://thanhsiang.org/faqing/node/98
===================
Youtube uses flash video file format flv. How to turn your drupal site as youtube site? Use swftools module and jw_media_player can accomplish this.
(See here http://drupal.org/node/181998)
1. Download: http://ftp.drupal.org/files/projects/swftools-5.x-1.x-dev.tar.gz
2. Need to change swftools.module (line 656), before you upload to your module directory
http://drupal.org/node/154364
Adding
$encoded = str_replace('%3A/%252F', '://', $encoded);
to
function _swftools_get_flashvars_string(&$flashvars) {
foreach ($flashvars AS $var => $value) {
$flashvars[$var] = str_replace(array('&', '=', '?'), array('%26', '%3D', '%3F'), $value);
}
$encoded = drupal_query_string_encode($flashvars);
// '#' seems to encode as %2523, reverse this, using a more robust hex prefix..
$encoded = str_replace('%2523', '0x', $encoded);
// '://' seems to encode as %3A/%252F, reverse this back to '/'
$encoded = str_replace('%3A/%252F', '://', $encoded);
return $encoded;
3. download flashnode module or use imput filter
4. Install Media Player
Then download Jeroen Wijerings Flash media player here:
http://www.jeroenwijering.com/?item=JW_Media_Player
(You only need one file mediaplayer.swf)
Unzip it and rename the folder from jw_media_player to flash_media_player and place the folder in the following directory
http://youradres/modules/swftools/shared/
Ok the directories should now look like this, just to be sure:
http://youradres/modules/swftools/shared/flash_media_player
5. Important: /admin/media/swf/generic
check "Autostart FLV for Generic Player." Even you use Wijering player, but need to select this otherwise it will not work.
/admin/media/swf/handling
Use Flash Media Player - Jeroen Wijering for all
/admin/media/swf/embed
Under "JavaScript Embedding," make sure these two are checked:
*Embed Flash Directly, don't use JavaScript replacement.
*All pages.
Module changes
I'm not sure why anybody would want to change the code of the module, how come you don't override this function function _swftools_get_flashvars_string(&$flashvars) and add you custom code. This way when the module gets updated your site does not break during the update.
Great. And how to enable
Great. And how to enable video uploading? Did you ever used Youtube? The users upload the videos there.
And what if a lot of users start watching your videos? Then you need Amazon S3. So the title of this article is very misleading.
I already turned my website
I already turned my website for something like this.
But thanks anymore.