Newest Articles

XML Driven Pie Chart
Base Defender
Hangman Game
8 Ball Pool
Photo Reel
Image Color Tinting using Actionscript


Popular Articles

True Fullscreen Flash Mode
Mp3 Player with XML Playlist
Base Defender
FLV Player
Hangman Game
Image Slider


Random Articles

Image Slider
Spark Effect
Growing Tree using Recursion
Falling Snowflakes
12 Hour Clock with Hands
Show the Current Frames Per Second


Links

Foundation-Flash
MickM
TutorialQuest
Tutorialsphere.com - Free Online Tutorials
Newgrounds
TWiT
Link to SwfSpot
Swf Spot



rss feed

FLV Player

FLV Player
AddThis Social Bookmark Button
Description: FLV player allows users to input .flv urls to play
Author: John Bezanis
Added: October 19th 2007
Version: Flash 8
Total Views: 38273
Views in the Past 7 Days: 419


This FLV player allows users to input .flv urls to play. The source fla has line by line commenting explaining what is going on. The xhtml code of the embedded applet can be changed to allow a specified movie to load by default. The xhtml code is shown below with the blue text. If no default video is selected, a box pops up prompting the user to enter a flv to play.
Features of the player:
  • Fullscreen option
  • full volume control
  • ability to open another video
  • timer showing current progress as well as the video's length
  • progress slider that scales on player resize
  • progress slider shows percentage loaded
  • arrow keys allow user to update the volume, as well as the current play position
  • playpause button with alternating graphics
  • videos scale to fit the player at the best dimensions
  • control bar disappears after no mouse movement is detected after a set amount of time
  • customized right click menu
XHTML code with a starting video and autoplay specified:
<object data="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf?video=http://www.helpexamples.com/flash/video/typing_short.flv&startvolume=100&autoplay=true"
type="application/x-shockwave-flash" width="480" height="360" >
<param name="movie" value="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf?video=http://www.helpexamples.com/flash/video/typing_short.flv&startvolume=100&autoplay=true" />
<param name="allowfullscreen" value="true"/>
</object>
The starting video and starting volume are specified with the blue code.

XHTML code with no default video specified:
<object data="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf"
type="application/x-shockwave-flash" width="480" height="360" >
<param name="movie" value="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf" />
<param name="allowfullscreen" value="true"/>
</object>

Download the source file below:

Download Source File
Download The Built .swf
Comments
Your player solve one flv file only but I want to play from a play list. Can you give me an example about using xml files to interactive with movie database. Thanks.
October 30th 2007 01:10AM   -   Mr.Duong
Is the mouse meant to dissapear when the the tools on the video player fade out? or is it just me... Btw, nice script guys!
November 4th 2007 00:11AM   -   Aaron
Yes the mouse is supposed to disappear. It reappears when the user moves the mouse.
November 4th 2007 09:11AM   -   John
How do I set the starting volume level in the HTML code: <object data="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf?video=http://www.drreichner.com/flash/discovery.flv" type="application/x-shockwave-flash" VOLUME="50" width="480" height="360" > <param name="movie" value="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf?video=http://www.drreichner.com/flash/discovery.flv" /> <param name="allowfullscreen" value="true"/> </object> Dan Reichner
November 4th 2007 22:11PM   -   Dan
Works great! I reccommend it. I do wish the mouse did not stay invisable after the video finished though.
November 11th 2007 13:11PM   -   Mike
After the VIDEO is done, can the player container refresh to an static IMAGE as oppose to stay BLACK, I know that you can EDIT the video and let it end on a JPEG; would that be the only way that this can be achieved? Thank you!
November 23rd 2007 02:11AM   -   FxMaster
I tried to download source file but there is a problem! Could somebody achive to download?
November 28th 2007 18:11PM   -   Ben
Recently, Adobe has announced Flash Lite 3 with flv support. But there is not flv player at this time. I think, this great player could be THE MOBILE FLV PLAYER but needs some file select option... I'm just thinking...
December 10th 2007 11:12AM   -   pakito2
Great stuff! Thanks! But, any easy way to get rtmp streams to play using this?
December 14th 2007 20:12PM   -   rtideas
I want to play give the name of the selected flv files then how can i do this??
December 24th 2007 08:12AM   -   Virendra Chouhan
Some flv files will not play but will in other players, any idea why? Great player
January 6th 2008 19:01PM   -   Steve
Can you post the url of one that doesn't work? I'll look into it.
January 6th 2008 22:01PM   -   John
Hi John, Sorry my problem, it was odd characters in the links that caused the problem nothing to do with the player, works perfectly Many Thanks Steve
January 10th 2008 01:01AM   -   Steve
Hi guys, I have an issue, would this player play files from a streaming server? I have a code which is in an IFrame, But I was wondering is this could play thought the site and through the above player so I could have full screen functionality. The could is like this <iframe width='320' height='240' frameborder='0' marginheight='0' marginwidth='0' noresize scrolling=no src='http://ravenas.razorstream.com:80/eve-service/player.jspx?enc=iJ0GvegjTojzMRjckT4SA%3D%3D&h=240&w=320'></iframe> I am looking into if this bit would work, I can not break it down 'http://ravenas.razorstream.com:80/eve-service/player.jspx?enc=iJ0GvegjTojzMRjckT4SA%3D%3D&h=240&w=320' Could You Help Please
February 10th 2008 06:02AM   -   Ben
I downloaded the source file, but my flash software says its an unrecognised file format. May I ask, what version of flash are you using?
February 18th 2008 10:02AM   -   Paul
how to do creat playlist flv file with xmal
February 20th 2008 05:02AM   -   dom
How do I get the .flv to rewind to the start? I have tried inserting into the object &autoPlay=false&autoRewind=true But this does not seem to work. Graet player though
February 22nd 2008 01:02AM   -   beginner
@beginner Yeah for some reason auto rewind won't work with this FLV player so you'll have to do it yourself. :p
February 22nd 2008 12:02PM   -   gametages
Thanks Gametags I have tried to adda rewind button but what I have tried so far did not work. I am unsure how to go about it and am really coding in the dark. Any help gratefully recieved
February 23rd 2008 09:02AM   -   beginner
Hi, is there any way to make the controller stay on top of the movie always? Thanks ... Great player
February 29th 2008 15:02PM   -   Doc
Thanks for script but I have web pages with 2 movies on them and I want them to start when clicked,otherwise,they will play both when page is loaded.what can I add to script?
March 3rd 2008 05:03AM   -   stupid
Is this freeware? Thanks.
March 7th 2008 09:03AM   -   dev
this one work with Joomla or not
March 11th 2008 04:03AM   -   rimnam
I want to make player buffer..ie if the video is big i want to make the time bar wait for particular time to buffer and play...like you tube player.can you help me in this issue
March 11th 2008 08:03AM   -   lineesh
Thanks! wonderful, very versatile player. kudos- Ray
March 12th 2008 16:03PM   -   ray
Please suggest us how to use it with xml playlist ?
March 15th 2008 04:03AM   -   afroz
Great working file, just one question, can we get rid of the black bars when the video and the swf are not the same size? For example show the FLV video no matter what is the width and height written on the object code.
March 17th 2008 18:03PM   -   Al
The mouse doesn't disappear over the player, it disappears over the ENTIRE PAGE the player is ON! I had to TAB through this to get a message typed in. The player may be stopped, but it's not OFF.
March 18th 2008 10:03AM   -   suijuris
This is such a great idea putting in my website. I have been thinking about this for long.
April 8th 2008 09:04AM   -   premium
The mouse doesn't disappear over the player, it disappears over the ENTIRE PAGE the player is ON! I had to TAB through this to get a message typed in. The player may be stopped, but it's not OFF. The same problem happens to me. Mouse just disappears. I can not see it when not in use.
April 8th 2008 09:04AM   -   plastic
I've removed the mouse hiding feature.
April 8th 2008 15:04PM   -   John
Thanks for the flv player it was just what I needed. With some modifications and an xml slide show I was able to make a flv video playlist that has about 10 videos now and more to come. I have learned alot from this site. Thanks
April 9th 2008 23:04PM   -   greg
Update: The user can now specify starting volume of the player.
April 15th 2008 19:04PM   -   John
Great player:D Only one question, how could i get the player not to autostart the movies?
April 20th 2008 14:04PM   -   Mathias Furre Grøtan
Mathias, thanks for the suggestion. feature added. It's autoplay=false in the html.
April 20th 2008 23:04PM   -   John
mmhhh, the autoplay=false seems not works fine...can you check please?
April 21st 2008 14:04PM   -   Frank
Frank, it's working fine for me. Try redownloading the flash files. Maybe you have an old copy.
April 21st 2008 23:04PM   -   John
I was happy for few seconds.i downloaded new flash file,I've put html script and I started to cry:my backround is black,so it's the player when page is loaded.Anyway,it's a great player!
May 15th 2008 07:05AM   -   stupid
<a href="http://www.bezzmedia.com/swfspot/resources/37-flvplayer.swf?video=http://www.helpexamples.com/flash/video/typing_short.flv&size=false&aplay=true&autorew=false&title="/>hhhh < This exemple works good with your old swf file ,I want to put links on my page but it doesn't allow full screen,can you help a little?
May 15th 2008 08:05AM   -   stupid
Great script! I'm just wondering if it's possible to remove the "play URL" link on the video.
May 15th 2008 10:05AM   -   Omar
Thank you so much for this real easy to use player. Unfortunately it distorts 16:9 video content into 4:3. Is there any parameter to set the aspect ratio or the height and width?
May 21st 2008 12:05PM   -   Sven Eisenhardt
Thank you for this nice player. I have the same problem as Sven above. My 16:9 gets 4:3. If I try to solve this by changing the width, height in the html only the player box get size changed. The video stays the same.
May 28th 2008 15:05PM   -   Ake
Hi great player just wondering if theres away of adding your own logo
June 24th 2008 14:06PM   -   tajio
Thank you
July 5th 2008 03:07AM   -   2ked
Thank you for the player and I love the UI. Simple to use and to the point. I have run into an issue where I need to add buffering. Can you help me with this?
July 15th 2008 15:07PM   -   Robert Fidler
Nice player but the video's aspect ratio is not maintained. For Sven and Ake, to fix this problem, you can replace line 88 and 90 in function setObjects() with vidplayer._height = vidplayer._width / vidscale; Also replace line 100 and 102 with vidplayer._width = vidplayer._height * vidscale;
July 21st 2008 15:07PM   -   Che-Bin
Hi John Bezanis, Thanks a lot
July 22nd 2008 04:07AM   -   Vasu
John you don’t seam to be responding to your users...you started something nice but then abandon us all ? I guess lost of interest or something else keep you busy, hope she is worth it lol...anyway, altough I dont expect your respond & even less upgrade, here is the review: Great start but to be usefull your player is seriously missing: 1 ability to play list of files not just one 2 auto rewind option 3 random file (shuffle) option 4 hide open file option 5 hide toolbar for certain filenames option (if I want to input commercial message and don’t want my users to be able to skip it, I can name all commercials files to start with "commer" for example) That on side congrat on very nice work and thanks for sharing!
August 4th 2008 01:08AM   -   Zentrox
i like to embed the player into my web page. Can i control the position where to start the video? is it possible that the player only start buffering from this position? Thanks
August 10th 2008 20:08PM   -   Phong
Really thanks..I am finding a player which is open-sourced for a whole week
August 26th 2008 00:08AM   -   Daniel
This is awesome John!!! Just wondering if this player supports RTMP streaming Video. Ex. rtmp://mymedia.mydomain.com/folder/myfile.flv Thanks and really appreciate it
August 27th 2008 12:08PM   -   MrT
Hi guys....don't know how many people still check this but here goes. Some people asked how to make the video player buffer, well this is the answer: At some point in the Actionscript on frame 2 on the player layer enter the following: ns.setBufferTime(3); You can change the number to what ever you want, it reprasents the number of seconds that the video is going to buffer before starting or resuming play. I entered the line in row 35 if any one cares.... I hope this helps out. This player is completely customizable...and I love playing with it and changing it around... I LOVE IT! Thanks John.
September 1st 2008 14:09PM   -   Yonatan Ran
It's very good,I am studying...
September 22nd 2008 05:09AM   -   Alend
but no support chinese charset
September 22nd 2008 05:09AM   -   Alend
Thanks..&& internet explorer in the not playing.Helpp :(:(
October 20th 2008 12:10PM   -   @hmed
Try this player in Firefox 3, with flashplayer version 10 (The latest up to 2008 Oct.) The player is not working, it just did show up. The player work fine on Firefox 2 and IE 6 with flashplayer 10. I guess some work has to be done to fix it if we all still want to use it.
October 23rd 2008 14:10PM   -   Paul Fung
Is there any way to control this player with javascript?
October 28th 2008 17:10PM   -   richard
I think this guy is trying to steal your work, unless it's you... http://www.newgrounds.com/portal/view/471685
November 30th 2008 14:11PM   -   The Copy-Cop
Can I put the name of the flv in the code of the Fla how can do this? thanks for this great work
December 2nd 2008 11:12AM   -   alby
thanks Yonatan Ran for you tip, i allready make it work I just add my flv name in the openurl movieclip instead of the http:// thanks john a lot
December 2nd 2008 14:12PM   -   alby
It'll be good if some additional samples added for FLV player with some standard features...
December 30th 2008 11:12AM   -   Holy
Hey guys, a new media player is in the works. It may be a while before it is completed, but it is going to be real nice. AS3
December 30th 2008 12:12PM   -   John
Add a Comment
name:
website (optional):
captcha type the characters into the box
message (5000 characters or less):