Welcome to the YouTube Video Applet

(c) 2007 TUFaT.com, All Rights Reserved

With this applet, you will be able to play Flash .FLV video content, rate videos, and share your videos via email. Ratings are stored in an XML text file on your server.

This is not a clone of the whole YouTube.com system, although something like that is being planned for TUFaT.com. It is only a clone of the video player itself, using a primitive file-based method of sharing and rating videos, thus creating a YouTube-like effect.

REQUIREMENTS

You need to have a web server running PHP, with the ability to write files using fopen/fwrite, and the ability to CHMOD (set permission of) files on your server.

You do NOT need a database to use this applet. You do NOT need the Flash development environment to use the applet, although the Flash source code is available in the purchase version, if you wish to modify the applet.

INSTALL

Installation proceeds in just two simple steps:

1) Upload all files from the "public_html" folder that you unzipped, to the location of your choice on a web server.

2) CHMOD (make writable by PHP) these two files:

videos.xml
rated_videos.xml

These must be writable so that the applet can keep track of who rated each video (by IP address), to prevent duplicate ratings, and so that the ratings can be stored alongside the video information.

Please note that "rated_videos.xml" could become quite large if you have a popular website with many users rating videos. In such cases, you should probably use a database instead to store user rating data. This applet does not currently support database content, however. A database-driven version of this applet is in development.

If you do not know how to chmod your files, check your FTP documentation. Most good FTP clients, like CuteFTP and WS_FTP Pro, offer the ability to change the permissions of files and folders.

CONFIGURE

At this point, you should have the basic applet working, as it's provided by TUFaT.com. Of course, you will probably wish to add your own video content, and configure the applet to your liking. Fortunately, at TUFaT.com we try to make things easy to use and configure, and this applet is no exception!

Your videos must be encoded in Flash Video format (FLV) format. You can read more about this here:

http://en.wikipedia.org/wiki/FLV

There are a lot of tools for converting your video to FLV format, which I won't get into here. Do a Google search on "FLV Converter Tool" or something similar to find a product that will help you with that. Assuming that your video is already in .flv format, here's what you have to do to get it to play in your applet:

1) Copy your videos to the /video/ folder of the applet. I recommend that you do not use spaces in the files names, and that you use all lower-case letters.

2) Open the "videos.xml" file with a good text editor (NOT any text editor or word processor made by Microsoft Corporation!). I recommend TextPad if you are using Windows, and change the "file" reference to the .flv file name. The applet will assume that the file can be found in the "videos" folder, unless otherwise noted in config.xml.

Also set the title of the video, and the author. You can leave the runtime to "auto" if you would like the applet to attempt to auto-detect to runtime. Or, you can set this value in seconds to manually specify a runtime, in case the auto-detection fails.

The <rating> and <views> parameters should not be set manually, since the rate_video.php file sets these counters each time a user views or rates a video.

Open the "config.xml" file with a good text editor. The XML configuration options are fairly self-explanatory, as you can see below.

For example, "videoBrightness" controls the brightness of the video from 0 to 100, and "panel_back_alpha" controls the degree of alpha-transparency of the back panel. And so on... So, I won't detail every XML option. If you don't understand what it does by just looking at the name, try changing the value to see how it influences the applet behavior. Or, just leave the option alone. :)

There is one item that you should change, however. In the "share_text" option, you should set the video link html text to properly show your video:

http://www.yourdomain.com/path/to/applet/index.php?video=##VIDEO_NAME##

You should change "yourdomain.com" to your hosting domain, and "/path/to/applet/" to the name of the folder or folder path where the applet's "index.php" file is located.

You may change the name of "config.xml" to any XML file name of your choice, but if you do that you should also do the following:

1) In "index.php" locate the following:

<param name="movie" value="youtube.swf?xml=config.xml"

and...

<embed src="youtube.swf?xml=config.xml"

Change both "config.xml" references to the XML file name that you are using for the configuration file.

2) Open "fullscreen.php", and locate this line:

$swfPath = "youtube.swf?xml=config.xml&movie_url=$url&runtime=$runtime&title=$title";

Change the "config.xml" reference to the XML file name that you are using.

Please check back with TUFaT.com frequently for updates to this component, and for other products based on this applet. There will be a full-fledged clone of the YouTube.com system available in 2007. Also be sure to add yourself to the mailing list to be notified of product announcements and updates.

Thanks for your support!
Darren

(c) 2007 TUFaT.com, All Rights Reserved