Thursday, March 5, 2009

I Am The Supreme Badass Extraordinaire!

Check this out:
www.backwater-productions.net/_video/video_player.swf?vid=mt_dew_hosed

www.backwater-productions.net/_video/video_player.swf?vid=elk_management
(you can use any SWF video in the directory)

Here's a live preview:


LOL, my new Flash video player. It's setup so that I only need just the ONE player and then I can dynamically load different videos into it by specifying the file name in the URL. I also used altered context menus and created my own built in "save as" function when you right click on the save button. It uses PHP in order to force the browser to save the SWF files rather than just opening them in a browser window, which is very handy.

And along the way I discovered a ~really~ horrific exploit:
www.backwater-productions.net/_video/dl.php?file=../index.php

You can't actually download it now, I threw in an extra script to detect teh file name extension, but without that extra script basically it would allow anyone direct access to *ANY* file on the server (so long as they knew the file name). And that would include PHP files server side containing user names and passwords! o_O

Needless to say, I'm quite glad I checked the damn thing before just throwing it out there. I wonder though how many other people might be using a variation of the code...probably not too many since it's sort of an advanced scripting usage (not necessarily in and of itself, but the functional intent would require someone to know as much PHP as Actionscript). Hopefully if anyone else is using a variant of the code they made sure to check its limits before hand.

I think for fun I'll add in the ability to custom skin the player via XML or CSS. Then I'll release it for free for public use.

I'm still not ~completely~ satisfied on its current look and the buttons aren't as of yet animated (in button like fashion). Those text boxes that show the video length and current video time are presently more of just an after thought, they aren't apart of the style at all, merely thrown in for the hell of it.

Oh, forgot to mention, unlike my older video players this one not only has play position tracking, but also has a seek controller as well, so you can easily move about within the video. It should work a lot better than the one YouTube is using, which frequently tries to snap to video key frames and often hangs for no real reason at all.

Another thing I should do if I make it skinable is to make it reconfigurable, in that I could set it up so that you could arrange the buttons however you like, change their size, whatever, all via the use of CSS or XML. Anywho, this is what I did today and it was quite fun.

No comments: