Flowplayer Installation A step-by-step guide to showing videos in your web pages
Installation
This document is for people who want the dirty details. If you want to configure and install your player without reading too much docs please enter Flowplayer Setup.
With Flowplayer anyone can play videos no matter what their background is. We assume you want to play videos to users or visitors of your web site. If you only want to play videos locally, see the end of this document where local installation is discussed.
Basically there are the following steps to take to have video on your web site:
-
Have a web server, or have your web site hosted
-
Place the Flowplayer distribution files on the server
-
Place your video files on the server
-
Include Flowplayer in your web pages
The web server
The web server is a computer connected to the internet that handles requests for pages from the internet. In its simplest form it only sends pages that are stored as files on the hard disk of the web server. More complex web servers also run programs, such as a user registration application, that interacts with the web site's users.
For Flowplayer you only need the simple form. If you have your web site hosted then this is important to know because there will be no extra costs for installing and running programs on the web server. Most people and many smaller companies have their website hosted so it is always available and they don't need to bother with system administration and operations.
Video is a serious bandwidth hugger. Bandwidth is the number of bits per second you send. High quality videos require many bits per second to be sent (full HD quality is 8 mega-bit per second) and many videos sent simultaneously also means high bandwidth is required. Not all hosting providers can guarantee they can always send enough bits. Together with delays elsewhere on the internet, your users might sometimes receive chunky video. If you have only occasional video in your web pages, then you will be fine with a simple (hosted) server and you can go to next step. But if you want to get serious about serving videos then here are some interesting possibilities, which Flowplayer fully supports.
Flowplayer distribution
You need to download the Flowplayer distribution and place the following files in the zip file on you web server (so not the zip file itself). Choose an easily remembered place as you will place a path to these files later in your web pages:
-
flowplayer-3.2.7.swf, the player;
-
flowplayer.controls-3.2.5.swf, the optional control bar;
-
flowplayer-3.2.6.min.js, the api.
That is all. Flowplayer is now installed on your web server.
When you download Flowplayer, you must choose between the free and commercial versions. The free version always displays the Flowplayer logo; with the commercial version you can display your own logo and further brand the player. We suggest that you start with the free version because it contains all of the same features as the commercial one does.
After you have downloaded the package, you need to decompress it with any of several programs available, for example, 7-Zip, WinRAR, or WinZip. Decompressing the file should result in a single folder called "flowplayer". The quickest way to test your installation is to copy this folder to your web server root and point your browser to the following location:
http://your.server.com/flowplayer/example/index.html
If everything is working properly, a video playback should start.
Place video files on your web server
We assume you have video files available already and you want to play them. To make them available, you must place them on your web site so your web pages can refer to them. How exactly to upload files to your web server depends on the server and the hosting company, but a common way is to use FTP (File Transfer Protocol) to transfer the video files from your home or office computer to the web server. There are many good and free FTP clients available. A nice one is WinSCP that lets you drag and drop files from your computer to the server.
Note that Flowplayer does not support all video formats. Flowplayer essentially supports all formats supported by Adobe Flash, as Flowplayer is a manager for a basic Adobe Flash player. See here for a discussion of video formats and conversion.
Include Flowplayer in your web pages
To have your web pages play videos with Flowplayer, you must embed Flowplayer in those pages. For each page there are the following steps:
-
Include file flowplayer-3.2.6.min.js in the web page
-
Load the player with one JavaScript statement
-
Place the link to your video file in a href
Step 1: To include file flowplayer-3.2.6.min.js in the web page you place the following tag in the HEAD section of your web page:
<script src="path/to/the/flowplayer-3.2.6.min.js"></script>
Step 2: To place the link to your video file in the web page, the simplest way is to use the following A tag on your web page. The video will automatically play there:
<a
href="http://www.mywebsite.com/myVideo.flv"
style="display:block;width:425px;height:300px;"
id="player">
</a>
Step 3: Finally, to load the player on the A tag just described, you place the following script in your page, following the A tag:
<script language="JavaScript">
flowplayer("player", "path/to/the/flowplayer-3.2.7.swf");
</script>
The result: So a complete functional web page that plays videos with Flowplayer is:
<html>
<head>
<title>Wow! This is video</title>
<script src="path/to/the/flowplayer-3.2.6.min.js"></script>
</head>
<body>
<a
href="http://www.mywebsite.com/myVideo.flv"
style="display:block;width:425px;height:300px;"
id="player">
</a>
<script language="JavaScript">
flowplayer("player", "path/to/the/flowplayer-3.2.7.swf");
</script>
</body>
</html>
This minimal way to show video is discussed in more detail in the minimal installation demo. The demos page has many more examples of installing and customizing Flowplayer.
What is next?
If you have installed Flowplayer and it is working, you may want to do more advanced things. Then there are the following topics for you to study:
-
Configuration: All aspects of Flowplayer can be customized to your liking. The key to that is the configuration. In the examples on this page the configuration is not used; the default behavior is just fine. But you can provide a third argument to the flowplayer() function that can contain a lot of information to tell Flowplayer how to behave. With the configuration you can change the background color, have a different control bar, place a clock on the screen, have a splash image displayed, load playlists, have overlays and many more options. See the section on configuration for that and see the demos.
-
JavaScript API: With the configuration you can customize Flowplayer to your liking, but that is static, that is, you cannot change it after the player has been loaded. If you want to control the behavior of Flowplayer after it has been loaded, you must use the functions of the JavaScript API. For example, in interactive learning you can tell the video to pause at a specific point and launch a question page or information page. The use of the API by end users (you) is simple in nature and you only require a basic JavaScript knowledge. See the API documentation.
Local Installation
A local installation is where you run Flowplayer and your videos from your local hard disk.
The local installation works just as the installation for a web server; you place the distribution files on your hard disk, have your video files and embed the player in a web page from where you show your local videos.
There is just one thing different and that is the security settings of Flash. Normally Flash won't run videos from your hard disk and won't run the Flowplayer player object from your hard disk. So you must tell Flash it can trust your video location and trust the Flowplayer object. You do that by clicking this link which sends you to the Flash web site where your security settings are displayed and where you can change them to allow the locations on your hard disk. (Note: your security settings are stored local by Flash and are not stored at the Adobe or Macromedia website; it is just that the software to manage your settings run there.) In the panel you can select files or directories to trust. It is advised to allow the directory where your video files are stored and where the Flowplayer .swf objects are stored.