Blog Closed

This blog has moved to Github. This page will not be updated and is not open for comments. Please go to the new site for updated content.

Tuesday, May 11, 2010

EmbedVideo MediaWiki extension

I've been doing a little bit of contract work lately on a mediawiki-based learning system. One of the features that was requested of this site was the ability to embed flash videos, primarily from YouTube, but also from other kid- and school-friendly hosting sites such as TeacherTube.com and KidsTube.com. KidsTube has since announced that they will be going offline soon, so support for them isn't particularly important now, but the idea still stands.

I did a search on mediawiki.org to find a suitable embedding extension for flash videos. A few options pop up at the top of the results list, but I notice some strange similarities: EmbedVideo, EmbedVideo++, EmbedVideoPlus, all of which appear to be forks of the same original codebase. I also found at least two other independently-developed variants of the same extension in my searches.

The original EmbedVideo extension was developed by mediawiki hacker jimbojw some time ago, but he has completely stopped maintaining it. In his absence, the EmbedVideo++ extension was forked off his work to add some new features. However, that extension has since been abandoned as well. Add another fork from yet another developer--EmbedVideoPlus--which has already not been modified in over a year. I saw two other variants as well which are almost identical minus some small additions but which weren't listed in the released extensions list. Neither of these look to be actively developed, at least not towards a larger goal of a generally more-useful extension.

Where the story starts to get funny is that I had to make some of my own modifications to the extension, and was about two button clicks away from hosting my own version publicly when I had an insight: Why add another version, when I could try to take over maintainership of some (or all!) of the existing versions? Two of them are listed as "abandoned" on the mediawiki.org website. One other hasn't been modified in over a year. Two more are slightly more recent but by no means under active development. Each developer has done just enough work to get their own changes added, but stopped active development as soon as that was complete. I think I can do a little better than that. At the very least, I can put the project into some kind of public source control and make sure it gets exposure and some level of development sanity.

So, Sunday afternoon I sent out a handful of emails to the involved developers: I would like to take over the project, merge all the variants together into a single extension, throw it up on github, do some new development, and actively maintain it. I've only received a reply back from Jimbojw so far, but he seemed enthusiastic.

Yesterday I created a project on Github and uploaded some initial files. The original EmbedVideo.php file with some modest modifications, LICENSE, CREDITS, and README files, and some other related stuff. I've got a few big TODO items that I want to tackle in the coming weeks and months:
  1. Refactor the code to follow current best practices
  2. Test the code to work with newest development versions of MediaWiki. I've heard some reports that there are some incompatibilities.
  3. Add proper i18n support.
  4. Use, where possible, a dedicated javascript library for the purpose such as SWFObject.
  5. Add in some support for new video hosting websites
  6. Add in some other bits and pieces from the other extension forks, as possible.
I'm hoping to get some nice cleanup work started, and maybe get a few items ticked off this list soon so I can cut a new public release of the extension.

I'll post more news and updates as development progresses.

2 comments:

  1. Thanks Andrew,

    I think the reason you see so many variants is probably my delinquency in adding requested features.

    Backstory: before I made EmbedVideo, there was an extension (or two) for embedding YouTube videos. These were not to my satisfaction (having XSS vulnerabilities, lack of size controls, etc), so I wrote the YouTubeTag extension.

    Even this was insufficient, however, since all the YouTube extensions (including mine) suffered from at least three drawbacks:

    1. They were extension tags, rather than parser functions, so they couldn't be used in conjunction with templates. Parser functions were a new technology at this time.

    2. They only supported YouTube, and at the time there were several competing sites in the video hosting space whose videos I wanted to display.

    3. They had no configuration options to enable extending them to other services, short of modifying the source.

    I set out to write #ev to solve these problems. I implemented a simple parser tag, created a default list of video service providers, and provided a mechanism for adding more.

    Having achieved my goals, I stopped work on it. It was good enough for me. When other people had requests, I would ignore them, more or less, because I didn't personally need that functionality.

    As a result, other developers took up the flag, creating their own variants. And in like fashion, when they had made their changes, they ceased development because it did what they wanted.

    I'm happy that you're interested in supporting the project for the common good. The best place to store the code would probably be in the mediawiki svn repo, if you have access.

    If not, I think you could make a good case for having access, as your cause is noble, and the extensions involved have a long history and wide use.

    Good luck!

    ReplyDelete
  2. Thanks for the comment, Jim! I definitely know what you are talking about, once a piece of software does what you need it to do, there's no real sense in developing it any further.

    I plan to be making some use of this extension, and I do see a real opportunity here. After all, if I'm going to expend the effort, I may as well just do it correctly. Plus, if the code gets into a public source code repository and other contributors get empowered to work on it with me, I hope that when my motivation to work on it ends that it won't go dormant again.

    I have the code at github now, it's an environment where I do a lot of other work and I feel comfortable working there. Getting the code into the mediawiki svn repo might be nice eventually too, since we could make tags that link versions of EmbedVideo to the versions of MediaWiki that they work against. Plus, the extension would get plenty of exposure and testing if it was there as well.

    ReplyDelete

Note: Only a member of this blog may post a comment.