Go Back   CodingForums.com > :: Client side development > Graphics and Multimedia discussions

Before you post, read our: Rules & Posting Guidelines

Closed Thread
 
Thread Tools Rating: Thread Rating: 31 votes, 3.42 average.
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-20-2005, 03:56 PM   PM User | #1
paulajackson
New Coder

 
Join Date: Jan 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
paulajackson is an unknown quantity at this point
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
paulajackson is offline  
Old 01-20-2005, 06:50 PM   PM User | #2
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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
_Aerospace_Eng_ is offline  
Old 01-20-2005, 08:27 PM   PM User | #3
mcq
New Coder

 
Join Date: Jan 2005
Location: northren ireland Age:14
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
mcq is an unknown quantity at this point
hey............. thats cool any more stuff like that
mcq is offline  
Old 01-20-2005, 10:13 PM   PM User | #4
paulajackson
New Coder

 
Join Date: Jan 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
paulajackson is an unknown quantity at this point
Thankyou

Thanks Aerospace Eng. Thats brilliant and you are a star.
paulajackson is offline  
Old 01-20-2005, 11:27 PM   PM User | #5
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
wut kind of "stuff" mcq?
and yw paula
_Aerospace_Eng_ is offline  
Old 01-21-2005, 10:24 AM   PM User | #6
paulajackson
New Coder

 
Join Date: Jan 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
paulajackson is an unknown quantity at this point
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>
paulajackson is offline  
Old 01-21-2005, 02:06 PM   PM User | #7
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
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>
_Aerospace_Eng_ is offline  
Old 01-21-2005, 03:31 PM   PM User | #8
paulajackson
New Coder

 
Join Date: Jan 2005
Posts: 95
Thanks: 0
Thanked 0 Times in 0 Posts
paulajackson is an unknown quantity at this point
Bingo.
Thanks a lot for that.

Best wishes

Paul
paulajackson is offline  
Old 01-24-2005, 06:16 PM   PM User | #9
froze
New to the CF scene

 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
froze is an unknown quantity at this point
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.
froze is offline  
Old 02-03-2005, 06:47 PM   PM User | #10
aaroncavanaugh2
New Coder

 
Join Date: Feb 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
aaroncavanaugh2 is an unknown quantity at this point
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.
aaroncavanaugh2 is offline  
Old 02-03-2005, 10:55 PM   PM User | #11
froze
New to the CF scene

 
Join Date: Jan 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
froze is an unknown quantity at this point
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.
froze is offline  
Old 02-03-2005, 11:12 PM   PM User | #12
_Aerospace_Eng_
Supreme Master coder!


 
_Aerospace_Eng_'s Avatar
 
Join Date: Dec 2004
Location: In a place far, far away...
Posts: 19,293
Thanks: 2
Thanked 1,044 Times in 1,020 Posts
_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light_Aerospace_Eng_ is a glorious beacon of light
find this line <param name="ShowPositionControls" value="-1"> and change it to <param name="ShowPositionControls" value="0">
_Aerospace_Eng_ is offline  
Old 02-04-2005, 12:07 AM   PM User | #13
aaroncavanaugh2
New Coder

 
Join Date: Feb 2005
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
aaroncavanaugh2 is an unknown quantity at this point
Thank You

Thank You for your help. You guys are really helpful.

God Bless.

Aaron.
aaroncavanaugh2 is offline  
Old 02-06-2005, 09:16 PM   PM User | #14
expertcoder
New to the CF scene

 
Join Date: Feb 2005
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
expertcoder is an unknown quantity at this point
Thumbs up

very nice and simple code.
__________________
Musicbox Verson 2.1 for Professional Music websites, Guaranteed
Waadia.com - New Products & Services
expertcoder is offline  
Old 03-01-2005, 07:31 PM   PM User | #15
snensi
New to the CF scene

 
Join Date: Sep 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
snensi is an unknown quantity at this point
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:
Originally Posted by _Aerospace_Eng_
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>
snensi is offline  
Closed Thread

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:42 PM.


Advertisement
Log in to turn off these ads.