Embedded Expression Engine in the Works
You want to support a provider not included automatically with Embedded Media Field? Just can't wait for the maintainers of the module to write a new include file for FrenchBlingVideoMashup.TV? But you don't know RegEx parsing from red beets and parsnips?
Fret no more.
Soon, you will be able to build your own provider parser, with little more than the cut-and-paste you're already familiar with.
I am in the middle of creating Embedded Expression Engine (emexgine), which will compare the URLs and Embed codes from a third party content provider and turn them into a new option for your video, image, or audio fields.
The first step will collect the name and type of provider, such as YouTubeScraper for videos or Buckets of Images. It will use jQuery on-the-fly magic to ensure the name is unique; you'll even be able to override an existing provider by simply disabling it from the already-existing administration screens.
Next is where the really cool stuff happens. You'll enter up to three URLs, Embed code, and thumbnail examples from your desired provider. Although this screen shot doesn't demonstrate it (because this part of the code isn't written yet), the module, combined with more jQuery magic, will attempt to extract the media code from the examples you paste. For instance, if you enter the fictitious URLs of http://my-favorite-video-provider/videos/33hgsl3ir and http://my-favorite-video-provider/videos/78ipqm5xw, the module will automatically determine that the code it's looking for is just after the /videos bit.
The media will also be displayed on that page as you enter the codes, although that currently happens on the next page of the form, until I write the jQuery code for that. Also, the expected codes will be highlighted, so you can double-check the magic, to make sure things work as expected. If it isn't working quite right, you'll be able to tell, because a preview will also be provided of how a clip should appear when parsed. You'll then either enter one or two more examples for the module to continue extracting and learning from, or, if you're brave, you can jump right into the RegEx and tweak the string itself.
Assuming everything works properly, the parser will be created. The module will automatically make it available for your Embedded Media Fields. You'll also be given instructions to create an include file, to make it easy to port to other sites. Finally, a link will also be prominently displayed to create a new issue in the Issue Queue, to encourage folks to give back to the community, with instructions to either attach the newly created provider file, or at least paste the code, for people still learning how to code, contribute, and otherwise participate in the Drupal community.
I believe this will be a fantastic addition to the suite of modules included with Embedded Media Field. It will relieve some of the pressure of creating new provider files, allowing an easy means for people to create their own, and hopefully encouraging them to share with the rest of us. It will also provide a working, live example of building Regular Expressions, for people who want to learn more. Finally, it will further allow us to harness the exploding world of embedded media content, without having to include 10,000 provider files, when a particular site will probably only want to include three or four.