YouTube embedding technical constraints?

I note in a previous topic that there are apparently technical issues which make it difficult (impossible?) to embed YouTube videos as Moving Image objects. That topic was a year ago, though. Is this still true?

If this is still true, would writing a plugin be the best way to proceed? I'm imagining being able to point Omeka at a YouTube URL and having it slurp the metadata in to create a fully-fledged Omeka item.

This sounds like a great area for a plugin.

The main issue you'll have is that Omeka's file display code is based on having actual files uploaded to an Omeka install. It's relatively easy to write some file display code that just embeds the YouTube player, but the trickier part is convincing Omeka that your video is actually a "file".

(The above is assuming that you want to have the video appear in an exhibit or elsewhere like other Omeka files. Simply adding a YouTube player to an arbitrary page is much simpler.)

Agreed with John that this would be a great plugin.

Zend includes a library for retrieving data from YouTube, which Omeka has in 'libraries/Zend/Gdata'. You could use that to get the data for most anything on YouTube, not just the video itself. I haven't used this yet, but Zend has docs on Using the YouTube API that should be useful.

I could see a plugin that would do the following:

  1. Create a new item type called "YouTube Video", with a field for the video ID or the video's URL. Or, add a field to the Moving Image item type for the video's URL/ID. Something unique like 'YouTube URL', since 'URL' is already part of other item types.
  2. Filter the display of that URL or ID field using the Display Item Filter to use a function to embed the video instead of just displaying the URL. Something like:
    add_filter(array('Display', 'Item', 'Item Type Metadata', 'YouTube URL'), 'your_video_embed_function'))

We use a similar filter in application/views/scripts/custom.php to filter any untitled items.

John, Jeremy--- Thanks for the pointers. I'm not sure that I have the time to do this now, but the guidelines are handy in case I do.

(Anyone who reads this and wants to chase the idea--- please do, and follow up to this thread.)