What does it take to create a plugin that would detect open video files (Ogg Theora with .ogv and .ogg extensions) in an album and print out basic HTML5 markup for them so they would be playable? The < video > tag and some fallback markup like shown here:
http://www.theora.org/cortado/To start with I took a look at the existing flowplayer and flvplayer plugins and see that they are registering themselves to the $_zp_flash_player variable, which seems to be part of the core. Would it need changes to the core to handle .ogv files? Like an addition of a global $_zp_openvideo_player variable?
Now that Firefox 3.5 supports playing open video with the video tag without any plugins
http://www.webmonkey.com/blog/How_Firefox_Is_Pushing_Open_Video_Onto_the_Weband other browsers are catching up (except IE maybe) and big video sites like Youtube and DailyMotion are experimenting with this
http://openvideo.dailymotion.com/it is very interesting to be able to drop open video files (.ogv) to a Zenphoto album and have them play.
/Björn
Comments
Anyway, take a look at the `class-textobject.php` filter plugin which provides an example for formats zenphoto does not support, in this case, well, texts.
http://www.zenphoto.org/documentation/plugins/_plugins---class-textobject.php.html
You would have to create your own plugin with that.
I cloned class-textobject.php and made some obvious changes that can be seen at
http://code.google.com/p/zenphoto-openvideo-plugin/source/browse/trunk/zenphoto/zp-core/plugins/class-openvideo.php (creating a project for this at google code may be called an overkill
and the results can be seen at
http://mappa.bthj.is/hreyfimyndir/OpenVideoTest/FL20080162.ogv.html
(in Firefox 3.5 you'll have native support for the < video > tag and in other browsers the Java applet kicks in).
And now I have two main questions:
- There is an anchor < a > tag printed around the <video> tag so when clicking the player controls in Firefox 3.5 you are actually taken to the link, which results in an error. How would this link be removed? ...class-video.php doesn't seem to suffer from this but looking at the code I haven't seen the magic.
- How do I arrange configurable width and height parameters? Again, looking at class-video.php this feature seems to have something to do with the $_zp_flash_player variable ($_zp_flash_player->getVideoHeigth($this);) - should I try something similar or is it possible to have those values configurable without using this global flash variable?
If you cannot get the height/width somehow from the file you would have to configure options in the plugin to allow it to be specified. The `getHeight()` and `getWidth()` methods would then return these option values. You can look at the flowplayer plugin to see how it has made these options.
A nice article that is a very interesting read - "No, you can’t do that with H.264":
http://bemasc.net/wordpress/2010/02/02/no-you-cant-do-that-with-h264/
Did you make any progress on your plugin? I can see it's working on your gallery, but did not manage to make it work properly on my own gallery, using the files on Google code.
Could you provide some king of user guide, a quick how-to, in order to use ogg video on Zenphoto ? I'm not a php expert, and could not guess what to do based on the code...
Thx a lot in advance!
Mathieu.
But thanks for the reminder as we apparently forgot to add this to the extensions section.
I actually hoped he would answer on this topic...
I won't count too much of him responding as this topic was his only activity on the forum so far.