Eddie’s FLV Player
September 18th, 2009 by Eddie SullivanI've created a modified and updated version of Neolao's FLV Player. This is a very useful video player for FLV files that you can embed on your web site.
There were some features that I wanted added and some bugs that needed fixing, but there did not seem to be much activity on the original app's message board (at least the English language version), so I decided to make the changes myself.
I took the "MAXI" version of the player, and added in some more JavaScript support, improved some performance issues, and fixed a couple bugs.
Here is what I changed:
- Fixed some bugs with the slider control.
- Added to the JavaScript interface the following functions:
- playVideo
- pauseVideo
- getVolume - Gets the volume as a percentage.
- setVolume - Sets the volume as a percentage.
- getCurrentTime - Gets the current time in seconds.
- setCurrentTime - Seeks: takes a new time in seconds
- isSeeking - Returns true or false
- isPaused - Returns true or false
- getDuration - Gets the video length in seconds
- In the flashVars, you can set a percentage width or height by appending a percent sign to the value. If you set just width percentage and don't set height, the height will be automatically calculated to keep the aspect ratio. Be sure to escape the percent sign as %25. Something like: width=50%25
- Made seeking more efficient when using phpStream. Now doesn't
initiate a new connection to the server unless necessary.
Here's the original documentation as well as an HTML code generator.
If you have any issues or feature requests, feel free to contact me. Enjoy!
Hey Eddie,
Good work on the FLV player. I don't really use the additional javascript features but the slider control is def better.
Anyways, I am running into an issue where the player doesn't always load. It won't show the controls or anything, and if I right click where the player should be, I don't see the flash menu. I can't figure out a pattern. If it doesn't load, hitting F5 usually works. Any idea what could be going on?
Thanks.
Udayan
Hi Udayan.
Sorry, I don't know what could be causing that problem. Could it possibly be server or connection reliability issues? If you have Firefox, you can use the Firebug plugin to look for error messages in the Console and Network panels. Good luck!
-Eddie
When having a slow internet connection it will take some time before a movie starts "playing". The only thing you see is an empty player whitout showing any activity. I have tried the buffer parameters but nothing happens :(
Any idea how to show a buffercounter or an hourglass?
thanks.
Leendert
Check out the original player's documentation here, and try the showloading option to show a message while initially loading or startimage to show an initial screenshot.
Hope that helps!
-Eddie
Thanks for your responce but :( My problem is; when the webpage with the player is loaded it shows the startimage when you click on the play button this image is disapearing and the playerscreen gets black for some time. After the flv is loaded for about 75% then the movie start and also the loadingbar is visuable.
thanks
I'm sorry, then, I don't know what could be causing that. Could it be it is showing the first frame of the movie?
-Eddie
I found thate it probaly is caused by windows 7. On a computer with win-xp it shows (almost) directly the first frame.
thanks for help. Leendert.