...

View Full Version : Windows media player embedded that show playlist itens.



matheusgrafix
02-10-2011, 10:29 PM
Hi
I've been working on this for a long time, tried a lot of players, but then, went back to wmp.

My trouble is: I can embedded windows media player, and make it load an asx playlist, buuuut, it wont show the playlist itens, so, the user can not choose wich item he want to see.

I tried an alternative here that worked, make a link for each item without using the asx playlist, but the higher problem is that I have more than 800 itens on the asx playlist to copy and rename.

you know when you open wmp on your computer, and then it shows a playlist on the right corner, that's what I'm trying to do.

Help me, please, it can even be a php script that loads and show the asx playlist, or in another language, such as java script.


Ty

Greetings :thumbsup:

matheusgrafix
02-11-2011, 02:03 AM
I found a script, configured it acording to the guide, but now, only the player works, the playlist wont show up.


<head>
<script language="javascript1.2">
function loadPlayItems() {
df=document.getElementById("playItem");
dp=document.getElementById("playlist");
WMP9=document.getElementById("MediaPlayer1");

WMP9.url="http://tv.mghospedagem.com/jwp-silverlight/play.asx";
WMP9.controls.play();

}

function showPlayItems() {
WMP9=document.getElementById("MediaPlayer1");
playlistItems=WMP9.currentPlaylist.count;
for (i=0; i<playlistItems; i++) {
playitem=document.createElement("a");
playnext=document.createElement("br");
playitem.setAttribute("href","#");
playitem.setAttribute("onclick","playItem("+i+")");
playitem.innerText=WMP9.currentPlaylist.item(i).name;
dp.appendChild(playitem);
dp.appendChild(playnext);
}
playListLoaded=true;
WMP9.controls.stop();

}

function setPlayItem(index) {
WMP9=document.getElementById("MediaPlayer1");
playlistItems=WMP9.currentPlaylist.count;
if (playlistItems > 0) {

WMP9.controls.currentItem=WMP9.currentPlaylist.item(index);
WMP9.controls.play();
}
}

</script></head>

<body onLoad="loadPlayItems()">
<object id="MediaPlayer1"
classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
type="application/x-oleobject" width="600" height="400">
<param name="autostart" value="0">
<param name="showcontrols" value="0">
<param name="uimode" value="full">
<param name="stretchtofit" value="1">
<param name="enablecontextmenu" value="0">
</object>

<div id="playlist" style="position: absolute; top: 10px; left:
640px; visibility: visible;">
<h2>Playlist</h2></div>

<script language="javascript1.2" for="MediaPlayer1"
event="playStateChange">
WMP9=document.getElementById("MediaPlayer1");
if (WMP9.playState==3 && ! playListLoaded) {
showPlayItems();
}

</script>




You can see the page here http://tv.mghospedagem.com/wmp-plBYTES.html
Ps: only work for IE.

And here is where I got the code from https://groups.google.com/group/microsoft.public.windowsmedia.player.web/browse_frm/thread/d134164e3d514963/0f180dd8ceaed3a1?tvc=1&q=%22showPlayItems%28%29%22+author:Neil+author:Smith+author:[MVP+author:Digital+author:Media]&hl=en&pli=1

matheusgrafix
02-11-2011, 07:54 PM
I found a script, configured it acording to the guide, but now, only the player works, the playlist wont show up.


<head>
<script language="javascript1.2">
function loadPlayItems() {
df=document.getElementById("playItem");
dp=document.getElementById("playlist");
WMP9=document.getElementById("MediaPlayer1");

WMP9.url="http://tv.mghospedagem.com/jwp-silverlight/play.asx";
WMP9.controls.play();

}

function showPlayItems() {
WMP9=document.getElementById("MediaPlayer1");
playlistItems=WMP9.currentPlaylist.count;
for (i=0; i<playlistItems; i++) {
playitem=document.createElement("a");
playnext=document.createElement("br");
playitem.setAttribute("href","#");
playitem.setAttribute("onclick","playItem("+i+")");
playitem.innerText=WMP9.currentPlaylist.item(i).name;
dp.appendChild(playitem);
dp.appendChild(playnext);
}
playListLoaded=true;
WMP9.controls.stop();

}

function setPlayItem(index) {
WMP9=document.getElementById("MediaPlayer1");
playlistItems=WMP9.currentPlaylist.count;
if (playlistItems > 0) {

WMP9.controls.currentItem=WMP9.currentPlaylist.item(index);
WMP9.controls.play();
}
}

</script></head>

<body onLoad="loadPlayItems()">
<object id="MediaPlayer1"
classid="clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6"
type="application/x-oleobject" width="600" height="400">
<param name="autostart" value="0">
<param name="showcontrols" value="0">
<param name="uimode" value="full">
<param name="stretchtofit" value="1">
<param name="enablecontextmenu" value="0">
</object>

<div id="playlist" style="position: absolute; top: 10px; left:
640px; visibility: visible;">
<h2>Playlist</h2></div>

<script language="javascript1.2" for="MediaPlayer1"
event="playStateChange">
WMP9=document.getElementById("MediaPlayer1");
if (WMP9.playState==3 && ! playListLoaded) {
showPlayItems();
}

</script>




You can see the page here http://tv.mghospedagem.com/wmp-plBYTES.html
Ps: only work for IE.

And here is where I got the code from https://groups.google.com/group/microsoft.public.windowsmedia.player.web/browse_frm/thread/d134164e3d514963/0f180dd8ceaed3a1?tvc=1&q=%22showPlayItems%28%29%22+author:Neil+author:Smith+author:[MVP+author:Digital+author:Media]&hl=en&pli=1


I need help ASAP. Please. :(



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum