Wimpy AV Single Play
by Mike Gieson, Plaino
Avaialble at www.wimpyplayer.com

Wimpy AV Single Play is designed for people who are comfortable editing JavaScript and HTML. It is NOT "automatic" like the standard Wimpy AV player which automatically lists and plays files. Wimpy AV Single Play was developed to enable webmasters an easier way to present one-off FLV and SWF video's through standard HTML and JavaScript.

The demo version will limit playback of your videos to 10 seconds.

Installation Instructions:

1. Create a new folder on your web site named "av"
    Example:
    http://www.yoursite.com/av/

2. Upload the contents of the Wimpy package to the new wimpy folder.
    Example:
    http://www.yoursite.com/av/example.flv
    http://www.yoursite.com/av/example.jpg
    http://www.yoursite.com/av/examples.html
    http://www.yoursite.com/av/wimpy.swf
    http://www.yoursite.com/av/wimpyav.js
    http://www.yoursite.com/av/wimpyTemplate.html

3. Point your web browser to the examples.html file on your server:
    Example:
    http://www.yoursite.com/av/examples.html

Using / Customizing:

There are two ways to launch a video:

1. Pop up the video into a new window:
WimpyAVpopup('http://www.yoursite.com/av/example.flv', 320, 240)

2. Embed the video into an existing HTML page:
WimpyAVembed('http://www.yoursite.com/av/example.flv', 320, 240)

The first item in the call is the URL to the video.
WimpyAVpopup('http://www.yoursite.com/av/example.flv', 320, 240)
... and the second two items refer to the width and eight of the video.

NOTE: When referencing the height, use the height of your video. Wimpy will automatically increase the height of the display area to accommodate the controls. So for example if your source video is 320x240, then enter 320x240. Wimpy will automatically tack on an extra 20 pixels to the window size... for both the pop up and embedded players.

To use these JavaScript functions in an HTML page, you will need first to add the following code anywhere between the <head> and </head> of your HTML page:

You must target the wimpyav.js file correctly. In the default example above, you may have to replace "/av/wimpyav.js" with the correct information for your site. You may also use a relative, absolute or full URL to the wimpyav.js file.

There are two ways to send in the video's filename.

1. You can send in a relative, absolute or full URL. For best results, use the full URL.

Example:
WimpyAVembed('../../av/example.flv', 320, 240)
WimpyAVembed('/av/example.flv', 320, 240)
WimpyAVembed('http://www.yoursite.com/av/example.flv', 320, 240)

2. You can configure wimpy to tack on paths (URLs) for you so all you have to do is specify the filename.

Under this circumstance, edit the wimpyav.js file and set the wimpyFolder variable to the location of where you are keeping your media.

Example:
In the wimpyav.js file:
wimpyFolder = "http://www.yoursite.com/av/";
Then in your HTML pages you would only have to reference:
WimpyAVembed('example.flv', 320, 240)

Three important considerations:

1. Ensuring that your HTML pages load up the wimpyav.js file in the <head> properly.
2. wimpyav.js, wimpy.swf and wimpyTemplate.html should remain in the same folder as your media files.
3. That wimpyFolder option is set to the proper location of the media files on your site inside the wimpyav.js file. If you are using a full URL to your media files, you don't have to change this, but if you jsut want to use a file name, you will have to edit the variable.

Open the examples.html file in a text editor and take a look at the source HTML code.

??? Confused ??? You may be thinking to yourself that the examples.html file calls the JavaScript function as just the filename, without having any additional http://www/stuff? The reason for this is because all of the example files are located in the same folder... since all of the files are in the same folder, no additional adddressing needs to be added.

 

 

© 2005 plaino