Embedded Media Players


How to embed Windows Media Player in HTML document
(mioplanet) (Microsoft)
Embedded Windows Media in Firefox
See here for Vista

Some of the info below is from Pimp Space
AUDIO PLAYERS
You can embed music into your page so that it starts automatically when someone views your page.

<embed src="url_of_song" autostart="true" loop="true" width="280" height="45"></embed>

The autostart attribute tells the song file how to begin. If you have this set to "true", the song file will begin playing automatically when your blog page loads. If you put in "false", the sound file will not start automatically and the visitor will have to start the song.

The loop attribute tells the song how many times to play. If you have this set to "true" then it will play over and over again automatically. If you have it set to "false" it will play once and stop.

VIDEO PLAYERS
Windows Media Player Video Code: Example 1


<embed name="RAOCXplayer" src="URL of video goes here" type="application/x-mplayer2" width="400" height="302" ShowC."1" ShowStatusBar="1" AutoSize="true" EnableC."0" DisplaySize="0" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/"></embed>

Windows Media Player Video Code: Example 2

[html:object width="100%"

classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6" id="PTMediaPlayer"]
<param name="URL" value="http://my.opera.com/dr-flay/homes/Music/Radio.asx">
<param name="rate" value="1">
<param name="currentPosition" value="0">
<param name="playCount" value="1">
<param name="autoStart" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="-1">
<param name="enableContextMenu" value="-1">
</object>
<object allowScriptAccess="never" allowNetworking="internal" enableJSURL="false" enableHREF="false" saveEmbedTags="true" type="application/x-mplayer2" classid="6BF52A52-394A-11d3-B153-00C04F79FAA6" height="45" width="280">
<param name="fileName" value="http://files.myopera.com/dr-flay/Music/ChaosB.C.mp3" />
<param name="URL" value="http://files.myopera.com/dr-flay/Music/ChaosB.C.mp3" />
<param name="src" value="http://files.myopera.com/dr-flay/Music/ChaosB.C.mp3" />
<param name="allownetworking" value="internal" />
<param name="allowScriptAccess" value="never" />
<param name="enableJSURL" value="false" />
<param name="enableHREF" value="false" />
<param name="saveEmbedTags" value="true" />
</object>..

Windows Media Player Video Code: Example 3

[html:OBJECT id="VIDEO" width="320" height="240"
style="position:absolute; left:0;top:0;"
CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
type="application/x-oleobject"]

<PARAM NAME="URL" VALUE="your file or url">
<PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM name="uiMode" value="none">
<PARAM name="PlayCount" value="9999">
</OBJECT>

Widows Media Code submitted in the comments by by
Unregistered user # Thursday, February 26, 2009 1:31:48 PM


<object id='MediaPlayer' width='100% height='500px' 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='/tester/media/kelly MSc/".$file."' />
<param name='Showcontrols' value='0' />
<param name='autoStart' value='0' />

[html:embed type='application/x-mplayer2'
src='/tester/media/kelly MSc/".$file."'
name='MediaPlayer'
showcontrols='0'
autostart='0'
width ='100%'
]
</embed>


</object>";

Real Player Video Code:

<embed src="URL of video goes here" width="320" height="240" loop="true" type='audio/x-pn-realaudio-plugin' autostart="false"> </embed>

Quick Time Video Code:

<embed src="URL of video goes here" width="320" height="256"> </embed>

Flash Video Code:

<embed src="URL of video goes here" width="550" height="400"> </embed>

Ageing techno-hippy armed with a radio show and not afraid to use it.

10 comments Write a comment

  1. Thankyou for leaving a comment I can read :up:All this has been copied from elsewhere, but I wanted all the usefull/simple bits on one page, to make it easy to copy & paste.

  2. Anonymous writes:

    Is this code suppose to stretch or shrink the video to match the size of the player? IE automatically does that but opera just crops the video.

  3. Anonymous writes:Opera will stretch video to fit a larger object size but will not shrink video to fit a smaller object size.

  4. Can’t seem to get the player working on http://www.myopera.com/joyfully2/blog I put the song I want to play in files and C&P your source code, typed the files exactly as they are in files including the space scripts (%20) What did I over look? I love this player and it seems to fit nicely in blog. I really wanted it on the side bar but I don’t think Opera welcomes players there. Sure hope you have the answer, because I spend hours trying to use objects to embed a player. Is there way to put JS in the Header tags? Can’t seem to locate that.If I created the entire site in DW maybe I could get a player and have more control over the layout. Will my.Opera accept my html?

  5. Sorry, I haven’t been online in a while 🙁 I’m not sure which bit of code you tried ?These scripts were culled from various sources (linked at the top)I’m not a coder, so I needed a quick resource of basic scrits, that work in most browsers.I have had the best luck keeping it as simple as possible on MyOpera.Mostly I just save an “asx” playlist with “Media Player Classic”, of the files I’ve uploaded. Then I use the first script, which is so basic it leaves the browser to decide what plugin it wants to use.I have been looking at a couple of stand-alone (i.e. not tied to a website) flash players.

  6. Anonymous writes:same as anon. have tried to force files with large dimensions to fit a smaller embeded player’s dimensions but only works in IE.I can see in opera and firefox that the file loads into the embeded player (i have at 50% screen width) and correctly fits the players dimension while loading, but then it auto stretches to the original source dimensions and the video gets cropped.Only solution i can find is the obvious, to shrink the video using 3rd party software and letting the video’s scale up rather than try to make them scale down code for embeding is below and the embeded width of 100% is so the player fits a containing div. playing with this value doen’t effect the scaling up/down and cropping of video by FF or Opera :irked: EDITMyOpera no-longer supports pasting HTML in the comments.This persons code is now on the page above.

Leave a Reply


This site uses Akismet to reduce spam. Learn how your comment data is processed.