![]() |
Embedded Windows Media Player
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 :) |
Code:
<div align=center> |
hey............. thats cool any more stuff like that
|
Thankyou
Thanks Aerospace Eng. Thats brilliant and you are a star.
:D |
wut kind of "stuff" mcq?
and yw paula :thumbsup: |
I 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> |
you almost had it, u need to use onclick for this one
Code:
<div align=center> |
Bingo.
Thanks a lot for that. Best wishes Paul |
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.
|
This Script
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. |
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. |
find this line <param name="ShowPositionControls" value="-1"> and change it to <param name="ShowPositionControls" value="0">
|
Thank You
Thank You for your help. You guys are really helpful.
God Bless. Aaron. |
very nice and simple code.
|
Hi Aerospace_Eng & others:
I have noticed that you guys have selection of songs by the use of drop-down/select or Input/Radio... and was wondering if its possible to link via regular Linking? (just DIV and Href)? Quote:
|
| All times are GMT +1. The time now is 01:53 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.