| Embedded Windows Media Player | |
|
Author | Message |
---|
roobaby80 Member
Posts : 8 Join date : 2011-04-17
| Subject: Embedded Windows Media Player Wed May 11, 2011 10:27 pm | |
| I've created a webpage in Frontpage and inserted a Windows Media Player via Insert ActiveX menu. I can modify the Filename parameter to an mp3 file. But I want the page to have a list of three mp3 filenames and for the user to click on any one which will then play in the embedded player. I tried creating a list of the files in a m3u text file but the player just plays them one after the other. Could someone tell me what code I need to add so the clicked filenames will change the Filename parameter to another mp3 file?
I found a site where an example had it as a drop down menu but I can't work out how to change this to a list. If someone could guide me with a bit of code or something, I'd be very grateful.
Thanks |
|
| |
UsernameChange Staff
Posts : 16 Join date : 2011-03-09
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:27 pm | |
| - Code:
-
<div align=center> <SELECT id=cancion onchange=document.all.music.filename=document.all.cancion.value; size=1 name=Music> <OPTION selected>::::::::::::: Choose Your Song Here :::::::::::::</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION>
</SELECT><BR> <OBJECT id=music height=44 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95> <PARAM NAME="AutoStart" VALUE="-1"> <PARAM NAME="Balance" VALUE="0"> <PARAM NAME="DisplaySize" VALUE="0"> <PARAM NAME="Filename" VALUE=""> <PARAM NAME="Mute" VALUE="0"> <PARAM NAME="SelectionStart" VALUE="-1"> <PARAM NAME="SelectionEnd" VALUE="-1"> <PARAM NAME="ShowControls" VALUE="-1"> <PARAM NAME="ShowAudioControls" VALUE="-1"> <PARAM NAME="ShowDisplay" VALUE="0"> <PARAM NAME="ShowPositionControls" VALUE="-1"> <PARAM NAME="Volume" VALUE="0"> <PARAM NAME="AudioStream" VALUE="-1"> <PARAM NAME="AutoSize" VALUE="0"> <PARAM NAME="AnimationAtStart" VALUE="-1"> <PARAM NAME="AllowScan" VALUE="-1"> <PARAM NAME="AllowChangeDisplaySize" VALUE="-1"> <PARAM NAME="AutoRewind" VALUE="1"> <PARAM NAME="BaseURL" VALUE=""> <PARAM NAME="BufferingTime" VALUE="5"> <PARAM NAME="CaptioningID" VALUE=""> <PARAM NAME="ClickToPlay" VALUE="-1"> <PARAM NAME="CursorType" VALUE="0"> <PARAM NAME="CurrentPosition" VALUE="-1"> <PARAM NAME="CurrentMarker" VALUE="0"> <PARAM NAME="DefaultFrame" VALUE=""> <PARAM NAME="DisplayBackColor" VALUE="0"> <PARAM NAME="DisplayForeColor" VALUE="16777215"> <PARAM NAME="DisplayMode" VALUE="0"> <PARAM NAME="Enabled" VALUE="-1"> <PARAM NAME="EnableContextMenu" VALUE="-1"> <PARAM NAME="EnablePositionControls" VALUE="-1"> <PARAM NAME="EnableFullScreenControls" VALUE="0"> <PARAM NAME="EnableTracker" VALUE="-1"> <PARAM NAME="InvokeURLs" VALUE="-1"> <PARAM NAME="Language" VALUE="-1"> <PARAM NAME="PlayCount" VALUE="1"> <PARAM NAME="PreviewMode" VALUE="0"> <PARAM NAME="Rate" VALUE="1"> <PARAM NAME="SAMILang" VALUE=""> <PARAM NAME="SAMIStyle" VALUE=""> <PARAM NAME="SAMIFileName" VALUE=""> <PARAM NAME="SendOpenStateChangeEvents" VALUE="-1"> <PARAM NAME="SendWarningEvents" VALUE="-1"> <PARAM NAME="SendErrorEvents" VALUE="-1"> <PARAM NAME="SendKeyboardEvents" VALUE="0"> <PARAM NAME="SendMouseClickEvents" VALUE="0"> <PARAM NAME="SendMouseMoveEvents" VALUE="0"> <PARAM NAME="SendPlayStateChangeEvents" VALUE="-1"> <PARAM NAME="ShowCaptioning" VALUE="0"> <PARAM NAME="ShowGotoBar" VALUE=0"> <PARAM NAME="ShowStatusBar" VALUE="0"> <PARAM NAME="ShowTracker" VALUE="-1"> <PARAM NAME="TransparentAtStart" VALUE="-1"> <PARAM NAME="VideoBorderWidth" VALUE="0"> <PARAM NAME="VideoBorderColor" VALUE="0"> <PARAM NAME="VideoBorder3D" VALUE="0"> <PARAM NAME="WindowlessVideo" VALUE="0"> </OBJECT> </div>
windows media player may be IE only though |
|
| |
Scream Member
Posts : 8 Join date : 2011-03-09
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:29 pm | |
| hey............. thats cool any more stuff like that |
|
| |
roobaby80 Member
Posts : 8 Join date : 2011-04-17
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:30 pm | |
| - Javiciouse wrote:
-
- Code:
-
<div align=center> <SELECT id=cancion onchange=document.all.music.filename=document.all.cancion.value; size=1 name=Music> <OPTION selected>::::::::::::: Choose Your Song Here :::::::::::::</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION> <OPTION value=http://urltoyoursong.mp3>Artist - Song Title</OPTION>
</SELECT><BR> <OBJECT id=music height=44 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95> <PARAM NAME="AutoStart" VALUE="-1"> <PARAM NAME="Balance" VALUE="0"> <PARAM NAME="DisplaySize" VALUE="0"> <PARAM NAME="Filename" VALUE=""> <PARAM NAME="Mute" VALUE="0"> <PARAM NAME="SelectionStart" VALUE="-1"> <PARAM NAME="SelectionEnd" VALUE="-1"> <PARAM NAME="ShowControls" VALUE="-1"> <PARAM NAME="ShowAudioControls" VALUE="-1"> <PARAM NAME="ShowDisplay" VALUE="0"> <PARAM NAME="ShowPositionControls" VALUE="-1"> <PARAM NAME="Volume" VALUE="0"> <PARAM NAME="AudioStream" VALUE="-1"> <PARAM NAME="AutoSize" VALUE="0"> <PARAM NAME="AnimationAtStart" VALUE="-1"> <PARAM NAME="AllowScan" VALUE="-1"> <PARAM NAME="AllowChangeDisplaySize" VALUE="-1"> <PARAM NAME="AutoRewind" VALUE="1"> <PARAM NAME="BaseURL" VALUE=""> <PARAM NAME="BufferingTime" VALUE="5"> <PARAM NAME="CaptioningID" VALUE=""> <PARAM NAME="ClickToPlay" VALUE="-1"> <PARAM NAME="CursorType" VALUE="0"> <PARAM NAME="CurrentPosition" VALUE="-1"> <PARAM NAME="CurrentMarker" VALUE="0"> <PARAM NAME="DefaultFrame" VALUE=""> <PARAM NAME="DisplayBackColor" VALUE="0"> <PARAM NAME="DisplayForeColor" VALUE="16777215"> <PARAM NAME="DisplayMode" VALUE="0"> <PARAM NAME="Enabled" VALUE="-1"> <PARAM NAME="EnableContextMenu" VALUE="-1"> <PARAM NAME="EnablePositionControls" VALUE="-1"> <PARAM NAME="EnableFullScreenControls" VALUE="0"> <PARAM NAME="EnableTracker" VALUE="-1"> <PARAM NAME="InvokeURLs" VALUE="-1"> <PARAM NAME="Language" VALUE="-1"> <PARAM NAME="PlayCount" VALUE="1"> <PARAM NAME="PreviewMode" VALUE="0"> <PARAM NAME="Rate" VALUE="1"> <PARAM NAME="SAMILang" VALUE=""> <PARAM NAME="SAMIStyle" VALUE=""> <PARAM NAME="SAMIFileName" VALUE=""> <PARAM NAME="SendOpenStateChangeEvents" VALUE="-1"> <PARAM NAME="SendWarningEvents" VALUE="-1"> <PARAM NAME="SendErrorEvents" VALUE="-1"> <PARAM NAME="SendKeyboardEvents" VALUE="0"> <PARAM NAME="SendMouseClickEvents" VALUE="0"> <PARAM NAME="SendMouseMoveEvents" VALUE="0"> <PARAM NAME="SendPlayStateChangeEvents" VALUE="-1"> <PARAM NAME="ShowCaptioning" VALUE="0"> <PARAM NAME="ShowGotoBar" VALUE=0"> <PARAM NAME="ShowStatusBar" VALUE="0"> <PARAM NAME="ShowTracker" VALUE="-1"> <PARAM NAME="TransparentAtStart" VALUE="-1"> <PARAM NAME="VideoBorderWidth" VALUE="0"> <PARAM NAME="VideoBorderColor" VALUE="0"> <PARAM NAME="VideoBorder3D" VALUE="0"> <PARAM NAME="WindowlessVideo" VALUE="0"> </OBJECT> </div>
windows media player may be IE only though Thanks so much java Thats brilliant and you are a star. |
|
| |
UsernameChange Staff
Posts : 16 Join date : 2011-03-09
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:30 pm | |
| wut kind of "stuff" mcq? and yw paula |
|
| |
roobaby80 Member
Posts : 8 Join date : 2011-04-17
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:31 pm | |
| tried the code and its nearer to what I'm after which is cool. However, I was wanting to have buttons instead of a drop down list. I've tinkered with it using radio buttons to select the songs. The only thing is that you can select a track but it won't play until you select another radio button. eg You select "song 1" but it won't play until you select either "song 2" or "song 3", or press the play button. Is there a way of making each radio button play the song that is selected? I've included the code that I've modified putting in the song titles in the right place. If you tell me which bit I need to tweak I'd be immensely happy. I'm guessing there's just one parameter that needs changing but I can't work out which it is.
Thanks
P
code below
<div align=center> <OBJECT id=music height=44 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95> <param name="AudioStream" value="-1"> <param name="AutoSize" value="0"> <param name="AutoStart" value="-1"> <param name="AnimationAtStart" value="-1"> <param name="AllowScan" value="-1"> <param name="AllowChangeDisplaySize" value="-1"> <param name="AutoRewind" value="-1"> <param name="Balance" value="0"> <param name="BaseURL" value> <param name="BufferingTime" value="5"> <param name="CaptioningID" value> <param name="ClickToPlay" value="-1"> <param name="CursorType" value="0"> <param name="CurrentPosition" value="-1"> <param name="CurrentMarker" value="0"> <param name="DefaultFrame" value> <param name="DisplayBackColor" value="0"> <param name="DisplayForeColor" value="16777215"> <param name="DisplayMode" value="0"> <param name="DisplaySize" value="0"> <param name="Enabled" value="-1"> <param name="EnableContextMenu" value="-1"> <param name="EnablePositionControls" value="-1"> <param name="EnableFullScreenControls" value="0"> <param name="EnableTracker" value="-1"> <param name="Filename" value> <param name="InvokeURLs" value="-1"> <param name="Language" value="-1"> <param name="Mute" value="0"> <param name="PlayCount" value="1"> <param name="PreviewMode" value="0"> <param name="Rate" value="1"> <param name="SAMILang" value> <param name="SAMIStyle" value> <param name="SAMIFileName" value> <param name="SelectionStart" value="-1"> <param name="SelectionEnd" value="-1"> <param name="SendOpenStateChangeEvents" value="-1"> <param name="SendWarningEvents" value="-1"> <param name="SendErrorEvents" value="-1"> <param name="SendKeyboardEvents" value="0"> <param name="SendMouseClickEvents" value="0"> <param name="SendMouseMoveEvents" value="0"> <param name="SendPlayStateChangeEvents" value="-1"> <param name="ShowCaptioning" value="0"> <param name="ShowControls" value="-1"> <param name="ShowAudioControls" value="-1"> <param name="ShowDisplay" value="0"> <param name="ShowGotoBar" value="0"> <param name="ShowPositionControls" value="-1"> <param name="ShowStatusBar" value="0"> <param name="ShowTracker" value="-1"> <param name="TransparentAtStart" value="-1"> <param name="VideoBorderWidth" value="0"> <param name="VideoBorderColor" value="0"> <param name="VideoBorder3D" value="0"> <param name="Volume" value="0"> <param name="WindowlessVideo" value="0"> </OBJECT> </div> <p> <INPUT id=song1 onchange=document.all.music.filename=document.all.song1.value; TYPE="RADIO" NAME="Music" VALUE="song1.m3u">Song 1 </p> <p><INPUT id=song2 onchange=document.all.music.filename=document.all.song2.value; TYPE="RADIO" NAME="Music" VALUE="song2.m3u">Song 2 </p> <p> <INPUT id=song3 onchange=document.all.music.filename=document.all.song3.value; TYPE="RADIO" NAME="Music" VALUE="song3.m3u">Song 3</p> |
|
| |
UsernameChange Staff
Posts : 16 Join date : 2011-03-09
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:32 pm | |
| you almost had it, u need to use onclick for this one - Code:
-
<div align=center> <OBJECT id=music height=44 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95> <param name="AudioStream" value="-1"> <param name="AutoSize" value="0"> <param name="AutoStart" value="-1"> <param name="AnimationAtStart" value="-1"> <param name="AllowScan" value="-1"> <param name="AllowChangeDisplaySize" value="-1"> <param name="AutoRewind" value="-1"> <param name="Balance" value="0"> <param name="BaseURL" value> <param name="BufferingTime" value="5"> <param name="CaptioningID" value> <param name="ClickToPlay" value="-1"> <param name="CursorType" value="0"> <param name="CurrentPosition" value="-1"> <param name="CurrentMarker" value="0"> <param name="DefaultFrame" value> <param name="DisplayBackColor" value="0"> <param name="DisplayForeColor" value="16777215"> <param name="DisplayMode" value="0"> <param name="DisplaySize" value="0"> <param name="Enabled" value="-1"> <param name="EnableContextMenu" value="-1"> <param name="EnablePositionControls" value="-1"> <param name="EnableFullScreenControls" value="0"> <param name="EnableTracker" value="-1"> <param name="Filename" value> <param name="InvokeURLs" value="-1"> <param name="Language" value="-1"> <param name="Mute" value="0"> <param name="PlayCount" value="1"> <param name="PreviewMode" value="0"> <param name="Rate" value="1"> <param name="SAMILang" value> <param name="SAMIStyle" value> <param name="SAMIFileName" value> <param name="SelectionStart" value="-1"> <param name="SelectionEnd" value="-1"> <param name="SendOpenStateChangeEvents" value="-1"> <param name="SendWarningEvents" value="-1"> <param name="SendErrorEvents" value="-1"> <param name="SendKeyboardEvents" value="0"> <param name="SendMouseClickEvents" value="0"> <param name="SendMouseMoveEvents" value="0"> <param name="SendPlayStateChangeEvents" value="-1"> <param name="ShowCaptioning" value="0"> <param name="ShowControls" value="-1"> <param name="ShowAudioControls" value="-1"> <param name="ShowDisplay" value="0"> <param name="ShowGotoBar" value="0"> <param name="ShowPositionControls" value="-1"> <param name="ShowStatusBar" value="0"> <param name="ShowTracker" value="-1"> <param name="TransparentAtStart" value="-1"> <param name="VideoBorderWidth" value="0"> <param name="VideoBorderColor" value="0"> <param name="VideoBorder3D" value="0"> <param name="Volume" value="0"> <param name="WindowlessVideo" value="0"> </OBJECT> </div> <p> <INPUT id=song1 onclick=document.all.music.filename=document.all.song1.value; TYPE="RADIO" NAME="Music" VALUE="song1.m3u">Song 1 </p> <p><INPUT id=song2 onclick=document.all.music.filename=document.all.song2.value; TYPE="RADIO" NAME="Music" VALUE="song2.m3u">Song 2 </p> <p> <INPUT id=song3 onclick=document.all.music.filename=document.all.song3.value; TYPE="RADIO" NAME="Music" VALUE="song3.m3u">Song 3</p>
|
|
| |
roobaby80 Member
Posts : 8 Join date : 2011-04-17
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:32 pm | |
| Bingo. Thanks a lot for that. |
|
| |
BaconBitz Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:33 pm | |
| I have an embedded media player in my site and i like this code. Is there a way to make it randomly select a track at the begining and then continue to play through the playlist or continue to play random tracks? Thanks. |
|
| |
Fame Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:34 pm | |
| Hi,
I like this script, but I have two questions. First, can I disable or remove the fast forward button? Second, how can I show what is currently playing?
I will be using this script to play archived radio shows.
Thanks guys. God Bless.
Aaron. |
|
| |
BaconBitz Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:36 pm | |
| To show current song (and other stream info):
Find line: <OBJECT id=music height=44 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
Replace with: <OBJECT id=music height=70 width=230 classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
Find line: <param name="ShowStatusBar" value="0">
Replace with: <param name="ShowStatusBar" value="1">
You may need to adjust the width of the player in the first edit as well to suit your needs. Im not sure about disabling the fast forward button. I suggest you play around with some of the params. Hope this helps. |
|
| |
UsernameChange Staff
Posts : 16 Join date : 2011-03-09
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:37 pm | |
| find this line <param name="ShowPositionControls" value="-1"> and change it to <param name="ShowPositionControls" value="0"> |
|
| |
Fame Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:37 pm | |
| Thank You for your help. You guys are really helpful. |
|
| |
BaconBitz Member
Posts : 4 Join date : 2011-05-11
| Subject: Re: Embedded Windows Media Player Wed May 11, 2011 10:38 pm | |
| very nice and simple code. |
|
| |
Sponsored content
| Subject: Re: Embedded Windows Media Player | |
| |
|
| |
| Embedded Windows Media Player | |
|