| Author |
Message |
Stuttgart900
Guest
|
Posted:
Wed Mar 09, 2005 9:02 am Post subject:
Using 'shuffle' command for an online Windows Media Player o |
|
|
Hello, I've been trying to create a WMP object to play my music online on my
website, but I just can't find the command needed for it to play a playlist
in random order. Below is my code. Help would be tremendously appreciated.
Thanks.
P.S. I'd hope this would be compatible with WMP7 and higher, but it doesn't
really matter. Thanks.
-----
Playlist generated randomly.<br>
Click on the Next and Previous arrows for next song.<br>
<OBJECT ID="NTPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="300" height="63" border="0">
<param name="URL" value="http://66.182.203.120/Music/Music.wpl" ref>
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="0">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="50">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="-1">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="7938">
<param name="_cy" value="1667">
</OBJECT>
<style type="text/css">
a:link, a:visited, a:active { color: #333; text-decoration: underline; }
a:hover { color: #666; text-decoration: none; }
body, td, div, p, th, select, input { font-family: verdana, arial,
sans-serif; font-size: 12px; color: #333; }
body { background: #99CCFF; }
form { margin: 0px; padding: 0px; }
hr { color: #ccc; }
.banner, .footer, #SearchBar1_pnlSearch { display: none; }
.main { table-layout: fixed; }
.mainleft table { background: #f0efef; border: 0px }
.mainleft th.left { background: #f0efef; padding: 0px 0px 5px 0px; }
.mainleft td.left, .blogbody { background: #fff; border: 1px solid #ccc;
border-top: 5px solid #ccc; }
.mainleft th, .blogheader { font-size: 12px; text-transform: uppercase;
letter-spacing: .3em; }
.blogbody td { text-align: justify; line-height: 17px; padding: 4px;
padding-left:0px; width:0px; }
.htmleditor { width: 513px; }
</style>
----
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Wed Mar 09, 2005 3:17 pm Post subject:
Re: Using 'shuffle' command for an online Windows Media Play |
|
|
You could try to use this, but it won't work on media player 6.4 as
used by firefox - since you've used only IE embedding code it's
probably not a concern but worth noting. It should work for WMP7-10.
NTPlayer.settings.setMode(shuffle, true);
If that doesn't work you'll either need specialised code to read the
static playlist into a javascript array, and then use that to control
the player, or you can rewite the playlist entry ref="bla" randomly on
the web server using a scripting language like jsp, asp or php.
Cheers - Neil
On Tue, 8 Mar 2005 22:59:02 -0800, Stuttgart900
<Stuttgart900@discussions.microsoft.com> wrote:
| Quote: | Hello, I've been trying to create a WMP object to play my music online on my
website, but I just can't find the command needed for it to play a playlist
in random order. Below is my code. Help would be tremendously appreciated.
Thanks.
P.S. I'd hope this would be compatible with WMP7 and higher, but it doesn't
really matter. Thanks.
-----
Playlist generated randomly.<br
Click on the Next and Previous arrows for next song.<br
OBJECT ID="NTPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="300" height="63" border="0"
<param name="URL" value="http://66.182.203.120/Music/Music.wpl" ref
<param name="rate" value="1"
<param name="balance" value="0"
<param name="currentPosition" value="0"
<param name="defaultFrame" value
<param name="playCount" value="1"
<param name="autoStart" value="-1"
<param name="currentMarker" value="0"
<param name="invokeURLs" value="-1"
<param name="baseURL" value
<param name="volume" value="50"
<param name="mute" value="0"
<param name="uiMode" value="full"
<param name="stretchToFit" value="0"
<param name="windowlessVideo" value="-1"
<param name="enabled" value="-1"
<param name="enableContextMenu" value="-1"
<param name="fullScreen" value="0"
<param name="SAMIStyle" value
<param name="SAMILang" value
<param name="SAMIFilename" value
<param name="captioningID" value
<param name="enableErrorDialogs" value="0"
<param name="_cx" value="7938"
<param name="_cy" value="1667"
/OBJECT
style type="text/css"
a:link, a:visited, a:active { color: #333; text-decoration: underline; }
a:hover { color: #666; text-decoration: none; }
body, td, div, p, th, select, input { font-family: verdana, arial,
sans-serif; font-size: 12px; color: #333; }
body { background: #99CCFF; }
form { margin: 0px; padding: 0px; }
hr { color: #ccc; }
.banner, .footer, #SearchBar1_pnlSearch { display: none; }
.main { table-layout: fixed; }
.mainleft table { background: #f0efef; border: 0px }
.mainleft th.left { background: #f0efef; padding: 0px 0px 5px 0px; }
.mainleft td.left, .blogbody { background: #fff; border: 1px solid #ccc;
border-top: 5px solid #ccc; }
.mainleft th, .blogheader { font-size: 12px; text-transform: uppercase;
letter-spacing: .3em; }
.blogbody td { text-align: justify; line-height: 17px; padding: 4px;
padding-left:0px; width:0px; }
.htmleditor { width: 513px; }
/style
---- |
|
|
| Back to top |
|
 |
Stuttgart900
Guest
|
Posted:
Wed Mar 09, 2005 6:45 pm Post subject:
Re: Using 'shuffle' command for an online Windows Media Play |
|
|
I'm sorry but I'm quite new to web programming...I spend most of my time in
Java so I really don't know how to implement these lines. I tried just
copying and pasting the 'NTPlayer.settings.setMode(shuffle, true);' line into
the code, but that didn't work...haha. Could someone try to actually make it
work by plugging it into the code? Thanks so much.
"Neil Smith [MVP Digital Media]" wrote:
| Quote: | You could try to use this, but it won't work on media player 6.4 as
used by firefox - since you've used only IE embedding code it's
probably not a concern but worth noting. It should work for WMP7-10.
NTPlayer.settings.setMode(shuffle, true);
If that doesn't work you'll either need specialised code to read the
static playlist into a javascript array, and then use that to control
the player, or you can rewite the playlist entry ref="bla" randomly on
the web server using a scripting language like jsp, asp or php.
Cheers - Neil
On Tue, 8 Mar 2005 22:59:02 -0800, Stuttgart900
Stuttgart900@discussions.microsoft.com> wrote:
Hello, I've been trying to create a WMP object to play my music online on my
website, but I just can't find the command needed for it to play a playlist
in random order. Below is my code. Help would be tremendously appreciated.
Thanks.
P.S. I'd hope this would be compatible with WMP7 and higher, but it doesn't
really matter. Thanks.
-----
Playlist generated randomly.<br
Click on the Next and Previous arrows for next song.<br
OBJECT ID="NTPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="300" height="63" border="0"
<param name="URL" value="http://66.182.203.120/Music/Music.wpl" ref
<param name="rate" value="1"
<param name="balance" value="0"
<param name="currentPosition" value="0"
<param name="defaultFrame" value
<param name="playCount" value="1"
<param name="autoStart" value="-1"
<param name="currentMarker" value="0"
<param name="invokeURLs" value="-1"
<param name="baseURL" value
<param name="volume" value="50"
<param name="mute" value="0"
<param name="uiMode" value="full"
<param name="stretchToFit" value="0"
<param name="windowlessVideo" value="-1"
<param name="enabled" value="-1"
<param name="enableContextMenu" value="-1"
<param name="fullScreen" value="0"
<param name="SAMIStyle" value
<param name="SAMILang" value
<param name="SAMIFilename" value
<param name="captioningID" value
<param name="enableErrorDialogs" value="0"
<param name="_cx" value="7938"
<param name="_cy" value="1667"
/OBJECT
style type="text/css"
a:link, a:visited, a:active { color: #333; text-decoration: underline; }
a:hover { color: #666; text-decoration: none; }
body, td, div, p, th, select, input { font-family: verdana, arial,
sans-serif; font-size: 12px; color: #333; }
body { background: #99CCFF; }
form { margin: 0px; padding: 0px; }
hr { color: #ccc; }
.banner, .footer, #SearchBar1_pnlSearch { display: none; }
.main { table-layout: fixed; }
.mainleft table { background: #f0efef; border: 0px }
.mainleft th.left { background: #f0efef; padding: 0px 0px 5px 0px; }
.mainleft td.left, .blogbody { background: #fff; border: 1px solid #ccc;
border-top: 5px solid #ccc; }
.mainleft th, .blogheader { font-size: 12px; text-transform: uppercase;
letter-spacing: .3em; }
.blogbody td { text-align: justify; line-height: 17px; padding: 4px;
padding-left:0px; width:0px; }
.htmleditor { width: 513px; }
/style
----
|
|
|
| Back to top |
|
 |
Neil Smith [MVP Digital M
Guest
|
Posted:
Wed Mar 09, 2005 7:10 pm Post subject:
Re: Using 'shuffle' command for an online Windows Media Play |
|
|
No, that's cause it's javascript. I wrongly assumed you were also
using javascript to do something with your player so I provided that
syntax. I don't think there's a shuffle setting in the <param /> tags.
BTW your tag is broke :
<param name="URL" value="http://66.182.203.120/Music/Music.wpl" ref>
This should not end in ref>, it should stop just after the closing
quote of the URL value.
And <param name="autoStart" value="-1"> - these values should be zero
(false, or off) and one (true, or on). -1 is only used to indicate
false in javascript, not in HTML code.
And finally, all tags shown as <param name="baseURL" value> must have
a value actually set or the code below won't work because you have
broken the DOM (page structure) by using invalid tag format. You
*must* repair the HTML before you can reliably script the player.
Anyway : Try adding an onload event to the HTML body tag :
<body onload="setPlayerShuffleMode()">
And then in the head of the document, it should now read
<head>
<title>Blah</title>
<script language="javascript1.2" type="text/javascript">
function setPlayerShuffleMode() {
var player=document.getElementById("NTPlayer");
player.settings.setMode(shuffle, true);
}
</script>
</head>
Cheers - Neil
On Wed, 9 Mar 2005 05:45:03 -0800, Stuttgart900
<Stuttgart900@discussions.microsoft.com> wrote:
| Quote: | I'm sorry but I'm quite new to web programming...I spend most of my time in
Java so I really don't know how to implement these lines. I tried just
copying and pasting the 'NTPlayer.settings.setMode(shuffle, true);' line into
the code, but that didn't work...haha. Could someone try to actually make it
work by plugging it into the code? Thanks so much.
"Neil Smith [MVP Digital Media]" wrote:
You could try to use this, but it won't work on media player 6.4 as
used by firefox - since you've used only IE embedding code it's
probably not a concern but worth noting. It should work for WMP7-10.
NTPlayer.settings.setMode(shuffle, true);
If that doesn't work you'll either need specialised code to read the
static playlist into a javascript array, and then use that to control
the player, or you can rewite the playlist entry ref="bla" randomly on
the web server using a scripting language like jsp, asp or php.
Cheers - Neil
On Tue, 8 Mar 2005 22:59:02 -0800, Stuttgart900
Stuttgart900@discussions.microsoft.com> wrote:
Hello, I've been trying to create a WMP object to play my music online on my
website, but I just can't find the command needed for it to play a playlist
in random order. Below is my code. Help would be tremendously appreciated.
Thanks.
P.S. I'd hope this would be compatible with WMP7 and higher, but it doesn't
really matter. Thanks.
-----
Playlist generated randomly.<br
Click on the Next and Previous arrows for next song.<br
OBJECT ID="NTPlayer" CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
width="300" height="63" border="0"
<param name="URL" value="http://66.182.203.120/Music/Music.wpl" ref
<param name="rate" value="1"
<param name="balance" value="0"
<param name="currentPosition" value="0"
<param name="defaultFrame" value
<param name="playCount" value="1"
<param name="autoStart" value="-1"
<param name="currentMarker" value="0"
<param name="invokeURLs" value="-1"
<param name="baseURL" value
<param name="volume" value="50"
<param name="mute" value="0"
<param name="uiMode" value="full"
<param name="stretchToFit" value="0"
<param name="windowlessVideo" value="-1"
<param name="enabled" value="-1"
<param name="enableContextMenu" value="-1"
<param name="fullScreen" value="0"
<param name="SAMIStyle" value
<param name="SAMILang" value
<param name="SAMIFilename" value
<param name="captioningID" value
<param name="enableErrorDialogs" value="0"
<param name="_cx" value="7938"
<param name="_cy" value="1667"
/OBJECT
style type="text/css"
a:link, a:visited, a:active { color: #333; text-decoration: underline; }
a:hover { color: #666; text-decoration: none; }
body, td, div, p, th, select, input { font-family: verdana, arial,
sans-serif; font-size: 12px; color: #333; }
body { background: #99CCFF; }
form { margin: 0px; padding: 0px; }
hr { color: #ccc; }
.banner, .footer, #SearchBar1_pnlSearch { display: none; }
.main { table-layout: fixed; }
.mainleft table { background: #f0efef; border: 0px }
.mainleft th.left { background: #f0efef; padding: 0px 0px 5px 0px; }
.mainleft td.left, .blogbody { background: #fff; border: 1px solid #ccc;
border-top: 5px solid #ccc; }
.mainleft th, .blogheader { font-size: 12px; text-transform: uppercase;
letter-spacing: .3em; }
.blogbody td { text-align: justify; line-height: 17px; padding: 4px;
padding-left:0px; width:0px; }
.htmleditor { width: 513px; }
/style
----
|
|
|
| Back to top |
|
 |
|
|
|
|