
The JW FLV Media Player, created by Jeroen Wijering (http://www.jeroenwijering.com) is a powerful tool that can be used not only to play back videos, but to create a rich user experience, add advertisements to content, monetize videos, and give a creative webmaster total control over the video interface. The player is fully compatible with Influxis, so you can use it with your existing account, with no changes needed.
In this article, I will explore some of the various things that can be done with the JW Player, including some cool things that have been requested by our customers.
First we’ll start out with the main Wizard page, which is the easiest place for anyone new to the JW Player to get started.
![]()
You will want to switch your Example Setup to “Mediaplayer with an RTMP Stream” first and foremost.
The key parts here are the “file” and “id” fields. In the “file” field place your RTMP path where your videos are located. You can find your RTMP path on the top of your Influxis Wizard. Using “tezpua38ghnm.rtmphost.com” as an example, and “VideoTutorials” as the directory name, I have pointed the “file” field to my test account.
This looks like:
“rtmp://tezpua38ghnm.rtmphost.com/VideoTutorials”.
Next, fill out the “id” field with your video name. I’ve chosen “spiderman” which is a trailer for the movie Spiderman 3. Note that the actual video name is “spiderman.flv,” but if you are playing an flv file, you do not need to include the file extension. I also changed the width and height of the player to 640×480, so the video would be bigger.
The remaining Flashvars in the Wizard are mostly just details, and are out of the scope of this article. If you wish to learn more about them, please refer to: Supported Flashvars
And here’s what your final player should look like in the Wizard:
![]()
Let’s get started on some really cool stuff. First, we will make a player that allows for certain items to be defined as “commercials,” which cannot be skipped or fast-forwarded. For this part of the tutorial, we will not be using something generated by the Wizard. Please download the files at this link in order to follow this tutorial:
Note that this example WILL need to be modified to fit into your own webpage, it’s designed with only a blank white page in mind, so you’ll need to play with it to get it to fit wherever you will be putting it. Sounds like a job for the guy over there in the really dark corner hunched over a Mac, I mean the web designer!
The first thing I would do is modify how you want the playlist to show up in relation to the video. Open up mediaplayer.html. You will notice at the very beginning of the mediaplayer.html file, we have some CSS code. Here’s the important part:
div.playercontainer
{
position: absolute;
top: 200px;
left: 200px;
width: 700px;
height: 320px;
border: 2px;
padding: 2px;
border-style: solid;
border-color: #223344;
z-index: 100;
}
div.player
{
position: absolute;
top: 200px;
left: 200px;
width: 700px;
height: 320px;
}
The “width” and “height” fields can be changed to whatever size you want the overall container to be in your website. If you’re going to use this CSS, I might also recommend changing the positions to relative, or adjusting them to fit your website.
In order to change the required flashvars (player settings), find the section that starts with “var flashvars =”, it will be enclosed between { and }. Here you can modify the size of the player, the colors, etc. You’re going to want to edit these flashvars:
width: ‘700′,
height: ‘320′,
displaywidth: ‘550′,
displayheight: ‘300′,
You want “width” and “height” to match the width and height of the CSS tags we explored above. If you don’t do this, you’ll see some funky looking white space. To change the size of the playlist, change “displaywidth.” Make the value higher to make the video take up more of the room (remember, we have allowed 700 pixels of width in the CSS tags). This will make the playlist narrower. I would leave “displayheight” alone, unless you want to increase it and make your control bar hover over the video, or decrease it to add whitespace on the bottom of the player window.
Next, let’s look at a couple more Flashvars. You’ll notice that the “file” field is changed to playlist.xml. This is because we’re going to use an XML playlist to define the videos that we want to play, further along in this article.
If you want to place a logo over your video, you can easily link to an image file. The example mediaplayer.html file already includes a place to set up your logo. To add a logo, go to the Flashvars section of the mediaplayer.html page and find
logo: ‘ ‘,
In between the ‘ ‘, add the link to whatever logo you’ll be using, such as ‘http://www.yoursite.com/logo.jpg”. That’s all! Now you will have a logo over the player.
You can refer back to the Flashvar reference I linked earlier to find out more about what these variables can do for you. Other than these Flashvars, I wouldn’t touch anything inside the file unless you know what you’re doing.
Next, let’s open up the playlist.xml file to start editing our playlist (I know, finally!). This is where we will define where the videos come from, and what videos to play.
In the example, our playlist.xml file looks like this:
<?xml version=’1.0′ encoding=’UTF-8′?>
<playlist version=’1′ xmlns=’http://xspf.org/ns/0/’>
<trackList>
<track>
<title>Test 1</title>
<location>rtmp://tezpua38ghnm.rtmphost.com/VideoTutorials</location>
<identifier>spiderman</identifier>
</track>
<track>
<title>Instances</title>
<location>rtmp://tezpua38ghnm.rtmphost.com/VideoTutorials</location>
<identifier>instances</identifier>
<album>commercial</album>
</track>
<track>
<title>LivePresenter</title>
<location>rtmp://tezpua38ghnm.rtmphost.com/VideoTutorials</location>
<identifier>livepresenter</identifier>
</track>
</trackList>
</playlist>
Let’s pull it apart. First, we have the basic XML headers:
<?xml version=’1.0′ encoding=’UTF-8′?>
<playlist version=’1′ xmlns=’http://xspf.org/ns/0/’>
Next, the beginning of the tracklist, and the opening tag for the first track:
<trackList>
<track>
Inside the first track, we have the title of the video as you want it to show up in the playlist inside the <title> tags. After that we have the <location> tags, which define the RTMP path to your videos, but NOT the video name. The <identifier> tag takes care of the video name. Again, you don’t have to add the file extension if you’re playing FLV files.
VERY IMPORTANT NOTE: If you’re playing back h.264 files, such as MP4, or MOV, you need to format your <identifier> as such: “mp4:filename.extension”, so if you have an h.264 file called “spiderman.mov”, you need to put “mp4:spiderman.mov”. If you don’t, the video won’t play.
Next, we get to the <album> tag, which you will notice is not on all of the tracks. The <album> tag can be filled in with “commercial” to make the video file one of those really annoying unskippable files that you can’t fast forward through, and you can’t change videos until it’s over.
After filling in all the tracks we want, we make sure all the tags are closed, and we’re done. You should be able to open up the mediaplayer.html file and see something like this:
![]()
Note that the commercial does not show up on the playlist, but if you reach the end of video 1, the commercial (video 2) will play.
In my next installment of this article, coming soon, I will show you how to implement multiple, switchable playlists, and even more fun features, like mid-roll overlay advertisements, dynamically creating a playlist using PHP and MySQL, and much more.
Note: JW FLV Player is free for personal use, but Jeroen offers licenses for commercial use for 20 Euros. Please go to his order form to purchase a license.

It,s very nice.
JW FLV Media Player is exactly what i’m Looking for, thanks Jeroen.
Nice tutorial and i got it working in no time.
The problem is i spent over an hour trying to make it work with the latest player and i failed so i’d like to ask if you can/want/have time to update it?
Thanks.
I have been trying to turn a video I recieved from my client into an .flv file using Flash 8. But as I have found there is no publishing option to turn the film into one. I have tried using the code yu supplied for the main player and introduced the .mov and .mp4 exstentions, which work, well, enouhgh, but with a slight problem, the .mov plays only the movie and the .mp4 version of the same film only plays the sound. having download your exmple .flv, I found it worked perfectly, so please could you help figure out how to publish a .flv with flash 8? Many thanks Paul Headon
I have used the setup wizard at the official page and selected ‘play a playlist from youtube’ then disabled the playlist and put my xml file, how can I display above the player a title and an image associated with the track currently playing?
Hey All,
Just saw your comments, glad you liked the tutorial. Give me a few days and I’ll work on a new tutorial with Version 4+ of JWPlayer, since this tutorial is now outdated with version 3. I will also get answers to your questions.
-Robert
I have inserted the player as indicated and all works fine. My problem is, I would like to programatically control the player. I would like to have one player on a page, and on the same page have several links to different mp3 files. When a user clicks a link, it would start the player with that mp3 file as a parameter passed in. This is probably possible, but I’m not sure how to do it. THanks in advance for any help on this.
Thank you for the first clas informative article. This makes me wqant to continue exploring this site!
“I would like to programatically control the player. I…”
A site that has every control imaginable and demos of them all using ver4 can be found:
http://home5.inet.tele.dk/nyboe/flash/mediaplayer4/
I found it saved me a million hours as the player breaks my code with each version, yet it’s worth upgrading for all the new features. I just got it working with rtmp this morning (at 4am lol)
Thanks again for the first class article and making it easier with a download — commendable!
Thnx for create playlist with jw player tutorial
regards
My playlist stops after the first song. Why? I want it all.
please write me : gperez#agendajoven.org.ar
Thx for the tutorial. I’m really interested in the part 2 that you mentioned. Coming out anytime soon?
In my next installment of this article, coming soon, I will show you how to implement multiple, switchable playlists, and even more fun features, like mid-roll overlay advertisements, dynamically creating a playlist using PHP and MySQL, and much more.
I can’t find this article.
I’m so trying to figure out how to do that.
Can you point me to the link for part 2?
thank you
Hi All,
Sorry for the lack of updates on this, it fell by the wayside unfortunately. However, I am now planning a new/updated version of this tutorial with the features previously promised, based on the latest version of JW Player and all the cool add-ons he’s released in the last year or so since I wrote this article.
Thanks for your patience.
just a quick question, there was a brief part in this tutorial where you mentioned something about making the video impossible to fast foward through, well on the other side of the wall… what if you wanted to be able to fast foward through it, how can it be done? i mean ive just had some anoyying videos where i just want to fast foward a little but i cant and it resets the whole thing which is annoying as hell.
How to stream a live videochat with this player ?
My playlist stops after the first song. Why? I want it all.
I’ve got the same thing. How can I play whole playlist at once?
nice player!
when i try it on local it works but when upload on server to occur an error:
“video not found or access denied:filename.flv”
I have the skin modeius, it is a nice video player but it doesn’t work the volume and I don’t know how to do.
Hi there,
I can’t get this to work!
I changed all the links to mine (the player, the XML page, the JS files. But even then, when I load the page, I only get the text, saying that I don’t have the latest version of FLASH …
nice page! why isnt there a bit more such great content online?
I want to put the description of the movie on ads, like here on http://www.antena1.ro. My Website is http://www.MoviesOnline.ro. How can i make that possible ?
thank you. where is next part of seri?
Update in 2010, March, suddenly playlist to youtube don’t work anymore, same code, must otherside did some block
I have the same problem as have a problem above.
Get the player to work local but on the up load I must be breaking the links somewhere???
I do not go image tumb in playlist
Test 1
video1.flv
preview.jpg
spiderman
este arquivo que baixa esta configurado para usar em RTMP eu gostaria usar fazendo o donwloads do meu proprio servider , fazendo downloads do meus videos da pasta do meu site, como faço isto usando este mesmo arquivo, usando play lista de anuncios, me ajuda estou aprendendo,
desde já agradeço!
dear sir..
how to disable download my videos.. they can only watch my videos, not downloading.. thanks..