Experimenting with the source element in Firefox 3.1

Voila, the source element has four attributes, two of which are most important – src and type

  • The source element allows authors to specify multiple media resources for media elements.
  • The src attribute gives the address of the media resource. The value must be a valid URL. This attribute must be present.
  • The type attribute gives the type of the media resource, to help the user agent determine if it can play this media resource before fetching it. If specified, its value must be a MIME type. The codecs parameter may be specified and might be necessary to specify exactly how the resource is encoded.

Currently only OGG containers are supported in Firefox 3.1

Simple snippet might look like this.

<video id=”v1″ controls=”true”>
<source type=”video/ogg” src=”http://tinyvid.tv/file/11iyeh1k63cs0.ogg”&gt;
<p>Sorry, your browser does not support the <video>element.</p>

End result, is a really sweet Star Trek trailer http://tinyvid.tv/show/11iyeh1k63cs0

– AaronMT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: