So, I recently started working with Flowplayer, as a consequence of working as an intern for a company that uses it. Over the last few days, I've written a rudimentary HTML5 video plugin. I see some interest in such a thing around here, so I figured I would release it into the wild. I am hoping that if enough people like it, it will be picked up and maintained, as I have neither the time nor the energy to really do a good job completing it.
Unfortunately, it is not noninvasive of the rest of the flowplayer code, and as of now includes minor modifications to the flowplayer and flowplayer.playlist javascript files. These have intentionally been kept as minimal as possible, but as a consequence of that fact are not examples of particularly good coding practice (i.e. global variables are used to pass information, in one case).
What I know works:
-Flash, webm, and h264 detection (and support, in that order of preference)
-Falling back to HTML5 when flash is not present (or HTML5 is forced)
-The Playlist plugin
-Pause/Resume/Stop functions while HTML5 is active
-Mute/Unmute functions while HTML5 is active
-Unload function while HTML5 is active
-Displaying an arbitrary HTML error when no video can be played
-Hopefully everything, while in flash mode
What doesn't work while HTML5 is active (very incomplete list):
-Any plugin that requires flash (obviously)
-Cuepoints (could be made to work fairly easily)
-Volume up/down and volume fetch functions
-The play function, while HTML5 is active and the playlist plugin is in use (not sure if it worked with just the playlist plugin anyway, though)
-iOS devices (iPhone, etc.). Seems to be due to h264 detection, but I don't own a device, so I can't test/bugfix.
-Probably instream playlists
-Probably pseudostreaming
-Certain features of the playlist plugin (e.g. automatically moving to next video).
Some features are impossible without changing a lot more of the flowplayer code (something I am strongly against. The goal should be that the plugin works with a stock flowplayer install). Some just don't work because I never got around to them. I do not claim that any of my code is good - only that it is code. The usual legal nonsense about it being experimental and without warranty and not fit for any particular purpose applies. As I said, my hope is that it will be picked up by others. I am certain there are plenty of people who could do a better job with it than I.
Now the code, provided within a working example (the flowplayer documentation's playlist example). It should be well commented, and easy to figure out where it is not. Included are the plugin and modified versions of the flowplayer and flowplayer.plugin javascript files. Theoretically it will all work, provided the user has an HTML5 browser, but I cannot guarantee it. One more caveat: the example comes with HTML5 force mode already set. It will not play videos in flash (as it is intended to) unless the user unsets this in the plugin's configuration.
http://www.mediafire.com/file/wm5jmd1jn4h/flowplayer-html5-001.zip
Unfortunately, it is not noninvasive of the rest of the flowplayer code, and as of now includes minor modifications to the flowplayer and flowplayer.playlist javascript files. These have intentionally been kept as minimal as possible, but as a consequence of that fact are not examples of particularly good coding practice (i.e. global variables are used to pass information, in one case).
What I know works:
-Flash, webm, and h264 detection (and support, in that order of preference)
-Falling back to HTML5 when flash is not present (or HTML5 is forced)
-The Playlist plugin
-Pause/Resume/Stop functions while HTML5 is active
-Mute/Unmute functions while HTML5 is active
-Unload function while HTML5 is active
-Displaying an arbitrary HTML error when no video can be played
-Hopefully everything, while in flash mode
What doesn't work while HTML5 is active (very incomplete list):
-Any plugin that requires flash (obviously)
-Cuepoints (could be made to work fairly easily)
-Volume up/down and volume fetch functions
-The play function, while HTML5 is active and the playlist plugin is in use (not sure if it worked with just the playlist plugin anyway, though)
-iOS devices (iPhone, etc.). Seems to be due to h264 detection, but I don't own a device, so I can't test/bugfix.
-Probably instream playlists
-Probably pseudostreaming
-Certain features of the playlist plugin (e.g. automatically moving to next video).
Some features are impossible without changing a lot more of the flowplayer code (something I am strongly against. The goal should be that the plugin works with a stock flowplayer install). Some just don't work because I never got around to them. I do not claim that any of my code is good - only that it is code. The usual legal nonsense about it being experimental and without warranty and not fit for any particular purpose applies. As I said, my hope is that it will be picked up by others. I am certain there are plenty of people who could do a better job with it than I.
Now the code, provided within a working example (the flowplayer documentation's playlist example). It should be well commented, and easy to figure out where it is not. Included are the plugin and modified versions of the flowplayer and flowplayer.plugin javascript files. Theoretically it will all work, provided the user has an HTML5 browser, but I cannot guarantee it. One more caveat: the example comes with HTML5 force mode already set. It will not play videos in flash (as it is intended to) unless the user unsets this in the plugin's configuration.
http://www.mediafire.com/file/wm5jmd1jn4h/flowplayer-html5-001.zip