Emded Windows Media Player

Eddie Traversa -1 Tallied Votes 693 Views Share

You can use this code to embed the windows media player in html pages. Just set the controls to suit and change file names etc..

almostbob commented: It would be of more use, to post something that was not available on the manufacturer's web site and tutorial pages +0
<object id="MediaPlayer1" CLASSID="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" 
standby="Loading Microsoft Windows® Media Player components..." type="application/x-oleobject" width="280" height="256"> 
<param name="fileName" value="one.mpg"> 
<param name="animationatStart" value="true"> 
<param name="transparentatStart" value="true"> 
<param name="autoStart" value="true"> 
<param name="showControls" value="true"> 
<param name="Volume" value="-450"> 
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" src="one.mpg" name="MediaPlayer1" width=280 height=256 autostart=1 showcontrols=1 volume=-450> 
</object>

Dani AI

Generated

’s OBJECT/EMED approach shows the old Windows Media Player/ActiveX technique that used to work in Internet Explorer. That approach is effectively obsolete for public websites because modern browsers do not support in‑page ActiveX/NPAPI plugins — the only practical place they still run is inside Edge’s Internet Explorer (IE) mode for legacy enterprise sites. Migrate to HTML5 video for reliable, cross‑browser playback. (learn.microsoft.com)

Use the HTML5 <video> element with multiple source formats (MP4/H.264 + WebM) and a visible control interface. A simple, compatible pattern:

<video controls width="640" poster="thumb.jpg" playsinline>
  <source src="one.mp4" type="video/mp4">
  <source src="one.webm" type="video/webm">
  Your browser does not support the video tag. <a href="one.mpg">Download</a>.
</video>

Provide both formats so browsers choose the one they support; always include controls (important for accessibility). Note: autoplay with sound is usually blocked — use muted or require a user action to start playback. (developer.mozilla.org)

If your source is an older .mpg, convert it to web‑friendly containers/codecs. A common FFmpeg command:

ffmpeg -i one.mpg -c:v libx264 -crf 23 -c:a aac -b:a 128k one.mp4

FFmpeg is the standard tool for this; adjust crf/bitrates for quality vs size. For large sites or adaptive streaming, package for HLS/DASH or use MSE-based players (Video.js, hls.js, dash.js). (ffmpeg.org)

Troubleshooting checklist: serve correct MIME types (video/mp4, video/webm), add CORS headers for cross‑domain sources, test on mobile (use playsinline), and provide a download fallback for very old clients. For corporate intranets where legacy WMP/ActiveX was used, consider Edge IE mode as a stopgap while you migrate to HTML5. What suggested — checking vendor docs — is sensible historically, but today the recommended path is HTML5 playback and media conversion; this will also help learners like and developers working in ASP.NET (as mentioned) to deliver consistent playback across devices. (learn.microsoft.com)

trincell 0 Newbie Poster

thank you very much i had this very rude and not to helpful web design professor at school if i could teach myself the rest of the information i need to know to correctly fix my web page so that i am not using the picuture images on it as thumb nails but in a rather story.

jayaprakash.v 0 Newbie Poster

to design media player in asp.net

hishgee 0 Newbie Poster

i don'uderstand it.

almostbob 866 Retired: passive income ROCKS

Try, go to MicroSoft and copy and paste the code, read the tutorials, and follow the explanations of what this code snippet, cut directly from MS does

is a place to begin

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.