Embedded Media Field Now Supports Custom External or Local Video URL's

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
aaron's picture

The Embedded Media Field module now supports custom URL's, in addition to the third party providers currently supported, such as YouTube, Blip.TV, Revver, etc. This allows external videos hosted on another site, or in the local server's file directory, to be embedded in the field. It works in the same way, so that an editor simply pastes the link they wish embedded into the field's textfield, and the module will parse the URL and display it appropriately.

Currently supported video file types are wmv, wma, swf, flv, mov, and rm. I would love if someone could send me links/directions to embed other video types, such as mpeg, avi, etc. I haven't researched that entirely, but would like to support more types if possible. Administrators are able to determine what types (if any) to support for the field.

This opens up new possibilities, such as local uploads, which seems to be the logical next step. I'll probably take the theme files out of the new include file and make them available to other files, so we could have 'Custom URL's' and 'Local Files' as two separate files in the future. I also want to open the API of emfield a bit more, to make it more easily extensible by other modules, and not just include files.

I also had a brainstorm of creating a regex builder interface, so admins who want to create their own supported provider can do so without writing a new include file or waiting for someone to get around to supporting it. But that's a little more long term. Also on my todo list is to support provider 'weights', so we don't have to worry about regex conflicts. (I named the new include file zzz_custom_url.inc, which is, of course, hacky. Don't worry, when I add that, I'll make sure it doesn't affect anyone after renaming the file to something more sensible.)

Finally, I plan to add similar functionality to the image and audio portions of the module soon, as soon as I can get around to it.

Aaron Winborn
Advomatic
Drupal Hub

Comments

Some embed code

apperceptions's picture

This is great news Aaron! I'm trying to replace Ourmedia.org's old media viewer code with emfield. I think this is a fun module to work with and have recently written a provider for Internet Archive videos and for RSS feeds of flash videos using Archive's copy of the open source FlowPlayer.org (a Drupal site BTW :-) ). You new addition addresses our need to support lots of video formats, so thanks!

Here is a link to our old PHP code for displaying media players. It's main value is that it contains embed information for quite a few types, all in one example. One look at it and anyone will see why busting it up into a notion of providers makes a lot of sense.

http://tools.ourmedia.org/blog/markus_sandy/featured_video_php

or

http://tinyurl.com/yq8n84

I think your planned new features sound great, especially the builder idea. It seems like many providers could be added quickly that way.

Markus Sandy
http://Ourmedia.org

Hey, this is cool. Will be

patrickfgoddard's picture

Hey, this is cool. Will be checking this one out for sure.

Couple of files types that would be nice to have support for would be meta file types, like asx, wax, qtl, etc.

Music

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week