Originally Posted by eimermusic
I can usually find the answers to html-related questions either via google or the forum search. This time I am stumped. I would appreciate any tricks that can fix the following.
I need to embed video and audio on a page. That is it. Or rather, how can I embed a file and let the browser choose the plugin? I can't seem to find any reference to any tag that will do this in the current versions of html.
The EMBED tag used to do this back in the bad old days. Nowadays all I find are convoluted variations of object tags. All those workarounds require that I (the developer of the page) decide which plugin the visitor should use to best display a certain file format. There are several plugins for various browsers that all handle mpeg4, 3gpp, mp3. Even pdf can be viewed by more than one plugin. I can't (and frankly wouldn't want to) know which plugin the visitor prefers.
How can I embed an "object" at /path/to/file which is of the type some/media and let the browser choose the plugin? Is that still an utopia after all these years? I haven't dealt with this in a few years and I am honestly surprised I can't find any solid example.
thanks in advance.
The JW FLV Media player (http://www.longtailvideo.com/players/jw-flv-player/
) is a very popular option as it plays a number of popular filetypes (FLV, MP4, MP3, AAC, JPG, PNG and GIF). It also supports playlists, which is very nice. According to the website it supports "RTMP, HTTP, live streaming, various playlists formats".
It's a free download for personal use (I believe a "donation" is suggested for commercial use) and it has pretty good online support (also boasts an online setup wizard here: http://www.longtailvideo.com/support...r-setup-wizard
Anyway, this doesn't use embed or object tags at all. Once the base code is included in the header with a <link> tag the in-page script call is done like so:
<div id='mediaspace'>This div will be replaced</div>
var s1 = new SWFObject('/jw/embed/player.swf','ply','470','320','9','#ffffff');
That's it. The media player appears inside of the "mediaspace" div in this case. The existing text is overwritten with the player.