edt-Embed

September 30th, 2006

edt-Embed is a WordPress plugin for embedding content into your posts. As of right now it only supports SWF content using Geoff Stearns’ SWFObject, but I hope to extend it to also embed QuickTime, WMV and any other media that may need to be embeded into a post.

The original concept and code for the plugin came from Ross Gerbasi’s plugin for embeding Google Video. After looking at the code that ended up being embeded on every page, I decided to make my own version that would be a little cleaner and easier on your bandwidth. Ross has a newer version of his plugin that is worth checking it out as an alternative to this.

Download edt-Embed

Syntax

You can embed content with just a src attribute based on what the content is. swf, flv, smil, mp3, yt (YouTube), gv (Google Video) and gmv (GameVideos.com). The flv, smil and mp3 file types require a swf on your server with it’s constant set in the plugin ready to accept a variable of the same name (flv=”myFlv.flv”). Example files coming soon.

YouTube

[embed youTube=“YouTubeVideo.swf”][/embed]

Google Video

[embed googleVideo=“GoolgeVideo.swf”][/embed]

GameVideos.com

[embed gameVideo=“GameVideos.com.swf”][/embed]

FLV

[embed flv=“MyFLV.flv”][/embed]

MP3

[embed mp3=“MyFLV.flv”][/embed]

Or you can add any or all the attributes of the video.

[embed yt=“YouTubeVideo.swf” width=“320” height=“240” version=“9”][/embed] [embed yt=“YouTubeVideo.swf” version=“9”][/embed]

Constants

You need to edit the plugin’s constants to set default width, height and version numbers for all the content types. I have some defaults set already for YourTube, Google Video and GameVideos.com. Also, if you are doing an FLV, MP3, or SMIL player, you need to have the variables set in the plugin for the swf path to those players.

Bugs, issues and future development

  • Closing tag for CDATA is being encoded to “// ]]&gt”;
  • Add admin panel to edit constants like FLVPLAYER, SMILPLAYER etc
  • Embed javascript file automatically?
  • Category/archive view not displaying the videos.

Version Info

1.2

  • Added support for a new syntax for embedding Google Video, You Tube and GameVideos.com

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment