Work:Embedding Media Files

From Zoelife4U Wiki
Jump to: navigation, search

WMV

This will embed WMV files in to an HTML page source: http://www.justin-cook.com/wp/2006/11/29/how-to-embed-a-wmv-file-in-a-webpage/
Note this will work for Internet Exploder after clicking the Run Active X prompt, I may port AC_RunActiveContent.js to do WMV, AVI, MPG, etc too, but for now this will do. Windows Firefox users can install http://port25.technet.com/pages/windows-media-player-firefox-plugin-download.aspx and Linux users will want to use mplayerplug-in from http://mplayerplug-in.sourceforge.net/.

Gentoo Users can do:

sudo echo "media-video/mplayer X a52 aac alsa arts dvd encode esd gif gtk iconv ipv6 joystick jpeg lzo mad mmx mp3 opengl png quicktime real sdl sse theora truetype unicode vorbis xinerama xscreensaver xv xvid x264 cdparanoia win32codecs dv rar dv aalib a52 dvd cddb ftp dts srt" >> /etc/portage/package.use && sudo emerge -tavN mplayerplug-in mplayer

And Debian Based (Ubuntu, Mepis, Debian, etc):

sudo apt-get install mozilla-mplayer

Other Distros should have information with regard to their package managers.

Now restart Firefox. Konqueror and Opera have other methods and plugins available beyond the scope of this article.

The Code

<object id="MediaPlayer" width=320 height=286 classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" standby="Loading Windows Media Player components…" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112">
 
<param name="filename" value="http://yourdomain/yourmovie.wmv">
<param name="Showcontrols" value="True">
<param name="autoStart" value="True">
 
<embed type="application/x-mplayer2" src="http://media.pmcmovies.com/SixtiesLove.wmv" name="MediaPlayer" width=320 height=240></embed>
 
</object>
Personal tools
Online Users
Zoelife4U: