I mentioned on Tuesday that I would post a simple howto describing how one might embed a quicktime movie and control its playing by hovering over it. It turns out that the current firefox implementation of the quicktime plugin is a little buggy. So I’m recommending the following:
- Don’t use the object tag
- Only use the embed tag
- Don’t use the “scale” attribute in the embed tag
I have an example here to demonstrate. If you look at the source code you will also see the attributes onmouseover and onmouseout. These are what you call “event handlers”. Event handlers handle “events” such as when you mouse over an element or when you move your mouse away from that element. In the example I’m executing the code this.Play() when I mouse over the movie and this.Stop() when I move my mouse off the movie. Neat.
Internet Explorer and the ActiveX Problem
If you load the example page in Internet Explorer you will notice that you have to either click the movie or push the spacebar before you can play it. The introduction of this “feature” was, I believe, a way for Microsoft to get out of a lawsuit. Anyway, it hurts user experience. Who wants to have to “activate” the media on the page before you experience it? There are ways to get around this using javacript but they fall outside the purview of this course (Though I’m not against explaining it in class if people show interest).
*Note this isn’t an issue if you use Objecty! which works around the “click to activate” problem.
Either way, this is a bit of work just to embed a video. What are some other options? I would recommend uploading videos to youtube and then using the code they furnish for embedding the video on a webpage under “embed”. The quality is quite good at this point and google’s resources far outweigh our own.
I prefer the last one
It is very convenient to upload a video on youtube, then embed that video on any website.
I am interested to know more about streaming video and related cross browser issues. How about using flash player for embedding a video?
Thanks for the post.
Comment by adnan — November 10, 2009 @ Tuesday, November 10, 2009 12:39 am
Sure, flash is what youtube/vimeo currently use. Also the jw player which can be found here: http://www.longtailvideo.com/ is a nice Flash movie player for playing videos stored on the server.
Flash pretty much gets around most cross browser issues which is great but it does tend to be a little more processor heavy than maybe it should. There are other issues as well(usability, SEO, cost).
Comment by joe — November 10, 2009 @ Tuesday, November 10, 2009 8:54 am