FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


media player on the site





silvergaze
do any1 noe how to make a windows media player on th website? if any1 have the code pls put it up pls...
wumingsden
To embed Windows Media you need a code, like this (there are many around but all do just about exactly the same job):

Quote:

<OBJECT
ID="mediaPlayer"
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">
<PARAM NAME="fileName" VALUE="http://msdn.microsoft.com/
downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/
Buttons/control.asx">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT>


The following options can/must be changed:

Can be:
STANDBY - this is the message that will show whilst WMP loads
AUTOSTART - "true" means the music will start when teh page loads, "false" means the opposite.
showControls - "true" means you can see the play, stop, fast forward, etc buttons, whereas "false" means you can see no controls.
clickToPlay - "true" means to start it you can click on the window and it will play, "false" means the opposite.

Must be:
FILENAME (Value = part) - URL of the file. Can reside on an HTTP server
( http:// ), MultiMedia Server ( mms:// ), local hard drive ( u: ), or on a network drive ( p:// )....

So if I wanted for it to run from my computer i would use something like this:

C:\Documents and Settings\Compaq_Owner\My Documents\My Music\Plus One, Rachael Lampa, Stacie Orrico - When Your Spirit Gets Weak.wma

If I were to use a http site I would use something like: www.wmd.frih.net/music/50cent/candyshop.mp3

The URL has to be the exact URL, it cannot be the URL of the page where the music is embedded. To tell this just look at the file extensions, all media types are ok if they play on WMD, for example, .mov extensions will not play on WMP as these are from QuickTime.


PLEASE NOTE THAT YOU HAVE TO GET PERMISSION FROM BONDINGS TO HOST MUSIC FILES!!! I BELIEVE THAT YOU CAN HOST THEM ELSEWHERE BUT STILL NOT TOO SURE. THE POINT IS ASK FIRST!!!
WillyDeWalvis
Thanks I needed this one too Smile
silvergaze
um den where do we like put the code for our music into tt source?
wumingsden
Between the body tags, wherever yo want it to appear. It should look a little like this - don't forget that it doesn't have to be in a talbe like i have put and the WMP doesn't have to be in that location, you do not have to have text, (you should get what I'm trying to say):

<html>
<head>
<STYLE TYPE='text/css'>
:
:
:
: CSS code goes here
:
:
:
</STYLE>

<title>
Title of website goes here, eg. Google
</title>

</head>
<body>

<tr><td>Welcome to the home of <b>YOUR SITE NAME</b></td></tr>
<tr><td>LOT OF OTHER TEXT</td></tr>
<tr><td><img src="logo.jpg"></td></tr>
<OBJECT
ID="mediaPlayer"
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">
<PARAM NAME="fileName" VALUE="http://msdn.microsoft.com/
downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/
Buttons/control.asx">
<PARAM NAME="animationatStart" VALUE="true">
<PARAM NAME="transparentatStart" VALUE="true">
<PARAM NAME="autoStart" VALUE="true">
<PARAM NAME="showControls" VALUE="true">
</OBJECT>
</table>

</body>

</html>
simplyw00x
I think he was asking where you put the source file you want played. I can't see it either.
wumingsden
Oh, sorry, I thought you ment where to insert the code, its here:


Code:

<PARAM NAME="fileName" VALUE="http://msdn.microsoft.com/
downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/
Buttons/control.asx">




Change the:
Code:

http://msdn.microsoft.com/
downloads/samples/Internet/imedia/netshow/smedia/NS3/JavaScript/
Buttons/control.asx

to wherever your media file is located.

I think that there is a newer code out there but this code does work perfectly fine.
silvergaze
so i put all those codes under body right...but any website u noe which u can host a song or anything?
wumingsden
http://www.musiccodescentral.com/link2.html here http://corbilla.com/video/ here http://www.ukscreen.com/broadcast1.htm here http://www.vocalist.org.uk/artists_upload.html here http://mediamax.streamload.com/ here http://www.jukeboxalive.com/

You can also go here http://www.musicvideocodes.com/ for free music videos. You can also upload yourself if what you want isn't up there.

I usually use http://fileupyours.com for txt, zip files (music files are allowed but there is a disclaimer to protect themselves).
silvergaze
hmmz k thx those links were fantastic but some links seems to not really work. yea otherwise thanks guys for all those fantastic ideas n coding n links and all the gd comments.
wumingsden
silvergaze wrote:
hmmz k thx those links were fantastic but some links seems to not really work. yea otherwise thanks guys for all those fantastic ideas n coding n links and all the gd comments.


I have to disagree, did you click on the link instead of typing out the URL? The server to the sites could of also been down as I've just checked out all of them and all are working fine.
silvergaze
um ok den i would try it out again. so do i type e url out or do i have to juz click on them? um yea k thx for tellin me
wumingsden
silvergaze wrote:
um ok den i would try it out again. so do i type e url out or do i have to juz click on them? um yea k thx for tellin me


Just click on them, the colour tells us that there links
silvergaze
ok den thx i would go try it out...but seems the website a bit lag in loading unless its my com...
wumingsden
silvergaze wrote:
ok den thx i would go try it out...but seems the website a bit lag in loading unless its my com...


its probably your pc, they load as if there google for me
djcaution
Hey thx for the code guys this is slick Cool but does anybody know how to have the music keep playing when going to different pages on the site without using frames?
Marston
I don't think that can be done.
Twikki
u could have just used the embed tag but anyway

does this work for more than one song??
djcaution
what do you mean embed tag?
wumingsden
Twikki wrote:
u could have just used the embed tag but anyway

does this work for more than one song??


No it does not for more than one song. For this to work you will need a song list and a flash player, you may want to check out here: http://musicplayer.sourceforge.net/
wumingsden
djcaution wrote:
what do you mean embed tag?


the "embed" tags, (which look like this in html; <embed>) is a simple way to embed objects. This HTML function is however going out of function. The only for music not to stop is if it was in a frame, (I think). Sorry Sad
silvergaze
by the way if we want the music like finish then start all over again how do we edit the code to put in the word "loop"? or else is there any other ways where we counld input that in to the source code given
Mido_the_gra8
I have an easy way to make music player in HTML.. and u can use about 1000 song on it and more ... go to : http://aljalilstudio.com/Blog/blog1.php/2011/01/19/any-questions-about-anything-just-ask#feedbacks

and this linke below an example for the player used by aljalilstudio website....
http://www.aljalilstudio.com/
ritchiecountyfc
Good tips. Very Happy
Related topics
No Media Player Windows
Windows Media Player a altyaz eklenebilir mi?
What media player do you like?
Windows Media Player 10
What Media Player Do You Use?
Songbird 0.1 Preview beta(Open-Source Media Player..) I
music with media player
winamp and windows media
Windows media player Radyo Yayn
Error of media player 10?
Media Player 11 beta
Windows Media Player 11 review
Help! Windows Media Player Problems
How to make a flash media player???
Reply to topic    Frihost Forum Index -> Miscellaneous -> Tutorials

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.